ZIP Module w3c-designation EXPath Candidate Module 26 May 2009 XML Florent Georges fgeorges.org

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...

langusage

revisiondesc

Introduction

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 package formats based on XML and ZIP, as for instance , , and .

Namespace conventions

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 management

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.

What is a ZIP file?

A ZIP file is a file, identified by a URI, that contains a set of entries, organized as a tree. An entry is either a directory (containing other entries) or a file entry (carrying actual content.) The entries are organized as a tree, where files are leaf nodes, and directories contains other entries. This hierarchy is the structure of the ZIP file. All entries have a unique name among its siblings, and a particular entry can be identified using a path starting at the ZIP file level, down to this entry, passing by each directory in between.

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: README dir/ content.txt content.html

Bla bla...

...

TODO: ...

Take a look at (not sure to keep that ref in later versions, though.)

TODO: Old text...

...: http:send-request($request as element(http:request)?, $href as xs:string?, $content as item()?, $serial as item()?) as item()+

$... is ...

$... is ...

References EPUB set of specifications. International Digital Publishing Forum. Office Open XML. Microsoft Corporation. OpenDocument format (ODF). The Organization for the Advancement of Structured Information Standards (OASIS). Module: ZIP Package. In MarkLogic Server 4.0 documentation. MarkLogic Corporation.