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

Re: Whitespace

From: Joe English <jenglish@crl.com>
Date: Wed, 07 May 1997 19:15:06 -0700
Message-Id: <199705080215.AA23785@mail.crl.com>
To: w3c-sgml-wg@w3.org

Peter@ursus.demon.co.uk (Peter Murray-Rust) wrote:

> [...]
> <CML>
> <XVAR>
> A variable
> </XVAR>
> </CML>
> parses with sgmls to give a CML element which contains an XVAR element
> whose content is 'A variable'.  There are no other #PCDATA elements.
> I can include as much whitespace (space, newline) between tags as I like and
> the result is the same.
> If I write
> instead  it also validates, but gives a different result, with additional
> #PCDATA elements (content '\n') on either side of the XVAR element.  If I
> use ANY as the content model of CML it does the same.
> [...]
> If all CML documents have to be presented as
> <CML><XVAR>A variable</XVAR></CML>
> this is unworkable, [...]

AFAIK, the only way to make sure that DTD-aware and DTD-unaware
processors produce the same results in the presence of element content
is to avoid inserting any "insignificant" whitespace.

Would it be acceptable to write the instance as:

    >A variable</XVAR


Received on Wednesday, 7 May 1997 22:17:41 UTC

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