DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6072>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6072

XSLTC treats 'select' attribute incorrect if used in <xsl:variable> element

           Summary: XSLTC treats 'select' attribute incorrect if used in
                    <xsl:variable> element
           Product: XalanJ2
           Version: 2.2.0
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


A small example to show the bug:

XML input file:

<?xml version="1.0" encoding="UTF-8"?>
<root>
        <A x="1"></A>
        <B x="2"></B>
</root>

XSL file :

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <xsl:template match="/root/B">
                <xsl:variable name="foo" select="preceding-sibling::*[position()
=1]/@x"></xsl:variable>
                <xsl:value-of select="$foo"></xsl:value-of>
                =
                <xsl:variable name="bar">
                        <xsl:value-of select="preceding-sibling::*[position()
=1]/@x"/>
                </xsl:variable>
                <xsl:value-of select="$bar"></xsl:value-of>
        </xsl:template>
</xsl:stylesheet>

Both variations of the usage of the select attribute should cause the same 
result. But they don't.

The ouput of this using a normal Xalan transformation is: '1=1', while the 
compiled translet gives '=1' aus result.

Reply via email to