cast-content-type 028

Tests that a c:data document is decoded if cast to XML.

Test ab-cast-content-type-028.xml is expected to pass.

The pipeline


<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" 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>

Schematron validation


<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" 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.