OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: EMBED and validation

[ Lists Home | Date Index | Thread Index ]
  • From: Toby Speight <tms@ansa.co.uk>
  • To: "XML developers' list" <xml-dev@ic.ac.uk>
  • Date: 03 Dec 1997 11:44:22 +0000

-----BEGIN PGP SIGNED MESSAGE-----

Peter> Peter Murray-Rust <URL:mailto:peter@ursus.demon.co.uk>

> In article <3.0.1.16.19971203090021.2c27b9ba@pop3.demon.co.uk>,
> 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@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS