[Mono-bugs] [Bug 482755] When XSL output is text, transformation does not output <xsl:text> </xsl:text>
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Mar 16 12:52:59 EDT 2009
https://bugzilla.novell.com/show_bug.cgi?id=482755
User atsushi at ximian.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=482755#c1
Atsushi Enomoto <atsushi at ximian.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Atsushi Enomoto <atsushi at ximian.com> 2009-03-16 10:52:58 MST ---
To read W3C XSLT 1.0 specification carefully, you will understand that it is
not a bug. Section 7.2 clearly explains that "Literal data characters may also
be wrapped in an xsl:text element. This wrapping may change what whitespace
characters are stripped (see [3.4 Whitespace Stripping]) but does not affect
how the characters are handled by the XSLT processor thereafter.", and the
referenced section 3.4 explicitly says such whitespace-only text node is
stripped:
<quote>
A text node is preserved if any of the following apply:
* The element name of the parent of the text node is in the set of
whitespace-preserving element names.
* The text node contains at least one non-whitespace character. As in XML,
a whitespace character is #x20, #x9, #xD or #xA.
* An ancestor element of the text node has an xml:space attribute with a
value of preserve, and no closer ancestor element has xml:space with a value of
default.
Otherwise, the text node is stripped.
</quote>
Moreover, .NET does remove such whitespace text. Here is a repro xsl:
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/foo">
<xsl:text> </xsl:text>
</xsl:template>
</xsl:transform>
and instance:
<root />
If .NET still outputs whitespaces, then there is a bug *in .NET*, not in Mono.
In such case, you should file a bug against Microsoft.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list