You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Pascal Bricard <pb...@sambatechnologies.com> on 2000/06/15 17:25:36 UTC

Xalan C++, problem with ancestor-or-self and ancestor ?

Hello,

Using Xalan C++ (0.30, Windows version, testXSLT.exe program), i try to
retrieve the location path of an element of an XML document.

So i run the following instruction into an element template :
    <xsl:for-each select="ancestor-or-self::*">/<xsl:value-of
select="name()"/>
    </xsl:for-each>

and i get only the element node name : same result as using :
    <xsl:for-each select=".">/<xsl:value-of select="name()"/></xsl:for-each>


Then i run the following one :
   <xsl:for-each select="ancestor::*">/<xsl:value-of
select="name()"/></xsl:for-each>

and i get only the parent element node name : same result as using :
   <xsl:for-each select="..">/<xsl:value-of select="name()"/></xsl:for-each>

Is it normal ?
How can i get the full location path of an element ?

Best regards,

Pascal Bricard

-
_____________________________________________________________
  ___
 |_)_) Pascal BRICARD  e-mail: pbricard@sambatechnologies.com
 | |_)                 Phone : +33 (0) 4 76 04 00 54

       SAMBA Technologies          
 Web     : http://www.sambatechnologies.com
 Fax     : +33 (0) 4 76 04 15 98
 Phone   : +33 (0) 4 76 04 00 50
 Address : 53 chemin du Vieux Chene   38240 MEYLAN    FRANCE    
______________________________________________________________