re: Apps folder that I run through the browser (http://localhost:8000/export.xqy )
Could you post that xquery and instead of using a brower use curl or some other direct HTTP method ? It should not require 'post processing' ----------------------------------------------------------------------------- David Lee Lead Engineer MarkLogic Corporation [email protected] Phone: +1 812-482-5224 Cell: +1 812-630-7622 www.marklogic.com<http://www.marklogic.com/> From: [email protected] [mailto:[email protected]] On Behalf Of Schouten, Edgar J. (RB-NL) Sent: Tuesday, October 20, 2015 10:28 AM To: MarkLogic Developer Discussion <[email protected]> Cc: Moolen, Hubert G.M. van der (RB-NL) <[email protected]> Subject: Re: [MarkLogic Dev General] cdata-section-elements option doesn't produce CDATA-values Hi Florent Thanks for your reply. I can temporarily bypass the problem by manually changing replacing 'fake' <CDATA>-fields by <![CDATA[-fields as a post-proces. The import in the application works fine after the replacement. I've put a output.xqy file in my Marklogic-Apps folder that I run through the browser (http://localhost:8000/export.xqy ) The file basicly creates a node and saves it (simplified). I added the cdata-section-element also to the options of xdmp:save. xquery version "1.0-ml"; declare option xdmp:output "cdata-section-elements=rules"; let $myVart := 1 return xdmp:save ( "C:\LocalDisk\test.xml", <TeragramDirectoryStructureV3> <myElement>{$myVar}</myElement> </TeragramDirectoryStructureV3>, <options xmlns="xdmp:save"> <output-encoding>utf-8</output-encoding> <cdata-section-elements>myElement</cdata-section-elements> </options> ) -----Oorspronkelijk bericht----- Van: [email protected]<mailto:[email protected]> [mailto:[email protected]] Namens Florent Georges Verzonden: dinsdag 20 oktober 2015 16:10 Aan: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Onderwerp: Re: [MarkLogic Dev General] cdata-section-elements option doesn't produce CDATA-values On 20 October 2015 at 15:45, Schouten, Edgar J. (RB-NL) wrote: Hi, > This application requires <![CDATA[-fields Which means it is not expecting XML. CDATA is syntactic sugar. Whether it is used or not, equivalent XML documents should be treated the same (regardless of CDATA sections). Not everything has to be XML, so it might be OK, but often "issues" with CDATA are an application configured the wrong way and rejecting well-formed XML when it should not. > declare option xdmp:output "cdata-section-elements=myElement"; This can be applied only if the serializer gets into play. How are you evaluating the query, and how are you saving (or displaying) its result? Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ _______________________________________________ General mailing list [email protected]<mailto:[email protected]> Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
