p:string-replace 005 (AB)

Tests p:string-replace

Test ab-string-replace-005.xml is expected to pass.

The pipeline


      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
         <p:input port="source"/>
         <p:output port="result"/>
            
         <p:string-replace match="*/@version" replace="number(.)+1"/>
         
      </p:declare-step>
   
MorganaXProc passing XML Calabash failing

Inputs

port = source


      <doc>
         <para version="1">some text</para>
         <para version="2">some other text</para>
         <para version="3">some <emph version="4">emphasized</emph> text</para>
      </doc>   
   

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:pattern>
            <s:rule context="/">
               <s:assert test="doc">Root element is not 'doc'.</s:assert>
               <s:assert test="doc/para[1]/@version='2'">'para'[1] does not have @version='2'.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

29 May 2019, Achim Berndzen

Porting 1.0 tests for p:string-replace