Tests p:xquery
Test ab-xquery-005.xml is expected to pass.
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:input port="source"/>
<p:output port="result"/>
<p:xquery xmlns:test="http://www.test.com" parameters="map{'str' : 'Will', 'test:str' : 'Chris'}">
<p:with-input port="query">
<c:query xmlns:c="http://www.w3.org/ns/xproc-step">
declare namespace test = "http://www.test.com";
declare variable $str external;
declare variable $test:str external;
for $author in //author[contains(firstname, $str) or contains(firstname, $test:str)]
order by $author/firstname
return $author
</c:query>
</p:with-input>
</p:xquery>
<p:wrap-sequence wrapper="wrapper"/>
</p:declare-step>
<authors>
<author>
<firstname>William</firstname>
<lastname>Shakespeare</lastname>
</author>
<author>
<firstname>Christopher</firstname>
<lastname>Marlowe</lastname>
</author>
<author>
<firstname>Ben</firstname>
<lastname>Johnson</lastname>
</author>
</authors>
<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:pattern>
<s:rule context="/">
<s:assert test="wrapper">Root element is not 'wrapper'.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Added attribute 'queryBinding' to schematron's schema.
Tests for p:xquery (Partly ported from 1.0)