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>

Hash: SHA1


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

<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
Version: GnuPG v1.2.2 (GNU/Linux)

Received on Monday, 4 August 2003 18:19:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:11 UTC