Tests application/trix+xml can be queried.
Test rdf-trix-003.xml is expected to pass.
<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:p="http://www.w3.org/ns/xproc" name="main" version="3.0" expand-text="false">
<p:import href="https://xmlcalabash.com/ext/library/rdf.xpl"/>
<p:output port="result"/>
<p:load content-type="application/trix+xml" href="../documents/sample1.trix"/>
<cx:sparql>
<p:with-input port="query">
<p:document content-type="application/sparql-query" href="../documents/query1.rq"/>
</p:with-input>
</cx:sparql>
</p:declare-step>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns prefix="sr" uri="http://www.w3.org/2005/sparql-results#"/>
<s:pattern>
<s:rule context="/">
<s:assert test="sr:sparql">The root is wrong.</s:assert>
</s:rule>
<s:rule context="/sr:sparql">
<s:assert test="sr:head">There’s no head</s:assert>
<s:assert test="sr:results">There are no results</s:assert>
</s:rule>
<s:rule context="/sr:sparql/sr:head">
<s:assert test="count(sr:variable) = 2">Wrong number of headers</s:assert>
</s:rule>
<s:rule context="/sr:sparql/sr:results">
<s:assert test="count(sr:result) = 3">Wrong number of results</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Created test.