[Home] [By Thread] [By Date] [Recent Entries]
Michael Kay wrote:
(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) = (.)]". Thanks for the response, that's the information I was missing. I have attached a mapping file as an example to show why I am restricted to XPath. My current setup included dom4j and Jaxen with some special extensions, after some digging though it's mailing list it seems as it's not possible to implement a "current()" function for Jaxen. Having tried the JAXP's default implementation I've seen that it can use "current()" within DOM. However I am not sure about porting the extensions I had previously written for Jaxen. Saxon seemed a better approach but I still have to find a way to trick around its strictness ;-) : Caused by: net.sf.saxon.trans.StaticError: XPath syntax error at char 21
in {//info[id = current()]/}:
Cannot use the current() function in a non-XSLT contextBTW, where would I register my own functions? Victor ------------------------------------------------------------------ <?xml version="1.0" encoding="UTF-8"?> <mapping> <element target-name="SomeOverview" xpath="//someList[1]"> <repeatable target-name="Data" xpath="some">
<data target-name="Readme" xpath="readme"/> <repeatable target-name="Entries" xpath="//info[id =
current()/idList/id]">
<data target-name="Name" xpath="name"/>
<data target-name="ID" xpath="id"/> <data target-name="selected" xpath="string('1')"/>
</repeatable></repeatable> </element> </mapping>
|

Cart



