>Is it possible to include binary data in a XML document and follow the
>spec.
It is possible to have binary data in an XML *document* but it is not
possible
to have (unencoded) binary data in an XML text *entity*. A document is
constructed from entities. An entity is usually a file. An entity is either
text
or binary (NDATA) but not both.
You can use Base64 encoding to stick non-text data inside elements:
<!DOCTYPE foo [
<!NOTATION base64 SYSTEM "put URL of base 64 code here, or omit this string"
...
]>
<foo>
...
<binary-data notation="base64">...</binary-data>
...
</foo>
CDATA marked sections are only a shorthand mechanism for data which has a
lot of
"&" or "<" characters which you might find tedious to delimit into entity
references.
It is not a mechanism for embedding raw binary, per se.
Rick Jelliffe