- From: Paul Prescod <papresco@calum.csclub.uwaterloo.ca>
- Date: Mon, 18 Mar 1996 15:59:49 -0500
- To: Joe English <joe@trystero.art.com>
- Cc: "David W. Morris" <dwm@shell.portal.com>, html-wg@w3.org, www-html@w3.org
At 10:16 AM 3/18/96 PST, Joe English wrote: >Paul Prescod <papresco@calum.csclub.uwaterloo.ca> wrote: > >> David and I were discussing an alternative conditional HTML strategy that >> requires application tag conventions like <FRAME><NOFRAME>, <TABLE><NOTABLE>. > > ><NOTE> >I don't think this <NOUN>approach</NOUN> will work very well >in the long run. ></NOTE> > >The semantics of an element should not be determined by >lexical analysis of the generic identifier. I was assuming that context, position _and_ lexical analysis would all work together. NO.XXX would be the last element within the XXX element, would be required, and would have the GI "NO.XXX". But anyhow, I can change the idea to fit "Joe's Law" by requiring an explicit connection in the DTD: <ATTLIST FRAME ALTREP CDATA #FIXED "NO.FRAME"> Here's a rough formalization of what I mean: "Any element in a text/html document's DTD that is not in the IETF HTML standard is considered an experimental element and must either be dispensible or must have an alternate representation. Dispensible elements (such as the non-standard FONT and CENTER elements), are presumed not to have any effect on the overall structure of the document and may just be ignored. They do not have to be explicitly differentiated from standard HTML elements. Indispensible elements are elements that do have an effect on the overall structure of the document, such as FRAME, SCRIPT, IMG or TABLE. Ignoring them would present an incompete or unreadable document. The HTML-superset DTD must specify an alternate representation for these elements. An alternate representation is an element with the following properties: a) The alternate representation must be a required once as a subelement of the experimental element. b) The alternate representation must be the last subelement of the experimental element. c) The experimental element must have a CDATA #FIXED attribute named ALTREP whose content is the GI of the alternate representation. d) The alternate representation's content model must consist of only elements within the IETF HTML standard. (is this too strict?) e) The alternate representation's GI must be the concatanation of the string "NO." and the GI of the experimental element. (I added the period to avoid name collisions). For example <!ELEMENT OBJECT - - (%object.content;, NO.OBJECT)> <!ATTLIST OBJECT ALTREP CDATA #FIXED "NO.OBJECT"> <!ELEMENT NO.OBJECT - - (%body.content;)> ... Experimental elements may not have generic identifiers that begin with the string "NO." (reserve the name space)" Non-DTD-based user agents would use the context, position and lexical analysis, and DTD-based user agents could use the ALTREP attribute. I explicitly included lots of redundant ways to tell which element is the alternate representation so that it works for all kinds of browsers with all kinds of parsers. We could do away with a couple of the rules if they seem superflurous. (for instance we could do away with the "NO." requirement if we aren't worried about GI collisions) I am sensitive to the complaint that this convention would be only an application convention, and would not be enforcable by regular SGML tools. But at least it is a convention that the _DTD_ writer must choose to adhere to. Authors only have to follow the DTD. Marked sections require a similar application convention and CPP is entirely outside of the SGML validation system altogether. Paul Prescod
Received on Monday, 18 March 1996 16:01:16 UTC