Library http://www.daisy.org/pipeline/modules/file-utils/library.xpl

File Utilities

The steps defined in this library provide information about files and the ability to manipulate them. All implementations are required to support file: scheme URIs. Support for other schemes is implementation-defined.

All href attributes are made absolute with respect to the element on which they are specified.

Steps

Local NameNamespace URIDescription
add-xml-basehttp://www.daisy.org/ns/pipeline/xprocDoes the same as p:add-xml-base, but has an additional option called root to omit the xml:base attribute on the document element if the input does not have an xml:base attribute on the document element either.
assert-xml-declarationhttp://www.daisy.org/ns/xprocspecexpect example: <c:result version="1.0" encoding="UTF-8" standalone="true"/> expect attributes: - the version attribute is required - empty or missing attributes means that those attributes must not be present in the xml declaration
copy-resourcehttp://www.daisy.org/ns/pipeline/xproc
copyhttp://www.daisy.org/ns/pipeline/xproc
cwdhttp://www.daisy.org/ns/pipeline/xproc
datahttp://www.daisy.org/ns/pipeline/xprocStep that behaves like a p:identity with a p:data input, with an option to set the href. Makes use of p:http-request.
deletehttp://www.daisy.org/ns/pipeline/xproc
directory-listhttp://www.daisy.org/ns/pipeline/xprocThe p:directory-list step will return the contents of a single directory. The px:directory-list step will process a directory and it's subdirectories recursively. See also: http://xproc.org/library/#recursive-directory-list.
file-peekhttp://www.daisy.org/ns/pipeline/xproc
file-xml-peekhttp://www.daisy.org/ns/pipeline/xproc
headhttp://www.daisy.org/ns/pipeline/xproc
infohttp://www.daisy.org/ns/pipeline/xproc
loadhttp://www.daisy.org/ns/pipeline/xprocLike p:load, but also handles certain non-XML input when the optional content-type is specified.
mkdirhttp://www.daisy.org/ns/pipeline/xproc
movehttp://www.daisy.org/ns/pipeline/xproc
normalize-document-basehttp://www.daisy.org/ns/pipeline/xproc
normalize-urihttp://www.daisy.org/ns/pipeline/xproc
read-doctypehttp://www.daisy.org/ns/pipeline/xprocRead the doctype declaration of an XML file.
read-xml-declarationhttp://www.daisy.org/ns/pipeline/xprocExample usage: <!-- provide a single document on the primary input port --> <px:read-xml-declaration/> Example output: <c:result xmlns:c="http://www.w3.org/ns/xproc-step" standalone="yes" encoding="UTF-8" has-xml-declaration= [...]
set-base-urihttp://www.daisy.org/ns/pipeline/xprocChanges the base URI of the document. px:set-base-uri has an effect on all elements that do not have an ancestor with an absolute xml:base, unless that element is the root element. Whether an element has a different base URI than its parent does not matter as long as this is not made expli [...]
set-doctypehttp://www.daisy.org/ns/pipeline/xprocSets, or deletes, the doctype of a file. If `doctype` is the empty string, the doctype will be deleted. It is an error if `doctype` does not match the regex `^<!DOCTYPE\s+\w+\s*(|SYSTEM\s+("[^"]*"|'[^']*')|PUBLIC\s+("[\s\w\-'()+,\./:=?;!*#@$_%]*"|'[\s\w\-()+,\./:=?;!*#@$_%]*')\s+("[^ [...]
set-xml-declarationhttp://www.daisy.org/ns/pipeline/xprocSets, or deletes, the xml declaration of a file. If `xml-declaration` is the empty string, the xml declaration will be deleted. It is an error if `xml-declaration` does not match the regex `^<\?xml[ \t\r\n]+version[ \t\r\n]*=[ \t\r\n]*(''1\.[0-9]+''|"1.[0-9]+")([ \t\r\n]+encoding[ \t [...]
tailhttp://www.daisy.org/ns/pipeline/xproc
tempdirhttp://www.daisy.org/ns/pipeline/xprocReturns a <c:result> containing the absolute URI of a temporary directory, which is guaranteed not to already exist. The directory is created inside the directory specified by href. If href is not specified then the system-dependent default temporary-file directory will b [...]
tempfilehttp://www.daisy.org/ns/pipeline/xproc
touchhttp://www.daisy.org/ns/pipeline/xproc