[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Getting previous node in nodeset
On 22/04/2011 02:28, Steve Fogel wrote:
Hi, all...nodesets are an xpath1 data type not in xpath2, which is relevant to your question as being sets their items are not ordered. Xpath2 datatype is sequence which is an ordered list, I think you want <xsl:sequence select="$nodelist[index-of($nodelist,$mynode)-1] This assumes that it is node that $mynode occurs exactly once, otherwise you'd need to add some error checking and fallback. David
|
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
|