Test for p:delete 020 (AB)

Tests delete switches correctly to text document.

Test ab-delete-020.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:delete match="element">
                <p:with-input>
                    <p:inline document-properties="map{'serialization':map{},                         'bonus-prop':'prop',                         'base-uri': 'http://base'}">This is <element xmlns=""/>a text.</p:inline>
                </p:with-input>
            </p:delete>
            
            <p:identity>
                <p:with-input select="p:document-properties-document(.)"/>
            </p:identity>
        </p:declare-step>
    
MorganaXProc passing XML Calabash 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">Root element is not c:document-properties</s:assert>
                    <s:assert test="c:document-properties/base-uri/text()='http://base'">Base-uri properties is not 'http://base'.</s:assert>
                    <s:assert test="c:document-properties/bonus-prop/text()='prop'">Property 'bonus-prop' is not preserved.</s:assert>
                    <s:assert test="c:document-properties/content-type/text()='text/plain'">Content type is not 'text/plain'.</s:assert>
                    <s:assert test="not(c:document-properties/serialization)">There should be no element 'serialization'.</s:assert>
                </s:rule>
            </s:pattern>
        </s:schema>
    

Revision history

14 Jun 2019, Achim Berndzen

Added test for the new "text-document" ruling.