docx2hub:convert docx2hub
docx2hub/wml2hub.xpl
Import URI: http://transpect.le-tex.de/docx2hub/wml2hub.xpl
This script is used to convert docx to Hub XML. By default, the output is stored in the same directory as the input docx file, with the same basename. It is a library that needs other externals. For standalone operation, please check out the front-end project.
From the directory wherey you checked out the front-end project, you invoke it with:
calabash/calabash.sh docx2hub/wml2hub.xpl docx=PATH-TO-MY-DOCX-FILE.docx
where docx may be a an OS path or a file:, http:, or https: URL.
Import it with
<p:import href="http://transpect.le-tex.de/docx2hub/wml2hub.xpl" />
if you use it from transpect or if you imported this project as svn:external.
In the latter case, include the following line in you project's xmlcatalog/catalog.xml:
<nextCatalog catalog="../docx2hub/xmlcatalog/catalog.xml"/>
Experts may override the default conversion rules by supplying custom XSLT (that imports main.xsl) on the 'xslt' port.
Visualisation
The pre-creation of this SVG image needs the Graphviz software installed. Please inform your project maintainer.
Input Ports
Name | Documentation | Connections |
---|---|---|
xslt | ||
sourceⓅ | This is to prevent a default readable port connecting to this step’s xslt port. |
Output Ports
Name | Documentation | Connections |
---|---|---|
resultⓅ | ||
insert-xpath |
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 | '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. | '' |
create-svg | Whether Office Open Drawing ML should be mapped to SVG | 'no' |
Subpipeline
Step | Inputs | Outputs | Options |
---|---|---|---|
docx2hub:single-tree single-tree | result | docx = $docx debug = $debug debug-dir-uri = $debug-dir-uri hub-version = $hub-version unwrap-tooltip-links = $unwrap-tooltip-links fail-on-error = $fail-on-error field-vars = $field-vars srcpaths = $srcpaths extract-dir = $extract-dir | |
letex:xslt-mode d150e114 |
| result | msg = 'yes' mode = 'docx2hub:add-props' prefix = concat('docx2hub/', /c:param-set/c:param[name='basename']/@value, '/03') debug = $debug debug-dir-uri = $debug-dir-uri |
letex:xslt-mode d150e145 |
| result | msg = 'yes' mode = 'docx2hub:props2atts' prefix = concat('docx2hub/', /c:param-set/c:param[name='basename']/@value, '/05') debug = $debug debug-dir-uri = $debug-dir-uri |
letex:xslt-mode d150e174 |
| result | msg = 'yes' mode = 'docx2hub:remove-redundant-run-atts' prefix = concat('docx2hub/', /c:param-set/c:param[name='basename']/@value, '/07') debug = $debug debug-dir-uri = $debug-dir-uri |
letex:xslt-mode d150e203 |
| result | msg = 'yes' mode = 'docx2hub:separate-field-functions' prefix = concat('docx2hub/', /c:param-set/c:param[name='basename']/@value, '/11') debug = $debug debug-dir-uri = $debug-dir-uri |
letex:xslt-mode d150e232 |
| result | msg = 'yes' mode = 'wml-to-dbk' prefix = concat('docx2hub/', /c:param-set/c:param[name='basename']/@value, '/20') debug = $debug debug-dir-uri = $debug-dir-uri hub-version = $hub-version |
letex:xslt-mode d150e267 |
| result | msg = 'yes' mode = 'docx2hub:join-runs' prefix = concat('docx2hub/', /c:param-set/c:param[name='basename']/@value, '/24') debug = $debug debug-dir-uri = $debug-dir-uri hub-version = $hub-version |
p:add-attribute rebase | result | match = '/*' attribute-name = 'xml:base' attribute-value = replace(/c:param-set/c:param[name='local-href']/@value, '\.do[ct][xm]$', '.hub.xml') | |
result | hub-version = $hub-version |