[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: finding position() in xpath 1.0
> but i know current() is not valid there because it's 2.0. No, it's not in Xpath 2 either. It's an XSLT-supplied function only available in XSLT implementations of XPath (both versions 1 and 2) It wouldn't do what you want actually, as it returns the position of the node at the start of the expression evaluation, which is probably / with position 1 in this case. Almost certainly any host language that allows you to call xpath will allow you to bind variables, so the following isn't needed, but it is, I think, what you asked for. //CELL[@test='yes']/../preceding-sibling::ROW/CELL[position()=count(//CELL[@test='yes']/preceding-sibling::CELL)+1] 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
|