Re: [xsl] Finding the path to a node

Subject: Re: [xsl] Finding the path to a node
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Fri, 11 May 2007 15:49:49 +0200 (CEST)
David Carlisle wrote:

  Hi

> //page[@id='4']/ancestor:node()"

> is the sequence (or set in XSLT 1) of 4 nodes
> <pages> <page id="1">  <page id="2"> <page id="4">

  More precisely, this is what you get with:

    //page[@id='4']/ancestor-or-self::node()

With the ancestor axis, you don't get the current item.  A word about
the order, too: the order shown is correct (in the document order) as
the result of the step, but inside the predicate the order is opposite
(the first one is the parent, the last one the top-most ancestor).

  Regards,

--drkm




















      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

Current Thread