Subject: Re: [xsl] Equivalence between XSL and XPath expression From: xptm <xptm@xxxxxxx> Date: Sat, 11 Dec 2004 00:54:19 +0000 |
How can the XPath return 0, if has a context node (.) and has the self axis in ancestor-or-self? This way it has to return at least 1!
I think you are assuming the context node is a menu element. There's no reason to assume that. If the context node is the root (document) node (for example) the XPath expression will return 0.
Michael Kay
http://www.saxonica.com/
Michael Kay wrote:
expression might. TakeAnd the question is: Is this XPath expressionAlmost. xsl:number will never return 0, but the XPath
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>
a look at the XSLT 2.0 spec which defines xsl:number interms of equivalent
XPath expressions.
Michael Kay http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Equivalence between XSL a, Michael Kay | Thread | Re: [xsl] Equivalence between XSL a, Dimtre Novatchev |
RE: [xsl] Equivalence between XSL a, Michael Kay | Date | Re: [xsl] Equivalence between XSL a, Dimtre Novatchev |
Month |