[Mono-bugs] [Bug 349375] Something fish with stripping of spaces in XSLT processing

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 18 14:05:45 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=349375

User tlillqvist at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=349375#c5





--- Comment #5 from Tor Lillqvist <tlillqvist at novell.com>  2007-12-18 12:05:45 MST ---
Created an attachment (id=188106)
 --> (https://bugzilla.novell.com/attachment.cgi?id=188106)
Suggested patch, works for me

This patch seems to fix the problem, and also indeed fixes the problem in the
large actual use case (a test document from bug #347594 against odf-converter).

The patch firstly changes XslCompiledTransform's methods Transform(XmlReader,
XsltArgumentList, Stream) and Transform(XmlReader, XsltArgumentList,
TextWriter) to construct the XPathDocument passing also in XmlSpace.Preserve.
Otherwise all whitespace nodes are skipped already when reading in the document
to be transformed.

Secondly, the logic in XslTransformProcessor that checks whether whitespace
should be preserved or not based on any xsl:strip-space and xsl:preserve-space
elements present in the stylesheet is corrected. Previously the code tried to
check if the whitespace node itself is marked for space preservation or
stripping, which is wrong and pointless as whitespace nodes have no name. It is
the enclosing element that should be checked. At least, that's how I think this
should work...


-- 
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