tr:load-cascaded (in library load-cascaded.xpl) load-cascaded
Loads the most specific XML file $filename from a sequence of paths, supplied as parameters on the paths port ($s9y1-path, $s9y2-path, …, in descending specificity).
The XML file can be an XProc pipeline, an XSLT stylesheet, a Schematron schema, an XHTML file, whatever.
If no document named {$filename} is found at a given path, it checks whether {$filename}.xsl exists.
If it exist, the main template of this XSL is invoked and this should return the document that was originally expected at {$filename}.
If neither a proper {$filename} nor {$filename}.xsl can be found under any of the paths, and if a non-empty option $fallback is specified, the fallback file will be used.
Input Ports
Name | Documentation | Connections |
---|---|---|
pathsⓅ |
Output Ports
Name | Documentation | Connections |
---|---|---|
resultⓅ |
Options
Name | Documentation | Default |
---|---|---|
filenameⓇ | ||
required | 'yes' | |
fallback | '' | |
set-xml-base-attribute | 'yes' | |
debug | 'no' | |
debug-dir-uri |
Subpipeline
Step | Inputs | Outputs | Options | ||
---|---|---|---|---|---|
p:xslt load-cascaded-xsl |
| result | template-name = 'main' | ||
p:sink d104e53 |
| ||||
p:choose potentially-eval-returned-xsl | |||||
replace(base-uri(/*), '^.+/', '') = concat(replace($filename, '^.+/', ''), '.xsl') | |||||
p:xslt d104e65 |
| result | template-name = 'main' | ||
p:otherwise | |||||
p:identity d104e84 |
| result | |||
tr:store-debug store-debug |
| result | active = $debug base-uri = $debug-dir-uri pipeline-step = replace($filename, '^(.+?)\.([^/]+)$', '$1') extension = replace($filename, '^(.+?)\.([^/]+)$', '$2') |