[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XPath context evaluation
I apologize for hijacking the XSL list for XPath questions, I wish there would be some kind of XPath list .. I have written some XSL-like application (maybe a bit more like FOP) which uses the results of XPath expression as trigger for further processing: The attached file is a stripped down example of an XML file I would like to process. At some point I am iterating over the <some> element and it's children. I would like to retrieve the associated <info> element from the <infoList> for a given <id> element in the <idList>. Since the application is agnostic about the data it reads I want to use an XPath expression to find the correct element. Using a string as '123' (e.g. "//info[id = '123']" ) shows no issues, however I am not able to use the current context (one of the <id> elements in the <idList>) to evaluate an XPath expression as "//info[id = .]" or "//info[string(id) = (.)]". Am I missing something obvious, is this a restriction of XPath? Kindest regards, Victor ------------------------------------------------------
|
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
|