Tests that cx:collection-manager collections are visible in XSLT.
Test collmgr-005.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"/>
<cx:collection-manager name="coll" source="http://example.com/c1" stable="false">
<p:with-input>
<p:inline document-properties="map {'base-uri': 'http://example.com/c1'}">
<doc/>
</p:inline>
<p:inline document-properties="map {'base-uri': 'http://example.com/c2'}">
<doc/>
</p:inline>
</p:with-input>
</cx:collection-manager>
<p:xslt template-name="main" depends="coll">
<p:with-input port="source">
<p:empty/>
</p:with-input>
<p:with-input port="stylesheet">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
<xsl:template name="main">
<count>
<xsl:value-of select="count(collection('http://example.com/c1'))"/>
</count>
</xsl:template>
</xsl:stylesheet>
</p:with-input>
</p:xslt>
</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 = 2">The number of documents is not correct.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Created test.