Check if p:compare succeeds when the documents are identical.
Test nw-compare-001.xml is expected to pass.
<p:declare-step xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:p="http://www.w3.org/ns/xproc" xmlns:test="http://test" version="3.0">
<p:output port="result">
<p:pipe step="compare" port="result"/>
</p:output>
<p:identity name="doc-a">
<p:with-input>
<doc>
<element name="first"/>
<element/>
</doc>
</p:with-input>
</p:identity>
<p:identity name="doc-b">
<p:with-input>
<doc>
<element name="first"/>
<element/>
</doc>
</p:with-input>
</p:identity>
<p:compare name="compare">
<p:with-input port="source" pipe="@doc-a"/>
<p:with-input port="alternate" pipe="@doc-b"/>
</p:compare>
</p:declare-step>
<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
<s:pattern>
<s:rule context="/">
<s:assert test="c:result">Root element is not 'c:result'.</s:assert>
<s:assert test="string(c:result)='true'">Result is not ‘true’.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Created test for p:compare.