docx2hub:single-tree docx-single-tree
docx2hub/single-tree.xpl
Import URI: single-tree.xpl
Visualisation
The pre-creation of this SVG image needs the Graphviz software installed. Please inform your project maintainer.
Input Ports
Name | Documentation | Connections |
---|---|---|
sourceⓅ | This is to prevent any other default readable port to be connected with the xslt port. | |
xslt |
Output Ports
Name | Documentation | Connections |
---|---|---|
resultⓅ | ||
params | ||
zip-manifest |
Options
Name | Documentation | Default |
---|---|---|
docxⓇ | OS name (preferably with full path, may not resolve if only a relative path is given), file:, http:, or https: URL. The file will be fetched first if it is an HTTP URL. | |
debug | 'no' | |
debug-dir-uri | 'file:/tmp/debug' | |
srcpaths | 'no' | |
unwrap-tooltip-links | 'no' | |
hub-version | '1.1' | |
fail-on-error | 'no' | |
field-vars | 'no' | |
extract-dir | Directory (OS path, not file: URL) to which the file will be unzipped. If option is empty string, will be '.tmp' appended to OS file path. | '' |
Subpipeline
Step | Inputs | Outputs | Options | ||
---|---|---|---|---|---|
p:variable basename | replace($docx, '^(.+?)([^/\\]+)\.do[ct][mx]$', '$2') | ||||
transpect:file-uri locate-docx |
| result | filename = $docx | ||
letex:unzip unzip | result | zip = /c:result/@os-path dest-dir = if ($extract-dir = '') then concat(/c:result/@os-path, '.tmp') else $extract-dir overwrite = 'yes' | |||
p:choose d185e65 | |||||
name(/*) eq 'c:error' | |||||
cx:message d185e69 | result | message = 'docx2hub error on unzipping. ', //text(), ' ' | |||
p:otherwise | |||||
p:identity d185e77 | result | ||||
p:load document | result | href = concat(/c:files/@xml:base, 'word/document.xml') | |||
p:sink d185e84 | |||||
p:add-attribute d185e85 |
| result | attribute-name = 'value' match = '/c:param-set/c:param[@name = 'error-msg-file-path']' attribute-value = replace(static-base-uri(), '/[^/]+$', '') | ||
p:add-attribute d185e108 | result | attribute-name = 'value' match = '/c:param-set/c:param[@name = 'hub-version']' attribute-value = $hub-version | |||
p:add-attribute d185e112 | result | attribute-name = 'value' match = '/c:param-set/c:param[@name = 'basename']' attribute-value = $basename | |||
p:add-attribute d185e116 | result | attribute-name = 'value' match = '/c:param-set/c:param[@name = 'extract-dir-uri']' attribute-value = /c:files/@xml:base | |||
p:add-attribute d185e123 | result | attribute-name = 'value' match = '/c:param-set/c:param[@name = 'local-href']' attribute-value = /c:result/@local-href | |||
p:add-attribute params | result | attribute-name = 'value' match = '/c:param-set/c:param[@name = 'unwrap-tooltip-links']' attribute-value = $unwrap-tooltip-links | |||
p:sink d185e134 | |||||
letex:xslt-mode d185e135 | result | msg = 'yes' mode = 'insert-xpath' prefix = concat('docx2hub/', $basename, '/01') debug = $debug debug-dir-uri = $debug-dir-uri | |||
p:add-attribute d185e169 | result | attribute-name = 'xml:base' match = '/*' attribute-value = /c:files/@xml:base |