Contenttypes 006

Tests that output port with no @content-types accepts non-XML document.

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" xmlns:test="http://test" version="3.0">
   <p:output port="result"/>
   <p:declare-step type="test:step">
      <p:output port="result"/>
      <p:identity>
         <p:with-input>
            <p:inline content-type="text/plain">text</p:inline>
         </p:with-input>
      </p:identity>
   </p:declare-step>
   <test:step/>
   <p:wrap-sequence wrapper="result"/>
</p:declare-step>

Result

<result xmlns:t="http://xproc.org/ns/testsuite/3.0">text</result>

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:ns uri="http://www.w3.org/ns/xproc" prefix="p"/>
   <s:ns uri="http://www.w3.org/ns/xproc-step"
         prefix="c"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="result">Root element is not result.</s:assert>
         <s:assert test="/result/text()='text'">The root element does not have the right text child.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen
Added attribute 'queryBinding' to schematron's schema.
12 Oct 2018, Achim Berndzen
Fixing broken test (namespace removed)
03 Oct 2018, Achim Berndzen
Corrected default of @content-types to be *.*
07 Jul 2018, Achim Berndzen
=Adapted tests to PR #422
02 Jun 2018, Norman Walsh
Fix namespace declarations
02 May 2018, Achim Berndzen
Change test with document-properties to map{xs:QName, item()}
25 Apr 2018, Achim Berndzen
More tests.