ab-serialization-prop-006
Tests that serialization property is kept if content-type does not changes.
Test is expected to pass.
The pipeline
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.0">
<p:output port="result"/>
<p:identity>
<p:with-input>
<p:inline content-type="application/json"
document-properties="map{'serialization' : map{'indent' : true()}}">"Some text."</p:inline>
</p:with-input>
</p:identity>
<p:identity>
<p:with-input select="string(.)"/>
</p:identity>
<p:identity>
<p:with-input>
<result>{exists(p:document-properties(.)?(QName('','serialization')))}</result>
</p:with-input>
</p:identity>
</p:declare-step>
Result
<result xmlns:t="http://xproc.org/ns/testsuite/3.0">true</result>
Schematron checks
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns:t="http://xproc.org/ns/testsuite/3.0" queryBinding="xslt2">
<s:pattern>
<s:rule context="/">
<s:assert test="result">The root element is not result.</s:assert>
<s:assert test="result/text()='true'">The text node in result is not equal to 'true'.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 13 Jun 2025, Achim Berndzen
- Added tests for serialization properties