xsl-list
[Top] [All Lists]

Re: <xsl:number> in XPath

2004-12-10 05:30:54
I wonder if my messages are getting to the list, cause it seems strange no one
is replying, and also i've received a "ezmlm warning" from the list-owner, so i
don't know what's going on.

Can someone please answer this just to get sure?

Thanks.

Citando António Mota <xptm(_at_)sapo(_dot_)pt>:

Dave's answer

(//menu)[$pos]

select the node at absolute position $pos. Now i want the other way around,
giving a node, what is it's absolute position in the tree? I think the answer
will be

count(menu/ancestor-or-self::menu)+count(menu/preceding::menu)

that should return the same value as

<xsl:number level='any' count="menu"/>

Am i correct?


Citando António Mota <xptm(_at_)sapo(_dot_)pt>:

Searching the archives i found that

<xsl:number level="any" count="*" from="parent"/>

will give the "absolute position" of a node in the tree.

How can i use a similar expression on a XPath expression?

Something like

select="//menu[absoluteposition()=$pos]


where pos is a paramater number?

Thanks.




O SAPO já está livre de vírus com a Panda Software, fique você também!
Clique em: http://antivirus.sapo.pt

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--







O SAPO já está livre de vírus com a Panda Software, fique você também!
Clique em: http://antivirus.sapo.pt

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>