Uncompresses a document.
<p:declare-step type="p:uncompress"> <input port="source" primary="true" content-types="any" sequence="false"/> <output port="result" primary="true" content-types="any" sequence="false"/> <option name="content-type" as="xs:string" required="false" select="'application/octet-stream'"/> <option name="format" as="xs:QName?" required="false" select="()"/> <option name="parameters" as="map(xs:QName,item()*)?" required="false" select="()"/> </p:declare-step>
The p:uncompress
step expects on its source
port a compressed (usually binary) document. It outputs an uncompressed version of this
document on its result
port.
Ports:
Port | Type | Primary? | Content types | Seq? | Description |
---|---|---|---|---|---|
|
|
|
|
| The document to uncompress |
|
|
|
|
| The resulting uncompressed document. |
Options:
The p:uncompress
step uncompresses the document appearing on its source
port.
To do this it first determines the compression format (see the description of the format
option). Usually this will be
GZIP, the only compression format an XProc processor is
required to support.
After the uncompression, the result is interpreted according to the value of the step’s content-type
option. If
nothing is specified, the resulting document will just flow out as a generic binary document (media type application/octet-stream
).
However, if an explicit media type is specified, for instance text/xml
, the result is interpreted as such and cast to this type. Of
course this must be possible, if not error XC0201
is raised.
p:uncompress
preserves all document-properties of the document(s) appearing on its source
port.
Exception is the content-type
document-property which is updated accordingly.
Error code | Description |
---|---|
It is a dynamic error if the map | |
It is a dynamic error if the | |
It is a dynamic error if the compression format cannot be understood, determined and/or processed. | |
It is a dynamic error if a supplied content-type is not a valid media type of the form “ |
This description of the p:uncompress
step is for XProc version: 3.0. This is a required step (an XProc 3.0 processor must support this).
The formal specification for the p:uncompress
step can be found here.
The p:uncompress
step is part of categories:
The p:uncompress
step is also present in version:
3.1.