On Tue, 14 Oct 2014 12:28:52 -0700, David Sewell <dsew...@virginia.edu>  
wrote:

> Given this code:
>
> xquery version "1.0-ml";
> declare option xdmp:output "indent-untyped=yes";
> declare option xdmp:output "omit-xml-declaration=yes";
> xdmp:document-insert(
>    "/test.xml",
>    <doc>
>      <line>line 1</line>
>      <line>line2</line>
>    </doc>
> ) ;
>
> doc("/test.xml")
>
> The output I'm getting is
>
> <?xml version="1.0" encoding="UTF-8"?>
> <doc><line>line 1</line><line>line2</line></doc>
>
> which is disobeying both serialization optinons I specified. ML version  
> 7.0-4.
> Are other people seeing this? Am I missing something?
>
> David
>


Two things:
(1) If you are running this in QConsole all bets are off, because the  
serialization
options apply in the query that does the serialization and everything in  
QConsole
is run in a separate eval.

(2) The serialization options are before the semi-colon, that is, they  
only apply to
the xdmp:document-insert part of this file. If you want them to apply to  
the
serialization of doc("/test.xml") you need to put them into that query.

//Mary
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to