p:set-attributes — The standard p:set-attributes step.
The p:set-attributes
step sets attributes on
matching elements.
Input port | Primary | Sequence | Content types |
---|
source | ✔ | | xml html |
Output port | Primary | Sequence | Content types |
---|
result | ✔ | | xml html |
Option name | Type | Default value | Required |
---|
attributes | map(xs:QName, xs:anyAtomicType) | | ✔ |
match | XSLTSelectionPattern | '/*' | |
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
| <p:input port="source" primary="true" content-types="xml html"/>
| <p:output port="result" content-types="xml html"/>
| <p:option xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"
5 | name="match"
| as="xs:string"
| select="'/*'"
| e:type="XSLTSelectionPattern"/>
| <p:option name="attributes"
10 | required="true"
| as="map(xs:QName, xs:anyAtomicType)"/>
|</p:declare-step>
Errors
Code | Description |
---|
err:XC0023 | It is a dynamic
error (err:XC0023 ) if that pattern matches anything other than element
nodes. |
err:XC0059 | It is a dynamic error (err:XC0059 ) if the name
of any attribute is “xmlns ” or uses the prefix
“xmlns ”
or any other prefix that resolves to the namespace name
http://www.w3.org/2000/xmlns/ . |