expath-zip:zip-file

Constructs a new ZIP file and writes it to the location identified by the href attribute of the zip:file element. For details of the structure, see the EXPath zip specification at http://expath.org/spec/zip.

zip-file($zip as element(zip:file)) ➔ empty-sequence()

Arguments

 

$zip

element(zip:file)

The structure of the ZIP file to be created

Result

empty-sequence()

Details

Namespace: http://expath.org/ns/zip

Notes on the Saxon implementation

Implemented since Saxon 9.5; available whether or not support for XPath 3.0 is enabled. Note that this function exists for its side-effects, and therefore needs to be called with care. It is safest to call it in an xsl:sequence instruction that appears in a place where xsl:result-document would be permitted; that is, not in a function body or in a variable initializer. The implementation has been changed from Florent Georges' original so that (as required by the spec) it always returns an empty sequence (the original attempted to return a Base64Binary value if there was no output file name).

The EXPath ZIP module and its implementation should not be considered as stable.