Re: SD1 - Short End Tags [fmt]

At 18:42 1997 05 20 EDT, lee@sq.com wrote:
>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!


It's not.  From 4.1 of XML-lang, "Tags and elements must each begin and
end in the same entity...."

Received on Tuesday, 20 May 1997 19:25:07 UTC