W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2003

new line handling (DOMBuilder and DOMSerializer)

From: Christian Parpart <cparpart@surakware.net>
Date: Tue, 5 Aug 2003 00:23:57 +0200
To: www-dom@w3.org
Message-Id: <200308050024.02295.cparpart@surakware.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

we got a serious problem on de.comp.text.xml about newline handling inside 
XSLT.

<xsl:text>
</xsl:text>
<xsl:text>&#10;</xsl:text>
<xsl:text>&#10;&#13;</xsl:text>
<xsl:text>&#13;/>
<xsl:value-of select="'&#10;"/>
<xsl:value-of select="'&#10;&#13;'"/>
<xsl:value-of select="'&#13;'"/>

These are the 7 ways how to create a newline in the XSLT result tree.

Now, why I am asking right here, is, because I wanna know how the DOMParser 
(DOMBuilder) should handle theses character references inside text nodes and 
inside attribute nodes, and the newline-literal shown first.

The xml recommendation tells that a newline shall be always represented as 
0x10 literal and though be passed from the DOMBuilder to the application as 
0x10. But will all versions above really work?

Someone tested version 2, 3, and 4 with msxml, saxon, and libxml2/libxslt and 
got very different results.

Is newline normalization part of character normalization and though optional 
or should it be performed *ALWAYS*? 

Should *ANY* newline variant be interpreted as the UNIX newline variant?
Or is this part of the DOMSerializer to perform the normalization of newlines 
into the environment-specific newline form?

The XSLT spec doesn't mention these cases above, the XML rec doesn't neither. 
So, I hope this is part of DOM3 LS to specify how to build/serialize newline 
characters ;)

Many many thanks,
Christian Parpart.

- -- 
 00:06:55 up 76 days, 15:11,  1 user,  load average: 1.74, 1.31, 0.66
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/Lt0APpa2GmDVhK0RAkYnAJ9Cl8pnvMtGAbm8qaZiZmCPV1bl6wCfdJVU
dklfUYmi0yTno8MgUAlywPw=
=i/Vs
-----END PGP SIGNATURE-----
Received on Monday, 4 August 2003 18:19:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:57 GMT