Tests p:document with json document is correctly loaded.
Test ab-p-document029.xml is expected to pass.
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:output port="result"/>
<p:cast-content-type content-type="application/xml">
<p:with-input>
<p:document href="../documents/JSon-doc1.json" content-type="application/json"/>
</p:with-input>
</p:cast-content-type>
</p:declare-step>
<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns uri="http://www.w3.org/2005/xpath-functions" prefix="x"/>
<s:pattern>
<s:rule context="/">
<s:assert test="x:map">There is no root element 'map' (in xpath-functions-namespace).</s:assert>
<s:assert test="count(x:map/*)=1">'map' does not have exactly one child element.</s:assert>
<s:assert test="x:map/x:string">'map' does not have a child element named 'string'.</s:assert>
<s:assert test="x:map/x:string/text()='value'">'map/string' does not have a text node child 'value'.</s:assert>
<s:assert test="count(x:map/x:string/@*)=1">'map/string' does not have exactly one attribute.</s:assert>
<s:assert test="x:map/x:string/@key">'map/string' does not have an attribute named 'key'.</s:assert>
<s:assert test="x:map/x:string/@key='key'">Attribute 'key' does not have the text value of 'key'.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Added attribute 'queryBinding' to schematron's schema.
Fix ab-p-document029.xml
One new and one corrected test.
Now I have all tests where p:document needs a content-type according to the new specs
More tests.