Subject: RE: [xsl] Equivalence between XSL and XPath expression From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Fri, 10 Dec 2004 20:05:31 -0000 |
> 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/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Equivalence between XSL and X, António Mota | Thread | Re: [xsl] Equivalence between XSL a, xptm |
[xsl] Equivalence between XSL and X, António Mota | Date | [xsl] Counting sub-nodes per page i, Anthony DiSalvo |
Month |