ab-doc-props-012

Tests context item for document-properties on p:document, dynamic href

Test ab-doc-prop-012.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:identity name="producer">
    <p:with-input>
      <doc a="1" path="../documents/ab-doc.xml"/>
    </p:with-input>
  </p:identity>
  
  <p:identity name="id">
    <p:with-input port="source">
      <p:document document-properties="map { 'a': /doc/@a }" href="{/doc/@path}"/>
      
    </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 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="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

30 Dec 2018, Achim Berndzen

Test added