Re: Foreign object inclusion WAS: Namespaces, Architectural Forms, and Sub-Documents

Rick Jelliffe (ricko@allette.com.au)
Fri, 6 Feb 1998 23:59:38 +1100



> From: Don Park <donpark@quake.net>

> As far as I can see there are two problems:
>
> 1. Embedding Binary Data inside XML document
>
> This problem is solved with BASE64. I wish we can specify it in the DTD but
> its workable now.

You can. For example

<!NOTATION base64 SYSTEM "http://www.somewhere.com/base64-decoder.applet">
<!ELEMENT BINARY ( #PCDATA )>
<!ATTLIST BINARY
encoding NOTATION ( base64 ) "base64" >
...
<BINARY>...</BINARY>

An element can have one NOTATION attribute, which specifies how to interpret
the element's data. Often this is used to restrict possible notations to
lists of types, for example

<!ATTLIST figure
type NOTATION ( gif | epsi | cgm | jpeg ) #REQUIRED >

Developers of generic XML tools should make sure that their systems
provide ways to interpret NOTATION attributes appropriately: it is
a mechnism like MIME media-types, but may be on a finer grain. It is
not a mechanism for multi-part documents (unless the DTD is a DTD
for representing multipart documents of course) because the notation
processor (which the SYSTEM identifier on the NOTATION declaration
would identify) runs after the XML processor.


Rick Jelliffe