September 2003
Intermediate to advanced
336 pages
7h 20m
English
Unparsed entities and notations are one of the weirder parts of the XML specification. They're not well understood in the community and are not properly implemented in all APIs. There's little you can do with an unparsed entity you can't do with a URL in an attribute value anyway, so there's not a lot of need for them. They're mostly a holdover from SGML and the pre-Web world.
For example, suppose you want to embed images in a variety of formats in your documents. This is a completely reasonable thing to do. The unparsed entity approach is to first define notations for all the different image formats in the DTD.
<!NOTATION GIF SYSTEM "image/gif"> <!NOTATION JPEG SYSTEM "image/jpeg"> <!NOTATION ...
Read now
Unlock full access