Re: Couldn't XML allow and ignore omitted tag minimization

Tim Bray <tbray@textuality.com> wrote:
> 
> I must be missing something.  If the DTD is to work with XML, it
> *must* have "- - " before all content models of non-empty elements,
> and "- O " before empty elements, if you were to put in OMITTAG YES.

No:  The DTD can use whatever tag omissibility declarations
it wants, as long as the _instance_ doesn't omit any tags. 

> So you might as well put in OMITTAG NO.  So you might as well lose 
> the -'s and O's.
> 
> Can you outline a scenario where you'd want to have OMITTAG YES and
> still be working with XML? - Tim

You might want to create documents in "full SGML",
then run them through a normalizer before publishing
them as XML.  Converting an SGML document instance to 
XML-compatible syntax is fairly straightforward, but
rewriting an SGML DTD to be XML-compliant is quite 
complicated; there are many, many subtle differences
in syntax.

This might not be an issue though: there are so many other 
restrictions in XML that writing a DTD that is simultaneously
legal XML and useful SGML might not be possible even
if XML did allow "[-o] [-o]" in ELEMENT declarations.


--Joe English

  jenglish@crl.com

Received on Sunday, 2 March 1997 22:21:39 UTC