4.1 oXygen XProc 3.0 support

The component contains a framework for oXygen that enables it to validate XProc 3.0 documents. To use this:

Module/PipelineDescription
copy-dir.xplThis step copies a directory and all its contents from one location to the other.
create-clear-directory.xplThis step does two things:
recursive-directory-list.xplExtension of standard the p:directory list step. Returns the contents of a directory, going into sub-directories recursively. Adds the possibility to "flatten" the list.
validate.xplThis step performs validation using a W3C Schema and/or Schematron. It breaks the processing if something is wrong.
write-log.xplWrites an entry to a log file.
zip-directory.xplZips a directory into a single zip file.

4.2 XProc (3.0) pipeline: copy-dir.xpl

File: xpl3mod/copy-dir/copy-dir.xpl

Type: xtlc:copy-dir

This step copies a directory and all its contents from one location to the other.

The step itself acts as an identity step.

PortTypePrimary?Description
sourceinyes
resultoutyes
OptionTypeRq?DefaultDescription
clear-targetxs:boolean true()Whether to clear the target before copying.
depthxs:integer -1The sub-directory depth to go. When lt 0, all sub-directories are processed.
exclude-filterxs:string* '\.git/'Regular expression(s) for files to be excluded from the copy. By default, git directories are excluded
href-sourcexs:stringyesThe full path/URI of the source directory. If the directory does not exist, nothing will happen.
href-targetxs:stringyesThe full path/URI of the target directory. Any non-existing parent directories leading up to this directory will be automatically created.
include-filterxs:string* ()Regular expression(s) files to be included in the copy.

4.3 XProc (3.0) pipeline: create-clear-directory.xpl

File: xpl3mod/create-clear-directory/create-clear-directory.xpl

Type: xtlc:create-clear-directory

This step does two things:

It doesn't matter whether the directory exists beforehand.

The step itself acts as an identity step.

PortTypePrimary?Description
sourceinyes
resultoutyes
OptionTypeRq?DefaultDescription
clearxs:boolean true()Whether or not to empty an existing directory.
href-dirxs:stringyesThe full path/URI of the directory to delete.

4.4 XProc (3.0) pipeline: recursive-directory-list.xpl

File: xpl3mod/recursive-directory-list/recursive-directory-list.xpl

Type: xtlc:recursive-directory-list

Extension of standard the p:directory list step. Returns the contents of a directory, going into sub-directories recursively. Adds the possibility to "flatten" the list.

This step will also not throw an error when the directory does not exist. Instead it will simply return an empty result (with an error="true attribute).

PortTypePrimary?Description
resultoutyesThe resulting directory structure in XML format. See the standard p:directory-list step for a more detailed description.
OptionTypeRq?DefaultDescription
add-decodedxs:boolean false()When true and $flatten is true, attributes @href-rel-decoded and @href-abs-decoded are added in which any percent encoded characters are decoded.
depthxs:integer -1The sub-directory depth to go. When lt 0, all sub-directories are processed.
detailedxs:boolean false()Whether to add detailed information.
exclude-filterxs:string* '\.git/'Optional regular expression exclude filters. By default, git directories are excluded.
flattenxs:boolean false()When true, the list will be "flattened": All c:file children will be direct children of the root's c:directory element. These c:file elements get a @name, @href-abs (absolute filename) and @href-rel (relative filename) attribute.
include-filterxs:string* Optional regular expression include filters.
override-content-typesarray(array(xs:string))? ()Override content types specification (see description of p:directory-list).
pathxs:stringyesThe path to get the directory listing from.

4.5 XProc (3.0) pipeline: validate.xpl

File: xpl3mod/validate/validate.xpl

Type: xtlc:validate

This step performs validation using a W3C Schema and/or Schematron. It breaks the processing if something is wrong.

This might seem superfluous (there are already p:validate-with... steps), but often these steps change the document. This step performs like a real identity step.

PortTypePrimary?Description
sourceinyesDocument to validate.
resultoutyesThe same as the input document.
OptionTypeRq?DefaultDescription
href-schemaxs:string? ()Optional reference to an W3C Schema to validate the document with. If (), no schema validation will be performed.
href-schematronxs:string? ()Optional reference to a Schematron Schema to validate the document with. If (), no Schematron validation will be performed.
schema-versionxs:string '1.0'The W3C Schema version to use.

4.6 XProc (3.0) pipeline: write-log.xpl

File: xpl3mod/write-log/write-log.xpl

Type: xtlc:write-log

Writes an entry to a log file.

With regards to documents flowing through, acts like a p:identity step.

PortTypePrimary?Description
sourceinyesDocuments will be passed unchanged to the result port.
resultoutyesDocuments coming from the source port, unchanged.
OptionTypeRq?DefaultDescription
additional-attributesmap(xs:QName, xs:string)? ()A map with additional attributes to add to the log entry's entry element.
additional-elementselement()* ()Elements with additional information to add to this log entry.
enablexs:boolean true()Whether the logging will be done at all.
enable-debug-messagesxs:boolean true()Whether messages with debug status will be written as well.
href-logxs:stringyesURI of the file to write the log entries to.
keep-entriesxs:integer 0The number of entries to keep in the logfile. If le 0, all messages are kept.
log-commentsxs:string* ()Any comments to write as file header when creating a new log file. Ignored on an existing log file.
messagesxs:string+yesThe actual texts/lines of the log entry to write. All will become a separate message element.
statusxs:string 'info'Status of the entry. Must be info, warning, error or debug.

4.7 XProc (3.0) pipeline: zip-directory.xpl

File: xpl3mod/zip-directory/zip-directory.xpl

Type: xtlc:zip-directory

Zips a directory into a single zip file.

PortTypePrimary?Description
resultoutyesThe archive manifest of the created zip file.
OptionTypeRq?DefaultDescription
base-pathxs:stringyesURI of the directory which contents will be stored in the zip.
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-target-zipxs:stringyesURI for the zip file to produce.
include-basexs:boolean true()When true, the last part of $base-path (for instance a/b/c ==> c) is used as root directory for entries in the zip file.
include-filterxs:string* Optional regular expression include filters.