uuid 012 (AB)

Testing p:uuid switches content-type for text only document.

Test ab-uuid-012.xml is expected to pass.

The pipeline


      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
         <p:output port="result"/>
         
         <p:uuid match="element">
            <p:with-input>
               <p:inline document-properties="map{'serialization':map{},                   'bonus-prop':'prop',                   'base-uri': 'http://base'}">
                  This is a text.
                  <element xmlns="">This will be overwritten</element>
                  This is a text.
               </p:inline>
            </p:with-input>
         </p:uuid>
         <p:identity>
            <p:with-input select="p:document-properties-document(.)"/>
         </p:identity>
      </p:declare-step>
   
MorganaXProc passing XML Calabash failing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
         <s:pattern>
            <s:rule context="/">
               <s:assert test="c:document-properties">Root element is not c:document-properties</s:assert>
               <s:assert test="c:document-properties/base-uri/text()='http://base'">Base-uri properties is not 'http://base'.</s:assert>
               <s:assert test="c:document-properties/bonus-prop/text()='prop'">Property 'bonus-prop' is not preserved.</s:assert>
               <s:assert test="c:document-properties/content-type/text()='text/plain'">Content type is not 'text/plain'.</s:assert>
               <s:assert test="not(c:document-properties/serialization)">There should be no element 'serialization'.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

16 Jun 2019, Achim Berndzen

Tests for p:uuid