Test that a pipeline function imported from a library is available in the Saxon configuration of steps within the pipeline that imports the library.
Test pipelineception-012.xml is expected to pass.
<p:declare-step xmlns:ex="http://example.com/ns" xmlns:map="http://www.w3.org/2005/xpath-functions/map" xmlns:p="http://www.w3.org/ns/xproc" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="main" version="3.0">
<p:import href="../documents/library.xpl"/>
<p:output port="result" sequence="true"/>
<p:xslt>
<p:with-input>
<doc/>
</p:with-input>
<p:with-input port="stylesheet">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xs" version="3.0">
<xsl:template match="/">
<hash>{ex:hash-function(map{'text': 'Hello, world.'})?result}</hash>
</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:ns prefix="svg" uri="http://www.w3.org/2000/svg"/>
<s:pattern>
<s:rule context="/">
<s:assert test="hash">The root is wrong.</s:assert>
<s:assert test="hash/. = 'f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef'">The content is wrong.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Created test.