Question on unparsed entities & DTDs

D

D McGilvray

Hi there, I've been searching in vain for an example of exactly *how*
notations are to be used beyond simply declaring external entities.

To avoid flogging a dead horse, other considerations force me to use
DTD's, I'm not against discussion about Schemas, but I cannot use them
at the moment.

I understand that different types of unparsed entities can be declared
by declaring the notation. eg.

<!NOTATION GIF SYSTEM "some reference to gif">
<!ENTITY mypicture SYSTEM "aphoto.gif" GIF>


I can say that my element must contain an ENTITY attribute, but can I
specify what notation that entity should be?

I haven't seen any example of this, so I'm assuming that it isn't
possible, but to me it seems like a very powerful feature - for example,
I want to specify extra processing attributes tailored to the type of file.



Thanks for your time and expertise,
Dougie
 
J

Joseph Kesselman

D said:
Hi there, I've been searching in vain for an example of exactly *how*
notations are to be used beyond simply declaring external entities.

They're intended as a way of attaching additional non-XML information to
an XML document. Their use is application-specific... but in fact I
have never seen an application use them and I can't think of a really
good use case for them. They seem to be one of the features which was
inherited from SGML because some specific user wanted them, and which
everyone else has been assiduously ignoring ever since.

Tim Bray's summary, from the Annotated XML Spec
(http://www.xml.com/axml/testaxml.htm):

"A notation is a name and an external identifier; the idea is that it's
supposed to be helpful in figuring out how to deal with the data to
which it's attached. The suggestion that the XML processor itself might
do something with the notation is really bogus; that's not its job. So
if anyone is interested, it would have to be the application, not the
XML processor. Furthermore, the application might be able to handle the
data itself without any help, once it knows the notation."

By the way, I ***HIGHLY*** recommend that anyone who is working with XML
take the time to browse through the Annotated XML Spec. It's based on
XML 1.0 (Tim hasn't had the time to update it for 1.1), but it's still
the single best explanation I've seen of how and why all the design
decisions in XML were made and what the legalisms really mean. Even if
you think you know XML well, you'll probably learn a lot; I'm still
discovering details.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top