p:text-sort-003 (AB)

Tests p:text-sort: Tests sort-key

Test ab-text-sort-003.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:text-sort sort-key="substring(.,2,1)">
               <p:with-input>
                  <p:inline content-type="text/plain">1C
1A
1D
1B</p:inline>
               </p:with-input>             
            </p:text-sort>
            <p:wrap-sequence wrapper="wrapper"/>
        </p:declare-step>
   
MorganaXProc passing XML Calabash failing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
          <s:pattern>
            <s:rule context="/">
               <s:assert test="wrapper">The root element is not wrapper.</s:assert>
               <s:assert test="wrapper/text()='1A
1B
1C
1D'">Text is not sorted correctly.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

01 Sep 2019, Achim Berndzen

Some tests for p:text-sort