This proposal defines a set of XPath 2.0 extension functions to handle ZIP files. It defines one function to read ZIP files structure, functions to read actual entry's content, as well as functions to create brand-new ZIP files or to create ZIP files based on existing template files. It has been designed to be compatible with XQuery 1.0 and XSLT 2.0, as well as any other XPath 2.0 usage.
Must be ignored, but is required by the schema...
revisiondesc
This specification defines a set of functions to read and write ZIP files structure and
actual content. It has been designed as a general ZIP tool set for XPath, while it is
expected to be particularly useful with document
The module defined by this document does define one function in the namespace
http://www.expath.org/mod/zip
. In this document, the zip
prefix, when used, is bound to this namespace URI.
Error conditions are identified by a code (a QName
.) When such an error
condition is reached in the evaluation of an expression, an dynamic error is thrown,
with the corresponding error code (as if the standard XPath function
error
had been called.) TODO: Codes have not been defined yet.
A ZIP file is a file, identified by a URI, that contains a set of
For instance, the following shows the structure of a ZIP file containing one file
entry with the name README
and one directory with the name
dir
. This directory contains two files, named
content.txt
and content.html
. The path for the later
entry is dir/content.html
:
...
Take a look at
...:
$...
is ...
$...
is ...