existdb-001
Tests that eXist-db can be used as the default query processor.
Test is expected to pass.
The pipeline
<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions"
xmlns:exist="http://exist.sourceforge.net/NS/exist" xmlns:p="http://www.w3.org/ns/xproc"
xmlns:t="http://xproc.org/ns/testsuite/3.0" expand-text="false" name="main"
version="3.0">
<p:output port="result" sequence="true"/>
<p:xquery cx:processor="https://exist-db.org/"
parameters="map{'cx:username': 'admin', 'cx:password': '', 'cx:database-uri': 'http://existdb:8080/exist/rest/db/', 'cx:query': map{'cache':'yes'}, 'cx:properties': map{'omit-xml-declaration':'yes'}}">
<p:with-input>
<p:empty/>
</p:with-input>
<p:with-input port="query">
<p:inline content-type="text/plain">
<doc>{ 3 + 4 }</doc>
</p:inline>
</p:with-input>
</p:xquery>
</p:declare-step>
Result
<exist:result xmlns:exist="http://exist.sourceforge.net/NS/exist"
xmlns:t="http://xproc.org/ns/testsuite/3.0" exist:hits="1" exist:start="1"
exist:count="1" exist:session="1"
exist:compilation-time="1" exist:execution-time="1">
<doc>7</doc>
</exist:result>
Schematron checks
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns:t="http://xproc.org/ns/testsuite/3.0" queryBinding="xslt2">
<s:ns prefix="exist"
uri="http://exist.sourceforge.net/NS/exist"/>
<s:pattern>
<s:rule context="/">
<s:assert test="exist:result">The root is wrong.</s:assert>
<s:assert test="exist:result[@exist:session]">No session.</s:assert>
<s:assert test="exist:result/doc[. = '7']">The doc is wrong.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 16 Aug 2025, Norm Tovey-Walsh
- Created test.