| 
 
Subject: Re: [xsl] Equivalence between XSL and XPath expression From: Geert Josten <Geert.Josten@xxxxxxxxxxx> Date: Sat, 11 Dec 2004 22:24:52 +0100  | 
I would have guessed that the 'equivalent' would have been:
    count(self::menu)+count(preceding::menu)Cheers, Geert
And the question is: Is this XPath expression
count(./ancestor-or-self::menu)+count(./preceding::menu)
equivalent to this XSL expression?
<xsl:variable name="position"> <xsl:number level='any' count="menu"/> </xsl:variable>
Almost. xsl:number will never return 0, but the XPath expression might. Take a look at the XSLT 2.0 spec which defines xsl:number in terms of equivalent XPath expressions.
Michael Kay http://www.saxonica.com/
-- Geert.Josten@xxxxxxxxxxx IT-consultant at Daidalos BV, Zoetermeer (NL)
http://www.daidalos.nl/ tel:+31-(0)79-3316961 fax:+31-(0)79-3316464
| Current Thread | 
|---|
 
  | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] Equivalence between XSL a, xptm | Thread | Re: [xsl] Equivalence between XSL a, Dimtre Novatchev | 
| RE: [xsl] More tutorials about XSL, George James | Date | Re: [xsl] Equivalence between XSL a, Dimtre Novatchev | 
| Month |