IWriteMetadataAndBlobPlugin - BlobNormalizeDITAKeyrefs
Uppercases the key and or anchor part of the DITA keys, keyref and conkeyref attributes and gives warnings when the key part contains illegal characters.
Plugin Configuration
The following parameters can be configured:
| Parameter | Required | Default value | Allowed values | Description |
|---|---|---|---|---|
| ExtractXPath | No | (//*[not(ancestor-or-self::*[@varref])][not(ancestor::*[@conref])]/@keys) | (//*[not(ancestor-or-self::*[@varref])][not(ancestor::*[@conref])]/@keyref) | (//*[not(ancestor-or-self::*[@varref])][not(ancestor::*[@conref])]/@conkeyref) | XPath expression with the attributes to extract. | |
| KeyAnchorSeparator | No | / | The separator between the key part and the anchor part | |
| DocumentUpperCaseKeyPart | No | No | Yes, No | Specifies whether the key part needs to be uppercased in the document |
| DocumentUpperCaseAnchorPart | No | Yes | Yes, No | Specifies whether the anchor part needs to be uppercased in the document |
Metadata syntax
Errors & Warnings
In following cases the plugin will give warnings:
- When one of the following characters is encountered in the
key part: "{", "}", "[", "]", "/", "#", "?" - When a space is encountered in the
key part(except when attribute name = "keys").
The following configuration uppercases only the anchor part of the keys, keyref or conkeyref attributes.
<plugin name="ISHSYSNORMALIZEDITAKEYREFS" handler="BlobNormalizeDITAKeyrefs" ishcondition="EDT='EDTXML'">
<description>Uppercases the key and/or anchor part of the DITA keys, keyref and conkeyref attributes and gives a warning when the key part contains any illegal characters</description>
<initialize>
<parameters>
<parameter name="ExtractXPath">(//*[not(ancestor-or-self::*[@varref])][not(ancestor::*[@conref])]/@keys) | (//*[not(ancestor-or-self::*[@varref])][not(ancestor::*[@conref])]/@keyref) | (//*[not(ancestor-or-self::*[@varref])][not(ancestor::*[@conref])]/@conkeyref)</parameter>
<parameter name="KeyAnchorSeparator">/</parameter>
<parameter name="DocumentUpperCaseKeyPart">No</parameter>
<parameter name="DocumentUpperCaseAnchorPart">Yes</parameter>
</parameters>
</initialize>
</plugin>