Re: SD1 - Short End Tags [fmt]

Matthew Fuchs <matt@wdi.disney.com> wrote:

> <?XML version="1.0" RMD='INTERNAL'?>
> <!doctype bogus [
> <!entity of "<firstname>">
> <!entity cf "</firstname>">
> <!entity ol "<lastname>">
> <!entity cl "</lastname>">
> ]>
> <author>
>   &of;foo&cf;
>   &ol;bar&cl;
> </author>
> 
> Then I could have the parse worry about it, and not me.  Here, including some
> of the DTD is even shorter than an alternative.

Yes, you could probably do this.  It's legal (but deprecated) in SGML.
Actually, you could use one-character entity names too, and save even more.
In SGML you can even do
<!Entity A "<firstname>">
<!Entity B "</firstname><lastname>">
<!Entity C "</lastname>">

<author>&A;Grahame&B;Goldensocks&C;</author>

but if this is allowed in XML, it oughtn't to be!

In SGML you can also use minimisation to get
<author>Goldensocks,Grahame</author>
to do what you want it to do.  This is one of the features that complicates
SGML parsers and makes them large and expensive.

In XML, we have avoided minimisation so that the parsers are easy to
implement and become (we hope) very common.

By now, though, a number of alternate suggestions have been made, and
it seems clear (to me at least) that there is a large majority not in
favour of allowing short tags, since they do not appear to be needed.

Lee

-- 
Liam Quin, lee@sq.com         | lq-text freely available Unix text retrieval
Senior Technical Consultant   | FAQs: Metafont fonts, OPEN LOOK UI, OpenWindows
SoftQuad Inc. +1 416 544-9000 | xfonttool (Unix xfontsel in XView)
http://www.softquad.com/      | the barefoot programmer

Received on Tuesday, 20 May 1997 18:42:16 UTC