Add-attribute-017 (AB)

Tests document-properties are preserved on p:add-attribute.

Test ab-add-attribute-017.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:identity>
            <p:with-input>
               <p:inline document-properties="map{'base-uri' : 'http://base-uri' ,                   'add-prop' : 'some-additional-prop'}">
                  <doc xmlns=""/>
               </p:inline>
            </p:with-input>
         </p:identity>
         
         <p:add-attribute attribute-value="5" attribute-name="att"/>
         <p:identity>
            <p:with-input select="p:document-properties-document(.)"/>
         </p:identity>
      </p:declare-step>
   
MorganaXProc 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="c:document-properties">The document root is not 'document-properties'.</s:assert>
               <s:assert test="c:document-properties/base-uri='http://base-uri'">Value of element 'base-uri' is not 'http://base-uri'.</s:assert>
               <s:assert test="c:document-properties/add-prop='some-additional-prop'">Value of element 'add-prop' is not 'some-additional-prop'.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

16 Feb 2019, Achim Berndzen

Added new tests for p:add-attribute.