[Prev][Next][Index][Thread]

Re: Element content the real issue?...




Paul Prescod <papresco@calum.csclub.uwaterloo.ca> wrote:

> David G. Durand"  wrote:
> >[...] for XML, we have a problem with any kind of space
> >elimination in element content when used with DTD-less processing. It's
> >easy to use my approach with SGML, but with XML, there is a real problem
> >because without a DTD, we can't tell the difference between element content
> >and other content.
>
> According to the proposal:
>
> 1. All white space, including RS and RE, immediately following start tags and
>    immediately preceding end tags is not significant.
>
> >  So, contra your claim, and my previous assumptions, RE handling is not
> >the key issue here.  Whatever we decide on RE processing we will still have
> >to deal with element content in a nasty way because of other whitespace
> >being treated as data.
>
> I believe that the proposal handles this in an SGML-compatible way.
>


What about (where '@' denotes an RE and '.' denotes a space):

    <aaa>@
    ...<bbb>XXX</bbb>@
    ...<ccc>XXX</ccc>@
    </aaa>@

The RE and space characters preceding the CCC element
are not deemed insignificant by rule 1, whereas an
SGML parser would treat them as such if AAA had
element content.


--Joe English

  jenglish@crl.com


References: