Tests p:xquery: Simple json document as source
Test ab-xquery-011.xml is expected to pass.
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:output port="result"/>
<p:xquery>
<p:with-input port="source">
<p:inline content-type="application/json">2</p:inline>
</p:with-input>
<p:with-input port="query">
<answer xmlns="">{{40 + .}}</answer>
</p:with-input>
</p:xquery>
</p:declare-step>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
<s:pattern>
<s:rule context="/">
<s:assert test="answer">Root element is not 'answer'.</s:assert>
<s:assert test="answer/text()='42'">The answer is not '42'.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Tests for p:xquery (Partly ported from 1.0)