[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: EMBED and validation
At 22:59 02/12/97 -0500, David G. Durand wrote: >At 12:12 AM -0000 12/3/97, Peter Murray-Rust wrote: [...] >><!ATTLIST IMG SRC NOTATION (GIF) #REQUIRED> <!-- I could include JPEG, etc--> > > This should be: > ><!ATTLIST IMG SRC ENTITY #REQUIRED> > > The notation is attached to the entity, not the citation of the entity. Well I was just going by the spec (which I have clearly misread yet again :-). [WD-xml-971117 - on the public W3 pages] [53] says we need an <!ATTLIST with some AttDefs [54] says we need an AttType in an AttDef [55] says I can choose an EnumeratedType for my AttDef [58] says this can be a Notation Type [... OK so far?] [59] has 'NOTATION' in black letters, which I thought meant you had to type it in and it has to be followed by a '(' which also needs typing in. Then it needs one or more Ntoks [60] An Ntok is a Name and from [VC Notation Attributes] it must be a notation (which is 'GIF') Then it needs a ')' and finally [53] we need a Default which [62] can be a #REQUIRED I am sorry that I have still failed to get it right after 3 goes :-) >]> ><CML> ><IMG SRC="mygif"> ></CML> > >Finally, this is a bit overstated, the following lines could (and should) >all be included in any reasonable CML DTD: > ><!NOTATION GIF > PUBLIC "+//IDN ds.internic.net/rfc/rfc2046.txt//NOTATION > Multipurpose Internet Mail Extensions::image/gif//EN"> ><!-- I hope I have copied that right - please don't sue - typos are likely --> ><!ELEMENT CML (IMG)*> ><!ELEMENT IMG (EMPTY)> ><!ATTLIST IMG SRC NOTATION (GIF) #REQUIRED> <!-- I could include JPEG, etc--> > The whole point here is that you *have* to have a DTD of some sort to manage this. An external DTD is yet another level of indirection for the poor DXBH. >So the internal subset would have to contain the following to support _one_ >gif: > ><!ENTITY mygif SYSTEM "my.gif" NDATA GIF> > >and the document would contain: > ><IMG SRC="mygif"> > >Defining a DTD (and its associated stylesheets) generally requires careful >thought about what external notations are required in the intended >application. Predefined notation sets (in the form of external entities >with Public indentifiers) are common as dirt in the SGML world, for the >reasons of interchangeability and author sanity. I accept this - in the SGML world. But in the HTML world - whose case I am trying to present :-), 'my.gif' usually means a GIF and it works 10^7 times a day pretty well :-) > >The only place the FPI need appear is in the shared declaration, the >stylesheet (used to actually render or trigger processing of the non-XML >data), can use the notation name "gif" to detect a GIF file. No FPI is >involved at the "browser end" (non-validating processor augmented with a >CML stylesheet). Since I can't sleep, let's have a little story showing what the hacker has to do to resolve problem. Lets' assume that we are looking for mentions of GIFs in an XML document. With the XLL approach (and hardcoded MIME attribute, we grep for 'MIME="image/gif"' - exactly.) With the FPI NOTATION approach we have: Elephant's Child: Where are the GIFs in this document? Parser-man (for it is he, and his hat reflects the rays of the SUN in more than Oriental splendour): Come here and be spanked for your curtiosity for it is All very Simple. Find the NOTATIONs and follow their Indirections. EC: I have found the NOTATION, but where please (for the Elephant's Child was always polite) do I go PM: Your mygif must be searched in the Hashtable of ENTITYs (Parser-men always speak in long words) EC: I have found the Hashtable of ENTITYs but I am still lost. PM: Come here and be spanked again [and he was] Do you not see that NotationDeclaration on the ENTITY (for the parser man *always* spoke in Long Words) EC (who saw the NotationDeclaration but didn't want to be spanked and asked ever so ever so politely) Where do I go now? PM: Your must find the NOTATION and its Formal Public Identifier (because Parser Men *always* speak in Long Words, Best Beloved) EC: And so I want: <!NOTATION GIF PUBLIC "-//XML-DEV//NOTATION ds.internic.net/rfc/rfc2046.txt::Multipurpose Internet Mail Extensions::image/gif//EN"> What do I do with it? (ever so politely, but he got spanked again for his 'satiable curtiosity). PM: You must travel to the deserts in the middle of Australia and speak to the Big God Rick. Then ran JUMBO, poor old JUMBO, dusty in the sunshine, very much bewildered and came to the Big God Rick, and asked 'where do I go from here'? [... to be continued ...] P. Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic net connection VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary http://www.venus.co.uk/vhg 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
|