p:set-properties (3.1) 
Sets or changes document-properties.
<p:declare-step type="p:set-properties"> <input port="source" primary="true" content-types="any" sequence="false"/> <output port="result" primary="true" content-types="any" sequence="false"/> <option name="properties" as="map(xs:QName, item()*)" required="true"/> <option name="merge" as="xs:boolean" required="false" select="true()"/> </p:declare-step>
The p:set-properties step sets or changes document-properties of the source document.
Ports:
Port | Type | Primary? | Content types | Seq? | Description |
|---|---|---|---|---|---|
|
|
|
|
| The document to adjust the document-properties of. |
|
|
|
|
| The resulting document. |
Options:
A document flowing through an XProc pipeline carries a set of document-properties with it. Document-properties are
key/value pairs, where the key is a QName (which, in most cases, you can treat as just a string). Their values can be anything. Getting the
value(s) of document-properties can be done using the XProc functions p:document-properties() and p:document-property().
XProc reserves three document-property names for its own usage: content-type, base-uri and
serialization (see here for more information).
However, you can also add your own and use them in any way you like.
The p:set-properties step can be used to change (most) document-properties. For an example of using p:set-properties see Converting XML to text in step p:cast-content-type.
The p:set-properties step can not change a document media type by altering the content-type
document-property. Any attempt to do this will result in error XC0069. To change a document media type use p:cast-content-type.
The value of the serialization document-property must be a map of type map(xs:QName, item()*). If not
error XD0070 is raised.
Setting a document-property called base-uri changes the document’s base URI accordingly. See also category
Base URI related.
Error code | Description |
|---|---|
It is a dynamic error if the | |
It is a dynamic error if the base URI is not both absolute and valid according to RFC 3986 . | |
It is a dynamic error if a value is assigned to the |
This description of the p:set-properties 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:set-properties step can be found here.
The p:set-properties step is part of categories:
The p:set-properties step is also present in version:
3.0.