<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/pipelineception-010.xml"
        name="pipelineception-010.xml"
        expected="pass">
   <t:info>
      <t:title>pipelineception-010</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2025-09-20</t:date>
            <t:author>
               <t:name>Norm Tovey-Walsh</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Created test.</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:description xmlns="http://www.w3.org/1999/xhtml">
      <p>Test that a step declared in a library is accessible as a function even if the
    implementation uses a pipeline function that’s from a step that’s private
    to the library.</p>
   </t:description>
   <t:pipeline>
      <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"
                      exclude-inline-prefixes="#all"
                      name="main"
                      version="3.0">
         <p:import href="../documents/library.xpl"/>
         <p:output port="result" sequence="true"/>
         <p:identity>
            <p:with-input>
               <hash>{ex:hash-function(map{'text': 'Hello, world.'})?result}</hash>
            </p:with-input>
         </p:identity>
      </p:declare-step>
   </t:pipeline>
   <t:schematron>
      <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>
   </t:schematron>
   <t:result name="pipelineception-010.xml">
      <hash>f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef</hash>
   </t:result>
</t:test>
