DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=30197>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30197 <xsl:output method="text" affects result tree construction Summary: <xsl:output method="text" affects result tree construction Product: XalanJ2 Version: 2.6 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: org.apache.xalan AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The xsl:output method="text" is supposed to apply only when the result tree is serialized. However, I'm seeing an effect on a pure in-memory transformation that is driven through TrAX and not serialized. Consider this transform <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- test a stylesheet that use method="text" --> <xsl:output method="text"/> <xsl:template match="/"> <element1>12345</element1> <element2>67890</element2> <element3/> <element4>0987654321</element4> <xsl:comment>test</xsl:comment> <xsl:processing-instruction name="test">PIs are not treated as literals in XSLT?</xsl:processing-instruction> </xsl:template> </xsl:stylesheet> It should produce a result tree containing six child nodes of different kinds, element, comment, and processing instrcution and in some earlier versions of Xalan this is what happens. However, in the current version it produces a single text node containing all the element content. The elements, comments, and PIs should be reduced to plain text only when the document is serialized, not before. Xalan appears to be jumping the gun when the output method is text and incorrectly assuming that it can generate a single text node. In fact, it should not do this is the output is not serialized. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
