The xtpxlib-container component contains the following support (pipelines and/or libraries) for XProc 3.0:

Module/PipelineDescription
container-to-disk.xplWrites an xtpxlib container structure to disk. A base path must be provided, either as option $href-target path or as /*/@href-target.
container-to-zip.xplWrites an xtpxlib container structure to a zip file. A name for the output zip can be specified in either option $href-target-zip or on the container in /*/@href-target-zip.
directory-to-container.xplLoads a directory (with optional sub-directories) into an xtpxlib container structure.
zip-to-container.xplLoads the contents of a zip file (directory depth can be set) into an xtpxlib container structure.

4.1 XProc (3.0) pipeline: container-to-disk.xpl

File: xpl3mod/container-to-disk/container-to-disk.xpl

Type: xtlcon:container-to-disk

Writes an xtpxlib container structure to disk. A base path must be provided, either as option $href-target path or as /*/@href-target.

PortTypePrimary?Description
sourceinyesThe container to process.
resultoutyesThe input container structure with additional shadow attributes filled.
OptionTypeRq?DefaultDescription
href-target-pathxs:string? ()Base path where to write the container. When you specify this it will have precedence over a /*/@href-target-path.
remove-targetxs:boolean true()Whether to attempt to remove the target directory before writing.

4.2 XProc (3.0) pipeline: container-to-zip.xpl

File: xpl3mod/container-to-zip/container-to-zip.xpl

Type: xtlcon:container-to-zip

Writes an xtpxlib container structure to a zip file. A name for the output zip can be specified in either option $href-target-zip or on the container in /*/@href-target-zip.

PortTypePrimary?Description
sourceinyesThe container to process.
resultoutyesThe input container structure with additional shadow attributes filled.
OptionTypeRq?DefaultDescription
href-target-zipxs:string? ()Nem of the zip file to write. When you specify this it will have precedence over a /*/@href-target-zip.

4.3 XProc (3.0) pipeline: directory-to-container.xpl

File: xpl3mod/directory-to-container/directory-to-container.xpl

Type: xtlcon:directory-to-container

Loads a directory (with optional sub-directories) into an xtpxlib container structure.

PortTypePrimary?Description
resultoutyesThe resulting container structure.
OptionTypeRq?DefaultDescription
add-document-target-pathsxs:boolean false()Copies the relative source path as the target path @target-path for the individual documents.
The idea behind this is that in some cases you want to write almost the same structure back to disk. Recording the relative source path as the target path makes this easier: you don't have to set it explicitly.
depthxs:integer -1The sub-directory depth to go. When lt 0, all sub-directories are processed.
exclude-filterxs:string* '\.git/'Optional regular expression exclude filters. By default, .git directories are excluded.
href-source-directoryxs:stringyesURI of the directory to read.
href-target-pathxs:string? ()Optional target path to record on the container.
The idea behind this is that this makes it easier to write the container back to another location on disk, the target path is already there.
include-filterxs:string* ()Optional regular expression include filters.
json-as-xmlxs:boolean false()When JSON files are loaded (option $load-json is true): whether to add them to the container as XML or as JSON text. It will set the entry's content type to application/json+xml.
load-htmlxs:boolean false()Whether to load HTML files.
load-jsonxs:boolean false()Whether to load JSON files.
load-textxs:boolean false()Whether to load text files.
override-content-typesarray(array(xs:string))? ()Override content types specification (see description of p:directory-list).

4.4 XProc (3.0) pipeline: zip-to-container.xpl

File: xpl3mod/zip-to-container/zip-to-container.xpl

Type: xtlcon:zip-to-container

Loads the contents of a zip file (directory depth can be set) into an xtpxlib container structure.

PortTypePrimary?Description
resultoutyesThe resulting container structure
OptionTypeRq?DefaultDescription
add-document-target-pathsxs:boolean false()Copies the relative source path as the target path @target-path for the individual documents.
The idea behind this is that in some cases you want to write almost the same structure back to disk or zip. Recording the relative source path as the target path makes this easier: you don't have to set it explicitly.
depthxs:integer -1The sub-directory depth to go. When lt 0, all sub-directories are processed.
exclude-filterxs:string* '\.git/'Optional regular expression exclude filters. By default, .git directories are excluded.
href-source-zipxs:stringyesURI of the directory to read.
href-target-pathxs:string? ()Optional target path to record on the container.
The idea behind this is that this makes it easier to write the container back to another location on disk, the target path is already there.
include-filterxs:string* Optional regular expression include filters.
json-as-xmlxs:boolean false()When JSON files are loaded (option $load-json is true): whether to add them to the container as XML or as JSON text. It will set the entry's content type to application/json+xml.
load-htmlxs:boolean false()Whether to load HTML files.
load-jsonxs:boolean false()Whether to load JSON files.
load-textxs:boolean false()Whether to load text files.
override-content-typesarray(array(xs:string))? ()Override content types specification (see description of p:archive-manifest).