collmgr-004
Tests that cx:collection-manager can modify an unstable collection.
Test is expected to pass.
The pipeline
<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"
xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.0">
<p:import href="https://xmlcalabash.com/ext/library/collection-manager.xpl"/>
<p:output port="result"/>
<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>
Result
<count xmlns:cx="http://xmlcalabash.com/ns/extensions"
xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:t="http://xproc.org/ns/testsuite/3.0">1</count>
Schematron checks
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns:t="http://xproc.org/ns/testsuite/3.0" 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>
Revision history
- 23 Jan 2025, Norm Tovey-Walsh
- Created test.