Re: xpath string as parameter from java
Natascia De Bortoli <[email protected]>
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
I hope it isnt't too later to thank you for your response... .
I've tryed use exsl:evaluate(), as you wrote, but it seemed not to be ok
so I have had to use a simple string substitution: it isn't the best
solution but the involved code is short.
Thank you for your tips.
Nat
Mike Brown wrote:
>Mike Brown wrote:
>
>
>>Natascia De Bortoli wrote:
>>
>>
>>>Hello at all!!
>>>I need a method to pass a string as an XPATH query to a xsl file.
>>>
>>>
>>If you are using a processor that natively supports exsl:evaluate(),
>>then you can pass the XPath expression, as a string, as a stylesheet
>>parameter. Your Java code is fine. Instead of using exsl:node-set()
>>in your XSLT, you need to use exsl:evaluate(). I hope this helps.
>>
>>
>
>Sorry, I meant dyn:evaluate() ... the prefix ('dyn' vs 'exsl') does
>not matter, but the namespace it is bound to is important. It needs
>to be "http://exslt.org/dynamic"
>
>The function is described at
>http://exslt.org/dyn/functions/evaluate/index.html
>
>Note that the only Java XSLT processor listed as supporting it is Xalan-J.
>Saxon supports it only as saxon:evaluate() ... the namespace must be
>"http://saxon.sf.net/"
>
>_______________________________________________
>exslt mailing list
>[email protected]
>http://www.exslt.org/list
>
>
>