Name
p:archive-manifest — The standard p:archive-manifest step.
Synopsis
The p:archive-manifest
creates an XML manifest file describing the contents of
the archive appearing on its source port.
Input port | Primary | Sequence | Content types |
---|---|---|---|
source | ✔ | any |
Output port | Primary | Sequence | Content types |
---|---|---|---|
result | ✔ | application/xml |
Option name | Type | Default value |
---|---|---|
format | xs:QName? | () |
override-content-types | array(array(xs:string))? | () |
parameters | map(xs:QName, item()*)? | () |
relative-to | xs:anyURI? | () |
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
| <p:input port="source"
| primary="true"
| content-types="any"
5 | sequence="false"/>
| <p:output port="result"
| primary="true"
| content-types="application/xml"
| sequence="false"/>
10 | <p:option name="format" as="xs:QName?"/>
| <p:option name="parameters" as="map(xs:QName, item()*)?"/>
| <p:option name="relative-to" as="xs:anyURI?"/>
| <p:option name="override-content-types" as="array(array(xs:string))?"/>
|</p:declare-step>
Errors
Code | Description |
---|---|
err:XC0079 | It is a dynamic error (err:XC0079 ) if the map
parameters contains an entry whose key is defined by the implementation and
whose value is not valid for that key. |
err:XC0081 | It is a dynamic error (err:XC0081 ) if the format of the
archive does not match the format as specified in the format
option. |
err:XC0085 | It is a dynamic error (err:XC0085 ) if the format of the
archive cannot be understood, determined and/or processed. |
err:XC0120 | It is a dynamic error (err:XC0120 ) if the relative-to
option is not present and the document on the source port does not have a base
URI. |
err:XC0146 | It is a dynamic error (err:XC0146 ) if the specified value
for the override-content-types option is not an array of arrays, where the
inner arrays have exactly two members of type xs:string . |
err:XC0147 | It is a dynamic
error (err:XC0147 ) if the specified value is not a valid XPath regular
expression. |
err:XD0064 | It is a dynamic
error (err:XD0064 ) if the base URI is not both absolute and valid according to RFC 3986. |
err:XD0079 | It is a dynamic error (err:XD0079 ) if a supplied
content-type is not a valid media type of the form
“type/subtype+ext ”
or “type/subtype ”. |
Implementation defined features
- It is implementation-defined what other formats are supported.
- It is implementation-defined how the step determines the archive's format.
- The semantics of the keys and the allowed values for these keys are implementation-defined.
- Additional information provided for entries in
p:archive-manifest
is implementation-defined.
Description
The p:archive-manifest
step is defined in the
XProc 3.0:
Standard Step Library. It is also described on
XProcRef.org.
Supported formats
The supported formats are
7z,
Ar,
Arj,
Cpio,
Jar,
Tar, and
Zip. For more information, see the
p:archive
step.
Details about the manifest entries for the various formats follow.
7z Archives
Entries for 7z archives have the following format:
<c:entry | |
name = string | The entry name. |
href = anyURI | The entry URI. |
content-type = string | The content-type. |
comment? = string | A comment associated with the entry. |
method? = string | The storage method. |
level? = string | The compression level. |
cx:mode? = integer | The Unix mode bits. |
cx:mode-string? = string | The Unix mode as a string. |
cx:crc? = integer | The entry CRC value. |
cx:file-creation-time? = dateTime | The file creation time. |
cx:last-access-time? = dateTime | The file last access time. |
cx:windows-attributes? = integer | The Windows attributes |
cx:anti-item? = boolean | Is this an “anti-item”? |
cx:size = nonNegativeInteger | The size of the entry when expanded. |
/> |
The possible compression methods are
“none
” (no compression),
“lzma
”,
“lzma2
”,
“deflate
”,
“deflate64
”,
“bzip2
”, or
“unknown
” (if the method was not recognized).
The 7z format calls the compression method that does no compression “copy”. It’s renamed to “none” here for consistency with the XProc archive format.
AR Archives
Entries for AR archives have the following format:
<c:entry | |
name = string | The entry name. |
href = anyURI | The entry URI. |
content-type = string | The content-type. |
comment? = string | A comment associated with the entry. |
method? = string | The storage method. |
level? = string | The compression level. |
cx:mode? = integer | The Unix mode bits. |
cx:mode-string? = string | The Unix mode as a string. |
cx:group-id = integer | The group id. |
cx:last-modified? = dateTime | The last modification time. |
cx:size = nonNegativeInteger | The size of the entry when expanded. |
/> |
ARJ Archives
Entries for ARJ archives have the following format:
<c:entry | |
name = string | The entry name. |
href = anyURI | The entry URI. |
content-type = string | The content-type. |
comment? = string | A comment associated with the entry. |
method? = string | The storage method. |
level? = string | The compression level. |
cx:mode? = integer | The Unix mode bits. |
cx:mode-string? = string | The Unix mode as a string. |
cx:windows-attributes = integer | The Windows attributes |
cx:last-modified? = dateTime | The last modification time. |
cx:host-os? = string | Operating system where the archive was created. |
cx:size = nonNegativeInteger | The size of the entry when expanded. |
/> |
The host operating system values are
“Amiga
”,
“Apple IIGS
”,
“Atari ST
”,
“DOS
”,
“MacOS
”,
“Next
”,
“OS/2
”,
“PRIMOS
”,
“Unix
”,
“VAX/VMS
”,
“Windows
”, or
“Windows95
”.
Cpio Archives
Entries for Cpio archives have the following format:
<c:entry | |
name = string | The entry name. |
href = anyURI | The entry URI. |
content-type = string | The content-type. |
cx:mode? = integer | The Unix mode bits. |
cx:mode-string? = string | The Unix mode as a string. |
cx:format = new|new-crc|new-mask|old-ascii|old-binary|old-mask|unknown | The CPIO format. |
cx:check-sum? = integer | The check sum. |
cx:dev-major? = integer | The device major number. |
cx:dev-minor? = integer | The device minor number. |
cx:remote-dev-major? = integer | The remote device major number. |
cx:remote-dev-minor? = integer | The remote device minor number. |
cx:device? = string | The device number. |
cx:remote-device? = string | The remote device number. |
cx:user-id? = string | The user id. |
cx:group-id? = string | The group id. |
cx:last-modified? = dateTime | The last modification time. |
cx:number-of-links? = string | The number of links. |
cx:time? = dateTime | The time of the entry. |
cx:device-type? = block-device|character-device|directory|network|pipe|socket|symbolic-link | The device type. |
cx:size = nonNegativeInteger | The size of the entry when expanded. |
/> |
Integer values are omitted if they are zero.
Tar Archives
Entries for tar archives have the following format:
<c:entry | |
name = string | The entry name. |
href = anyURI | The entry URI. |
content-type = string | The content-type. |
comment? = string | A comment associated with the entry. |
method? = string | The storage method. |
level? = string | The compression level. |
cx:mode = integer | The Unix mode bits. |
cx:mode-string = string | The Unix mode as a string. |
cx:dev-major? = integer | The device major number. |
cx:dev-minor? = integer | The device minor number. |
cx:group-id = integer | The group id. |
cx:group-name = string | The group name. |
cx:user-id = integer | The user id. |
cx:user-name = string | The user name. |
cx:link-flag? = integer | The link flag. |
cx:link-name? = string | The link name. |
cx:file-creation-time? = dateTime | The file creation time. |
cx:last-access-time? = dateTime | The file last access time. |
cx:last-modified? = dateTime | The last modification time. |
cx:status-change-time? = dateTime | The file last status change time. |
cx:size = nonNegativeInteger | The size of the entry when expanded. |
/> |
The cx:dev-major
and cx:dev-minor
attributes are omited if they have a value of zero.
The cx:link-flag
is only present if it isn’t 0 (or ‘0’, 0x30).
The cx:link-name
is only present if it isn’t null or blank.
An entry with a cx:link-flag
of ‘5’ is assumed to be a directory
and is omited from the manifest.
Sparse tar entries are not supported.
Zip (and Jar) Archives
Jar archive files are just Zip archives with a different filename extension. Entries have the following format:
<c:entry | |
name = string | The entry name. |
href = anyURI | The entry URI. |
content-type = string | The content-type. |
comment? = string | A comment associated with the entry. |
method? = string | The storage method. |
level? = string | The compression level. |
cx:mode? = integer | The Unix mode bits. |
cx:mode-string? = string | The Unix mode as a string. |
cx:file-creation-time? = dateTime | The file creation time. |
cx:last-access-time? = dateTime | The file last access time. |
cx:last-modified? = dateTime | The last modification time. |
cx:size = nonNegativeInteger | The size of the entry when expanded. |
/> |
The cx:mode
and cx:mode-string
attributes are omited if the mode value is zero.
The possible compression methods are
“none
” (no compression),
“deflated
”, or
“unknown
” (if the method was not recognized).
Notes
Support for the 7z format requires the
org.tukaani:xz:1.10
package on the classpath.The
cx:mode-string
attribute contains a string representation of the traditional Unix mode bits. For example,-rw-r-----
for a file that is readable and writable by the owner, readable by members of the same group, and not accessible by others.Generally, the
cx:mode
andcx:mode-string
attributes will either both be present or neither will be present.