Re: new line handling (DOMBuilder and DOMSerializer)

Details of how an XML processor should handle line breaks can be found in
the XML Recommendation. See
      http://www.w3.org/TR/REC-xml#sec-white-space
      http://www.w3.org/TR/REC-xml#sec-line-ends
      http://www.w3.org/TR/REC-xml#AVNormalize
      http://www.w3.org/XML/xml-V10-2e-errata (see E59. E50)

XML 1.1 (Candidate Recommendation can be seen at
http://www.w3.org/TR/xml11/) proposes adding yet another variant -- the NEL
character (originally from EBCDIC) -- which should also be normalized to
newline.


Newline normalization is not optional. Newlines are always converted to the
XML newline, which happens to be the same as the Unix newline (Unicode x10,
ASCII LF character).

The DOMBuilder should conform to those rules. If it doesn't, it's broken.

A serializer can convert the XML newline character to any of these.
Typically it will use whatever representation is native for the platform
this application is running on, but it isn't required to do so, or even to
be consistant, since normalization will convert these all back to standard
form.



Questions about differences in how an XSLT processor should respond to the
directives you gave should be sent to the XSLT Working Group rather than
the DOM Working Group; that's outside the scope of the DOM. (It may also be
affected by other detals of the stylesheet, such as what parameters have
been set in xsl:output.)

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk

Received on Monday, 4 August 2003 19:06:07 UTC