[ http://nagoya.apache.org/jira/browse/XALANJ-1969?page=history ]
Brian Minchau updated XALANJ-1969:
----------------------------------
Attachment: node-lister.xsl
> xml:space not considered when deciding which elements to strip
> --------------------------------------------------------------
>
> Key: XALANJ-1969
> URL: http://nagoya.apache.org/jira/browse/XALANJ-1969
> Project: XalanJ2
> Type: Bug
> Components: Xalan-interpretive, XPath-function
> Versions: 2.6
> Reporter: elharo
> Attachments: 91444.xml, 91444.xsl, node-lister.xsl
>
> This report is based on OASIS Microsoft test case Whitespaces__91444. In
> breif the expected output is 22, but the actual output is 7. I'm not sure 22
> is correct, but I'm pretty sure 7 isn't. The stylesheet is as follows:
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my="http://my.com">
> <xsl:output omit-xml-declaration="yes" encoding="UTF-8" indent="no"/>
> <xsl:strip-space elements="*"/>
> <xsl:template match="/">
> <!-- Preceding query (selection) -->
> <preceding-count><xsl:value-of
> select="count(html/my:element/preceding::text())"/></preceding-count>
> </xsl:template>
> </xsl:stylesheet>
> If all white space nodes are stripped from the input document, then the
> expected output would be what Xalan gives:
> $ java
> -Xbootclasspath/p:/opt/xalan-j_2_6_0/bin/xalan.jar:/opt/xalan-j_2_6_0/bin/xercesImpl.jar:/opt/xalan-j_2_6_0/bin/xalansamples.jar
> org.apache.xalan.xslt.Process -IN 91444.xml -XSL 91444.xsl
> <preceding-count
> xmlns:my="http://my.com">7</preceding-count>~/Projects/XOM/datas$
> sis-xslt-testsuite/TESTS/MSFT_Conformance_Tests/Whitespaces
> However, the input document contains a number of white space only nodes for
> which xml:space="true", and according to section 3.4 of thre XSLT spec, these
> node should be preserved regardless.
> FYI, libxslt shares this bug; i.e. it also gives 7 as the output.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]