[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XPath context evaluation
> In the meantime I found a nearly trivial solution which lets > my keep my > environment: > > "subsequence(//info,index-of(//info/id, .), 1)" > > These functions were easy to implement and solved the issue I > had. Since performance doesn't count for this use case I am > glad it works :-) This isn't 100% equivalent to //info[id = current()], unless you make assumptions about the data, for example that there is no more than one match. But if you're using XPath 2.0, then what's wrong with for $x in . return //info[id = $x] (which is equivalent: in fact it's essentially what Saxon compiles the original code into) Michael Kay http://www.saxonica.com/
|
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
|