Aaah, not the double quotes. Thanks Charles! 

-Will

From: Charles Greer <[email protected]>
Organization: MarkLogic Corporation
Reply-To: MarkLogic Discussion <[email protected]>
Date: Wednesday, February 20, 2013 4:24 PM
To: MarkLogic Discussion <[email protected]>
Subject: Re: [MarkLogic Dev General] Dynamically building a structured query

Hi Will,

What's wrong with double quotes?

Are you looking to encode the whole shebang? How about

concat($url, 
       $path, 
       "?options=uris&amp;structuredQuery=",
       xdmp:url-encode(xdmp:quote($structured-query-xml)))

Charles


On 02/20/2013 04:06 PM, Will Thompson wrote:
This is kind of a pedantic style-related question, but I am building a 
structured query and want to submit it to the REST values endpoint. However, 
that endpoint doesn't like double quotes, so I can't do something tidy like: 
concat($url, $path, "?options=uris&amp;structuredQuery=", 
xdmp:quote($structured-query-xml)) because xdmp:quote outputs double quotes for 
the namespace declaration. I tried POSTing the XML, but the values endpoint only 
accepts GET requests (?). I couldn't find an option to force xdmp:quote to 
serialize attributes using single quotes (maybe that’s not technically allowed?).

Is there a better way to approach this, or is my best option to just replace the 
double quotes from xdmp:quote output?

-Will




_______________________________________________
General mailing list
[email protected]http://developer.marklogic.com/mailman/listinfo/general

-- 
Charles Greer
Senior Engineer
MarkLogic Corporation
[email protected]
Phone: +1 707 408 3277
www.marklogic.com
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to