|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Position() of parent node
Simon Cansick wrote:
> Can anyone provide me with the syntax for getting the position() value of
> the current nodes' parent node (and the parent parent etc. position()
> value). I seem only able to return the current position().
The position() is not an intrinsic property of a node --
it only makes sense to ask for the position() of a node
_in the context of some node list_ [*].
Most likely you want the position of the parent node with
respect to its siblings, in document order; you can compute
this with:
1 + count(parent::*/preceding-sibling::*)
--Joe English
jenglish@xxxxxxxxxxxxx
[*] I'm using the term "node list" to mean "a node set with
an associated order", e.g., proximity position order,
document order, an <xsl:sort...>-defined order, etc.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








