tr:load-whole-cascade (in library load-cascaded.xpl) load-whole-cascade

Loads all documents of a specific name from the path cascade.

With the default order of 'least-specific-first', the most generic document will be first, the most specific last.

The option 'order' may be set to 'most-specific-first'.

Output Ports

NameDocumentationConnections

result

Options

NameDocumentationDefault

filename

order

'least-specific-first'

Subpipeline

StepInputsOutputsOptions

p:xslt xslt-load-whole-cascade

source

p:empty

parameters

paths on load-whole-cascade

stylesheet

 <xsl:stylesheet version="2.0">
   <xsl:param name="filename" as="xs:string"/>
   <xsl:param name="order" as="xs:string"/>
   <xsl:param name="s9y1-path" as="xs:string?"/>
   <xsl:param name="s9y2-path" as="xs:string?"/>
   <xsl:param name="s9y3-path" as="xs:string?"/>
   <xsl:param name="s9y4-path" as="xs:string?"/>
   <xsl:param name="s9y5-path" as="xs:string?"/>
   <xsl:param name="s9y6-path" as="xs:string?"/>
   <xsl:param name="s9y7-path" as="xs:string?"/>
   <xsl:param name="s9y8-path" as="xs:string?"/>
   <xsl:param name="s9y9-path" as="xs:string?"/>
   <xsl:function name="tr:load-docs" as="document-node()*">
     <xsl:param name="filename" as="xs:string"/>
     <xsl:param name="uris" as="xs:string*"/>
     <xsl:if test="exists($uris)">
       <xsl:if test="doc-available(concat($uris[1], '/', $filename))">
         <xsl:sequence select="doc(concat($uris[1], '/', $filename))"/>
       </xsl:if>
       <xsl:sequence select="tr:load-docs($filename, $uris[position() gt 1])"/>
     </xsl:if>
   </xsl:function>
   <xsl:variable name="docs" as="document-node()*" select="tr:load-docs($filename, ($s9y9-path, $s9y8-path, $s9y7-path, $s9y6-path, $s9y5-path, $s9y4-path, $s9y3-path, $s9y2-path, $s9y1-path))"/>
   <xsl:template name="main">
     <xsl:for-each select="if ($order = 'most-specific-first') then reverse($docs) else $docs">
       <xsl:result-document href="{base-uri(/*)}#">
         <xsl:sequence select="."/>
       </xsl:result-document>
     </xsl:for-each>
   </xsl:template>
 </xsl:stylesheet>

result

template-name = 'main'

p:sink d104e288

source

result on xslt-load-whole-cascade