<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
    expected="pass" >
    <t:info>
        <t:title>ab-serialization-prop-005</t:title>
        <t:revision-history>
            <t:revision>
                <t:date>2025-06-13</t:date>
                <t:author>
                    <t:name>Achim Berndzen</t:name>
                </t:author>
                <t:description xmlns="http://www.w3.org/1999/xhtml">
                    <p>Added tests for serialization properties</p>
                </t:description>
            </t:revision>
        </t:revision-history>
    </t:info>
    <t:description xmlns="http://www.w3.org/1999/xhtml">
        <p>Tests that serialization property is kept if content-type does not changes.</p>
    </t:description>
    <t:pipeline>
        <p:declare-step version="3.0" xmlns:p="http://www.w3.org/ns/xproc">
            <p:output port="result" />
            <p:identity>
                <p:with-input>
                    <p:inline content-type="text/plain" document-properties="map{'serialization' : map{'indent' : true()}}">Some text.</p:inline>
                </p:with-input>
            </p:identity>
            
            <p:identity>
                <p:with-input select="//text()" />
            </p:identity>
            
            <p:identity>
                <p:with-input><result>{exists(p:document-properties(.)?(QName('','serialization')))}</result></p:with-input>
            </p:identity>
        </p:declare-step>
    </t:pipeline>
    <t:schematron>
        <s:schema queryBinding="xslt2"
            xmlns:s="http://purl.oclc.org/dsdl/schematron">
            <s:pattern>
                <s:rule context="/">
                    <s:assert test="result">The root element is not result.</s:assert>
                    <s:assert test="result/text()='true'">The text node in result is not equal to 'true'.</s:assert>
                </s:rule>
            </s:pattern>
        </s:schema>
    </t:schematron>
</t:test>

