xsl-list
[Top] [All Lists]

RE: Navigation using XPath

2002-11-13 02:46:26
Thanx for the info. But what I want to know is if we don't know the
exact position of the current element like *[1] how do I go the next or
previous element from the current position (assuming that I don't know
the exact position number). Can I say something like 

*[position()=current()] OR following::*[position()=current()] OR
preceding::*[position()=current()]

Will it work ?

Thanx,
Chitra

-----Original Message-----
From: Jarno(_dot_)Elovirta(_at_)nokia(_dot_)com 
[mailto:Jarno(_dot_)Elovirta(_at_)nokia(_dot_)com] 
Sent: Wednesday, November 13, 2002 5:10 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Navigation using XPath


Hi,

1> Go to the first element (e.g like position() = first()..)

First of what? Of document

/*

or first child element

*[1]

2> Go to the next element after the current element (e.g position() =
next().. )

following::*[1]

3> 2> Go to the previous element after the current element (e.g
position() = previous().. )

preceding::*[1]

4> Go to the next sibling element from the current position.

following-sibling::*[1]

Jarno - In Strict Confidence: Zauberschloss (mechanical fairy tale rmx)

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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