arch:create-map
Returns a new archive with each of the given entries named as a key in
$entries
set to the corresponding value in
$entries($key)('content')
.
create-map($entries as map(xs:string,map(xs:string,item()*))) ➔ xs:base64Binary
Arguments | |||
| $entries | map(xs:string,map(xs:string,item()*)) | The names of the entries required |
Result | xs:base64Binary |
create-map($entries as map(xs:string,map(xs:string,item()*)), $options as map(xs:string,item()*)) ➔ xs:base64Binary
Arguments | |||
| $entries | map(xs:string,map(xs:string,item()*)) | The names of the entries required |
| $options | map(xs:string,item()*) | Options for the created archive |
Result | xs:base64Binary |
Namespace
http://expath.org/ns/archive
Links to specifications
Saxon availability
Requires support for XPath 3.0 to be enabled. Implemented since Saxon 9.6. Requires Saxon-PE or Saxon-EE. Available for Java and C/C++ only (not .NET).
Notes on the Saxon implementation
Both signatures are supported since 9.8.0.5.
The entries are keyed by the (string) 'pathname' e.g. mimetype
or
net/sf/saxon/licence.xml
. Each entry is a map
(map(xs:string,item()?)
) with the following key/value pairs:
Key | Type | Values | Meaning | |
---|---|---|---|---|
content | required | xs:base64Binary | The actual content of the entry | |
compression | optional | xs:string | stored |deflate |
The compression method to use for this entry with two possible
values:
deflate . |
position | optional | xs:integer |
1
|
This entry must be placed first in the archive. This enables for example the mimetype entry in EPUB3 to be placed as required, as the first within the archive. It is an error if more than one entry makes such a declaration. |
In the two-argument form $options
provides a default set of options for each
entry - currently the only meaningful key is compression
with values as given
above.