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=4278>.
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=4278

axis navigation

           Summary: axis navigation
           Product: XalanJ2
           Version: 2.1.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xalan
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Problem with preceding-sibling axis specification. I have compared the results 
of this bug with another parser which operates as expected. The following line 
of code should output the name of the parent's preceding sibling but it doesn't 
output anything.

<xsl:value-of select="name(parent::node()/preceding-sibling::node())"/>

Start of XSL
------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:fo="http://www.w3.org/1999/XSL/Format";>
        <xsl:template match="one">
                <xsl:apply-templates select="descendant::*"/>
        </xsl:template>
        <xsl:template match="five">
                <br/>parent name:<xsl:value-of select="name(parent::node())"/>
                <br/>parent's preceding-sibling name:<xsl:value-of select="name
(parent::node()/preceding-sibling::node())"/>
                <br/>parent's parent name:<xsl:value-of select="name
(parent::node()/parent::node())"/>
                <br/>name<xsl:value-of select="name(.)"/>
        </xsl:template>
</xsl:stylesheet>
End of XSL
------------

Start of XML
------------
<?xml-stylesheet type="text/xsl" href="E:\b.xsl"?>
<one>
        <two name="two_1">
                <three name="three_1">
                        <four1 name="four1_1">
                                <five name="five_1"/>
                        </four1>
                        <four2 name="four2_2">
                                <five name="five_2"/>
                        </four2>
                        <four3 name="four3_3">
                                <five name="five_3"/>
                        </four3>
                </three>
                <three name="three_2">
                        <four name="four_3">
                                <five name="five_5"/>
                        </four>
                        <four name="four_4">
                                <five name="five_6"/>
                        </four>
                </three>
        </two>
</one>
End of XML
------------


Cheers 
Tom Hall

Reply via email to