ab-doc-props-001

Tests document-properties with a variable in map constructor

Test ab-doc-prop-001.xml is expected to pass.

The pipeline

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step" name="main" version="3.0">
  <p:output port="result"/>
  <p:variable name="var" select="1"/>
  
  <p:identity name="id">
    <p:with-input port="source">
      <p:inline document-properties="map { 'a': $var }">
        <doc/>
      </p:inline>
    </p:with-input>
  </p:identity>

  <p:identity>
    <p:with-input port="source" select="p:document-properties-document(.)/c:document-properties/a"/>
  </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="c" uri="http://www.w3.org/ns/xproc-step"/>

   <s:pattern>
     <s:rule context="/*">
       <s:assert test="self::a">The pipeline root is not “a”.</s:assert>
       <s:assert test="string(.) = '1'">The property value is not 1</s:assert>
     </s:rule>
   </s:pattern>
</s:schema>

Revision history

06 Oct 2018 13:57, Achim Berndzen

Ten new tests for document-properties