Serialized results
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"
serialization="map{'method':'xml', 'indent':false(), 'cdata-section-elements': 'code'}"/>
<p:identity>
<p:with-input>
<doc>
<p>This is some <code>XML</code>
</p>
</doc>
</p:with-input>
</p:identity>
</p:declare-step>
Result
<serialization xmlns:t="http://xproc.org/ns/testsuite/3.0"><?xml version="1.0" encoding="UTF-8"?><doc>
<p>This is some <code><![CDATA[XML]]></code></p>
</doc></serialization>
Schematron checks
<s:schema xmlns="http://www.w3.org/1999/xhtml"
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="serialization">The pipeline result is not serialized</s:assert>
</s:rule>
</s:pattern>
<s:pattern>
<s:rule context="/serialization">
<s:assert test="contains(., 'code><![CDATA[XML]]')">The code element was not serialized as a cdata section</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 07 May 2026, Norman Tovey-Walsh
- Demonstrate a test-suite extension to support checking serialized results