The following comment has been added to this issue:

     Author: elharo
    Created: Fri, 24 Sep 2004 11:46 AM
       Body:
I think this issue affects the Whitespaces__91443 test case too

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XALANJ-1969?page=comments#action_53398

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XALANJ-1969

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XALANJ-1969
    Summary: xml:space not considered when deciding which elements to strip
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: XalanJ2
 Components: 
             Xalan-interpretive
   Versions:
             2.6

   Assignee: 
   Reporter: elharo

    Created: Fri, 24 Sep 2004 11:08 AM
    Updated: Fri, 24 Sep 2004 11:46 AM

Description:
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. 


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.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]

Reply via email to