Re: SD1 - Short End Tags [fmt]

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