[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: EMBED and validation
-----BEGIN PGP SIGNED MESSAGE----- Peter> Peter Murray-Rust <URL:mailto:peter@u...> > In article <3.0.1.16.19971203090021.2c27b9ba@p...>, > Peter wrote: Peter> Enlightenment has slowly come. I think we actually need an Peter> additional NOTATION as well as SRC so that the final document Peter> reads. Peter> Peter> <!DOCTYPE CML [ Peter> <!NOTATION GIF I've cut the definitions of the GIF and JPEG notations - as others have pointed out, they can be defined in the external subset. Peter> <!ENTITY mygif SYSTEM "my.gif" NDATA GIF> Peter> <!ENTITY myjpeg SYSTEM "my.jpg" NDATA GIF> I'm assuming you meant "NDATA JPEG" here. Peter> <!ELEMENT CML (IMG)*> Peter> <!ELEMENT IMG (EMPTY)> Peter> <!ATTLIST IMG SRC ENTITY #REQUIRED> Peter> <!ATTLIST IMG NOTATION (GIF|JPEG) #REQUIRED> The above could be in the external subset, but I'll keep them to make a point. Peter> ]> Peter> <CML> Peter> <IMG SRC="mygif" NOTATION="GIF"/> Peter> <IMG SRC="myjpeg" NOTATION="JPEG"/> Peter> </CML> Peter> Peter> Have I finally got there? It seems to make sense... (The same Peter> levels of indirection still apply, of course). While I'm not attempting to stop you supplying redundant information, I'd like to point out that you do have a consistency problem in the above: if, at some point, you decide to change "mygif" to (say) PNG, then not only do you have to change its declaration "<!ENTITY mygif ... NDATA PNG>", but you have to find *every use* of the entity and change the corresponding NOTATION attribute on the referring element. And you have to extend the attribute definition for IMG NOTATION (that's the reason I kept the declarations in the internal subset above). If you simply rely on the notation declared with the entity, then any change occurs only in the DTD, and you don't have to read the instance at all (and it might be confined to the external subset, if it's an image that belongs to the document type). -----BEGIN PGP SIGNATURE----- Version: 2.6.3i Charset: noconv Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface iQB1AwUBNIVGD+dsuUurvcRtAQFPTAL/bDduIZhK8XM2dDS5a5ICGNvBNAdEuBmr zNEJiWrfmZ2igEZVG/9zp9+XzyAp3RJhZv3jQ223iHC4pvuWqtdwYc+4kTmtc7U1 x/4nmwNmnfQP43/mRPqffaxcZn+BK4gN =4tPp -----END PGP SIGNATURE----- -- xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|