Actions
Bug #3708
closedSerialization options ignored for XQuery update from command line
Start date:
2018-03-01
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Platforms:
Description
From direct email:
I have a XQuery which modifies the content of /text/a and reserves CDATA in /test/pattern of a XML file.
xquery version "3.0";
declare namespace saxon = "http://saxon.sf.net/";
declare option saxon:output "cdata-section-elements=pattern";
let $doc := doc('testCDATA.xml')
return replace value of node $doc/test/a with 'fromxquery'
The XML file testCDATA.xml :
<test>
<a>test</a>
<pattern><![CDATA[(?<=(^|[^0-9]+))([0-9]+([-]+[0-9]+)*)(?=([^0-9]+|$))]]></pattern>
</test>
It works well in oXygen 19.1 with Saxon-EE 9.7.0.19
But if I run it with the Saxon (Saxon-EE 9.8.0.6J) command:
java -cp saxon9ee.jar net.sf.saxon.Query -t -backup:off -update:on -q:testCDATA.xquery
"CDATA" is get rid of the XML. It seems that options of serialization are not taken in Saxon for an update of the same file. If I missed something or it's a problem of Saxon?
Please register to edit this issue
Actions