ab-doc-props-004

Tests document-properties with a static option in map constructor

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

The pipeline


<p:declare-step xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:p="http://www.w3.org/ns/xproc" name="main" version="3.0">
   <p:output port="result"/>
   <p:option static="true" name="option" select="1"/>
   <p:identity name="id">
      <p:with-input port="source">
         <p:inline document-properties="map { 'a': $option }">
            <doc/>
         </p:inline>
      </p:with-input>
   </p:identity>
   <p:cast-content-type content-type="application/xml">
      <p:with-input port="source" select="p:document-properties(.)"/>
   </p:cast-content-type>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Schematron validation


<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:ns prefix="j" uri="http://www.w3.org/2005/xpath-functions"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="j:map">The pipeline root is not “map”.</s:assert>
         <s:assert test="j:map/j:number[@key='a']">Element does not has an attribute 'key' with value 'a'.</s:assert>
         <s:assert test="j:map/j:number/text() = '1'">The property value is not 1</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

20 Nov 2019, Achim Berndzen

Changed test from p:document-properties-document() to p:document-properties()

06 Oct 2018 13:57, Achim Berndzen

Ten new tests for document-properties