[xquery-talk] Using a string parameter as path expression
mrys at microsoft.com
Mon Feb 14 10:46:20 PST 2005
No you cannot do this.
You would need a dynamic eval functionality that we have postponed to a
From: talk-bounces at xquery.com [mailto:talk-bounces at xquery.com] On Behalf
Of Mathias Seifert
Sent: Monday, February 14, 2005 10:31 AM
To: talk at xquery.com
Subject: [xquery-talk] Using a string parameter as path expression
I have a question for a rather simple task which I couldn't find any
solution to. What I want to have is a function that takes an xpath as
string parameter and then evaluates this xpath on a document. This could
look something like the following:
declare function local:evalPath($path as xs:string) as node()
let $a := doc("sample.xml")/$path
Unfortunately I couldn't get this simple function to work, so my
question now is: Is it possible with xquery at all to have a variable as
the path expression of a for/let clause? And if so, how?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk