cast-content-type 028
Tests that a c:data document is decoded if cast to XML.
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" name="pipeline" version="3.0">
<p:output port="result"/>
<p:cast-content-type content-type="application/xml">
<p:with-input>
<c:data xmlns:c="http://www.w3.org/ns/xproc-step"
encoding="base64" content-type="application/xml">PGRvYy8+</c:data>
</p:with-input>
</p:cast-content-type>
</p:declare-step>
Result
<doc xmlns:t="http://xproc.org/ns/testsuite/3.0"/>
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="doc">The root element is not 'doc'.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 01 Feb 2025, Norm Tovey-Walsh
- Test casting from c:data to XML.