ab-document-properties-document-004

Tests document-properties-document for a variable set via doc()

Test ab-document-properties-doc004.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:variable name="var" select="doc('../documents/ab-doc.xml')"/>
      
         <p:identity>
            <p:with-input>
               <result xmlns="">{p:document-properties-document($var)}</result>
            </p:with-input>
         </p:identity>

      </p:declare-step>
   
MorganaXProc passing XML Calabash passing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:ns prefix="p" uri="http://www.w3.org/ns/xproc"/>
         <s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
         <s:pattern>
            <s:rule context="/">
               <s:assert test="result">The document root is not result.</s:assert>
               <s:assert test="/result/c:document-properties">The root has no child document-properties.</s:assert>
               <s:assert test="/result/c:document-properties/content-type = 'application/xml'">Content-type is not application/xml.</s:assert>
               <s:assert test="ends-with(/result/c:document-properties/base-uri, '/documents/ab-doc.xml')">Base-uri is not correct.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

22 Oct 2018, Norman Walsh

Fixed result document (c:document-properties, not p:document-properties)

25 Apr 2018 18:11, Achim Berndzen

More tests.