Anyone know what's changed in xdmp:unquote when moving from 0.9-ml to
1.0-ml?
xquery version "0.9-ml"
let $value := <value>one <b>two</b> three</value>
return xdmp:unquote($value/node())
=>
<v:results v:warning="more than one node">
one
<b>two</b>
three
</v:results>
xquery version "1.0-ml";
(: same code as above :)
let $value := <value>one <b>two</b> three</value>
return xdmp:unquote($value/node())
=>
[1.0-ml] XDMP-DOCROOTTEXT: xdmp:unquote("one <b>two</b> three") --
Invalid root text "one "
This works:
xquery version "1.0-ml";
let $value := <value>one <b>two</b> three</value>
return xdmp:unquote(concat('<t>', $value/node(), '</t>'))
=>
<t>
one
<b>two</b>
three
</t>
However, appending /node() doesn't change the output. I would expect
<t> and </t> to vanish:
xquery version "1.0-ml";
let $value := <value>one <b>two</b> three</value>
return xdmp:unquote(concat('<t>', $value/node(), '</t>'))/node()
=>
<t>
one
<b>two</b>
three
</t>
These examples were run on CQ, using MarkLogic 4.0-3, linux x86_64.
Eric
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general