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: dgd@cs.bu.edu (David G. Durand)
  • To: xml-dev@ic.ac.uk
  • Date: Wed, 3 Dec 1997 13:12:21 -0400

On Dec 3,  6:58am, Peter Murray-Rust wrote:
> Subject: 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

This is finbe if you are using a _NOTATION _ attribute, perhaps to label the
content of the element. In your example, you wanted to include the GIF image,
not a reference to the GIF format, so you need to have an ENTITY attribute
(which cites, rather than including) an entity (which may have been declared
NDATA with an associated notation).

This is all clear in the standard, but worked examples will clearly have to go
into the FAQ!

>
> I am sorry that I have still failed to get it right after 3 goes :-)

No problem, but the next bit makes me a little annoyed, as you totally missed
my point.

> >]>
> ><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.

Yes, but none of that information need be parsed except when _validating_ the
document. So an author, and a browser implementor need not deal with that
complexity. Furthermore, an application that does read the DTD can determine
_exactly_ what the notation "gif" is supposed to represent by checking the
PUBLIC and SYSTEM IDs given in the DTD. However, you can write a working
stylesheet that need know nothing about thsis stuff. It strikes me as
absolutely parallel to the case with element declarations, that are more useful
in production than in simple processing by applications that know the DTD in
question.

The same is true of notations. So what is the problem?

> 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 :-)

This depends on HTTP MIME typing, and can be implemented by XLL and any
sensible stylesheet language.

> >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.

Cute story clipped due to lack of relvance. You can use XLL and an appropoiate
styylesheet, or Entities and an appropriate stylesheet. I thought JUMBO was a
browser based on (at least a partial) DTD. So if you want to use NOTATION, you
can declare _the notations you expect to need_.  If an author needs a new
notation, she can _declare_ the notations she needs. Of course, she needs to
either add to your stylesheet, or create a new one that knows what that
notation means, but this is not that hard. It's certainly no _harder_ than
creating a new MIME-type.

We both agree that a simple set of public identifiers for MIME-types would be
useful. So define one. or, if you prefer the XLL-based mechanism (which does
_not_ require delcaration of the MIME-type, and is probably much better
implemented _without_ such a declaration) then use it. If you are going to
declare the type in your document, perhaps because it is essential that you get
the correct format for a multi-format resource, then you might as well use
notation, since the markup is in fact simpler and less-redundant, unless you go
out of your way to complicate it. My modification or your example shows you how
to do this, so there's nothing stopping you.

  -- David

------------------------------------------+----------------------------
David Durand                 dgd@cs.bu.edu| david@dynamicDiagrams.com
Boston University Computer Science        | Dynamic Diagrams
http://www.cs.bu.edu/students/grads/dgd/  | http://dynamicDiagrams.com/
                                          | MAPA: mapping for the WWW



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