Tests that cx:collection-manager can modify an unstable collection.
Test collmgr-004.xml is expected to pass.
<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions" xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:import href="https://xmlcalabash.com/ext/library/collection-manager.xpl"/>
<p:output port="result"/>
<!-- N.B. The test-driver does not make inline URIs unique -->
<cx:collection-manager name="one" source="http://example.com/c1" stable="false">
<p:with-input>
<p:inline>
<doc/>
</p:inline>
</p:with-input>
</cx:collection-manager>
<cx:collection-manager source="http://example.com/c1" p:depends="one">
<p:with-input>
<p:inline>
<doc/>
</p:inline>
</p:with-input>
</cx:collection-manager>
<p:identity>
<p:with-input>
<p:inline>
<count>{count(collection("http://example.com/c1"))}</count>
</p:inline>
</p:with-input>
</p:identity>
</p:declare-step>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:pattern>
<s:rule context="/">
<s:assert test="count">The document root is not correct.</s:assert>
<s:assert test="count = 1">The number of documents is not correct.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Created test.