Compresses a document.
<p:declare-step type="p:compress"> <input port="source" primary="true" content-types="any" sequence="false"/> <output port="result" primary="true" content-types="any" sequence="false"/> <option name="format" as="xs:QName" required="false" select="'gzip'"/> <option name="parameters" as="map(xs:QName, item()*)?" required="false" select="()"/> <option name="serialization" as="map(xs:QName,item()*)?" required="false" select="()"/> </p:declare-step>
The p:compress
step serializes the document appearing on its source
port and outputs a compressed version of this on its
result
port.
Ports:
Port | Type | Primary? | Content types | Seq? | Description |
---|---|---|---|---|---|
|
|
|
|
| The document to compress. |
|
|
|
|
| The resulting compressed document |
Options:
The p:compress
step first serializes the document appearing on its source
. It then compresses the outcome of this serialization
using the format as specified in the format
option. The result, usually a binary document, appears on its result
port.
The only compression format that must be supported is GZIP. Support for any other compression format is implementation-defined and therefore dependent on the XProc processor used.
The reverse uncompress operation is supported by the p:uncompress
step.
p:compress
preserves all document-properties of the document(s) appearing on its source
port.
Exceptions are the content-type
document-property which is updated accordingly and the
serialization
document-property which is removed.
This description of the p:compress
step is for XProc version: 3.1. This is a required step (an XProc 3.1 processor must support this).
The formal specification for the p:compress
step can be found here.
The p:compress
step is part of categories:
The p:compress
step is also present in version:
3.0.