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

NameDocumentationConnections

source

This is to prevent any other default readable port to be connected with the xslt port.

xslt

Output Ports

NameDocumentationConnections

result

params

zip-manifest

Options

NameDocumentationDefault

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

StepInputsOutputsOptions

p:variable basename

replace($docx, '^(.+?)([^/\\]+)\.do[ct][mx]$', '$2')

transpect:file-uri locate-docx

source

source on docx-single-tree

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

source

result on unzip

result

message = 'docx2hub error on unzipping. ', //text(), ' '

p:otherwise

p:identity d185e77

source

result on unzip

result

p:load document

result

href = concat(/c:files/@xml:base, 'word/document.xml')

p:sink d185e84

source

result on document

p:add-attribute d185e85

source

 <c:param-set>
   <c:param name="error-msg-file-path"/>
   <c:param name="hub-version"/>
   <c:param name="local-href"/>
   <c:param name="unwrap-tooltip-links"/>
   <c:param name="extract-dir-uri"/>
 </c:param-set>

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

source

result on d185e85

result

attribute-name = 'value'

match = '/c:param-set/c:param[@name = 'hub-version']'

attribute-value = $hub-version

p:add-attribute d185e112

source

result on d185e108

result

attribute-name = 'value'

match = '/c:param-set/c:param[@name = 'basename']'

attribute-value = $basename

p:add-attribute d185e116

source

result on d185e112

result

attribute-name = 'value'

match = '/c:param-set/c:param[@name = 'extract-dir-uri']'

attribute-value = /c:files/@xml:base

p:add-attribute d185e123

source

result on d185e116

result

attribute-name = 'value'

match = '/c:param-set/c:param[@name = 'local-href']'

attribute-value = /c:result/@local-href

p:add-attribute params

source

result on d185e123

result

attribute-name = 'value'

match = '/c:param-set/c:param[@name = 'unwrap-tooltip-links']'

attribute-value = $unwrap-tooltip-links

p:sink d185e134

source

result on params

letex:xslt-mode d185e135

source

result on document

parameters

result on params

stylesheet

xslt on docx-single-tree

models

p:empty

result

msg = 'yes'

mode = 'insert-xpath'

prefix = concat('docx2hub/', $basename, '/01')

debug = $debug

debug-dir-uri = $debug-dir-uri

p:add-attribute d185e169

source

result on d185e135

result

attribute-name = 'xml:base'

match = '/*'

attribute-value = /c:files/@xml:base