The xtpxlib-xoffice component contains the following XProc 1.0 library modules:

Module/PipelineDescription
excel.mod.xplConversions for Excel (.xlsx) files.
word.mod.xplConversions for Word (.docx) documents.

2.1 XProc (1.0) library: excel.mod.xpl

File: xplmod/excel.mod/excel.mod.xpl

Conversions for Excel (.xlsx) files.

PrefixNamespace URI
xtlxohttp://www.xtpxlib.nl/ns/xoffice
StepDescription
xtlxo:extract-xlsxExtracts the contents of an Excel (.xlsx) file in a more useable XML format.
xtlxo:modify-xlsxTakes an input/template Excel (.xlsx) and a modification specification and from this creates a new modified Excel file that merges these two sources.

2.1.1 Step: xtlxo:extract-xlsx

Extracts the contents of an Excel (.xlsx) file in a more useable XML format.

PortTypePrimary?Description
resultoutyesThe resulting XML representation of the Excel file.
OptionRq?DefaultDescription
xlsx-hrefyesDocument reference of the .xlsx file to process (must have file:// in front).

2.1.2 Step: xtlxo:modify-xlsx

Takes an input/template Excel (.xlsx) and a modification specification and from this creates a new modified Excel file that merges these two sources.

PortTypePrimary?Description
sourceinyesThe modification specification.
resultoutyesThe output is identical to the input but with @timestamp, @xlsx-href-in and @xlsx-href-out added to the root element.
OptionRq?DefaultDescription
xlsx-href-inyesURI of the input (template) .xlsx file to process
xlsx-href-outyesURI of the output .xlsx file.

2.2 XProc (1.0) library: word.mod.xpl

File: xplmod/word.mod/word.mod.xpl

Conversions for Word (.docx) documents.

PrefixNamespace URI
xtlxohttp://www.xtpxlib.nl/ns/xoffice
StepDescription
xtlxo:create-docxTurns Word XML (back) into a Word .docx file, using a template file.
xtlxo:extract-docxExtracts the contents of a Word file in a more useable XML format.

2.2.1 Step: xtlxo:create-docx

Turns Word XML (back) into a Word .docx file, using a template file.

The input must be in the format the xtlxo:extract-docx pipeline creates.

PortTypePrimary?Description
sourceinyesThe Word XML that must be converted to .docx format.
resultoutyesThe document-container (see xtpxlib-container) as written to the final Word file.
OptionRq?DefaultDescription
result-docx-hrefyesDocument reference where to write the resulting .docx file (must have file:// in front).
template-docx-hrefyesDocument reference of the template .docx file to use (must have file:// in front).

2.2.2 Step: xtlxo:extract-docx

Extracts the contents of a Word file in a more useable XML format.

PortTypePrimary?Description
resultoutyesThe resulting XML representation of the Word file.
OptionRq?DefaultDescription
docx-hrefyesDocument reference of the .docx file to process (must have file:// in front).