[Bug 1309] white space in the DM

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1309





------- Additional Comments From davidc@nag.co.uk  2005-09-21 16:41 -------
Just an additional comment to confirm that these issues are not addressed in the
new drafts.

As an example of the incompatiblity this introduces between XPath 1 and 2 (that
is still not documented in the incompatibilities section) consider

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="text"/>

<xsl:template match="x">
<xsl:copy-of select="node()[position() mod 2 = 0]"/>
</xsl:template>
 
</xsl:stylesheet>


applied to

<!DOCTYPE x [
<!ELEMENT x (y*)>
<!ELEMENT y (#PCDATA)>
]>
<x>
 <y>s</y>
 <y>kill </y>
 <y>ti</y>
 <y>me </y>
</x>



With a 1.0 processor one gets the output
skill time
with a 2.0 processor as specified here you would get the output
kill me


Having the same construct work  _without error_ in version 2 but produce
radically different output to version 1 is something that should be avoided
if at all possible, and documented _very_ clearly if it is impossible to avoid
the incompatibility.

Received on Wednesday, 21 September 2005 16:46:03 UTC