You can escape curly brackets in XQuery with another of the same type of curly
brackets. For example:
let $s := <foo>${{bar}}</foo>
return
xdmp:document-insert("/test.xml", $s);
doc("/test.xml")
=>
<?xml version="1.0" encoding="UTF-8"?>
<foo>${bar}</foo>
-Danny
From: [email protected]
[mailto:[email protected]] On Behalf Of Jenny Wang
Sent: Monday, August 03, 2015 2:33 PM
To: [email protected]
Subject: [MarkLogic Dev General] How to escape ${} in document-insert
Classification: Public
I need to insert a document to ML, the document has something like
${error_message} which ML takes it as a defined variable. How can I escape this?
Jenny
---
This communication may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this communication in
error) please notify the sender immediately and destroy this communication. Any
unauthorized copying, disclosure or distribution of the material in this
communication is strictly forbidden.
Deutsche Bank does not render legal or tax advice, and the information
contained in this communication should not be regarded as such.
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general