W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > May 1997

Re: SD1 - Short End Tags [fmt]

From: Matthew Fuchs <matt@wdi.disney.com>
Date: Wed, 21 May 1997 09:18:38 -0700
Message-Id: <9705210918.ZM22787@scrumpox.rd.wdi.disney.com>
To: Joe English <jenglish@crl.com>, w3c-sgml-wg@w3.org
On May 20,  7:12pm, Joe English wrote:
> Subject: Re: SD1 - Short End Tags [fmt]
>
> Matthew Fuchs <matt@wdi.disney.com> wrote:
>
> > Isn't this possible:
> >
> > <?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>
>
>
> Not in XML.
>
> Section 4.1 "Logical and Physical Structures" says that
> ``[...] Tags and elements must each begin and end in the same
> entity [...]''.  By my interpretation this makes the above
> example illegal, since the FIRSTNAME element starts in
> the 'of' entity, its content is in the main (document) entity,
> and it ends in the 'cf' entity.
>
> (I interpret section 4.1 to mean, essentially, that "element
> boundaries must not cross entity boundaries."   I think this
> is a sensible and useful restriction, but clarifications are
> welcome.)
>
I interpret this as trying to enforce a particular top-down parsing model.  At
the risk of appearing pedantic, the following revision appears to be legal:>

<?XML version="1.0" RMD='INTERNAL'?>
<!doctype bogus [
<!entity a "firstname">
<!entity b "/firstname">
<!entity c "lastname">
<!entity d "/lastname">
]>
<author>
  <&a;>foo<&b;>
  <&c;>bar<&d;>
</author>

Matthew Fuchs
matt@wdi.disney.com

-- 
Received on Wednesday, 21 May 1997 12:17:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:26 UTC