Hi Tim,

Try xdmp:value("$doc" || $path).

Thanks.

-jb

From: Tim <[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Tuesday, May 12, 2015 at 4:01 PM
To: 'MarkLogic Developer Discussion' 
<[email protected]<mailto:[email protected]>>
Subject: [MarkLogic Dev General] Dynamically creating an xpath expression in 
xquery

Hi Folks,

What’s the best way to dynamically create and access the value of a field give 
a document and the xpath, e.g.

let $doc := doc(“/record.xml”)
let $path := “/xyz:root/xyz:name
return the concatenation of the two…

Thank you!

Tim M.
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to