IWriteMetadataAndBlobPlugin - BlobCompareValue
Compares whether 2 values are the same or not. If not, a DifferentValuesFoundException is thrown. If one or both values contain a nodelist, all node.InnerText strings should match the other value.
Plugin Configuration
The following parameters can be configured:
| Parameter | Required | Default value | Allowed values | Description |
|---|---|---|---|---|
| FirstValue | Yes | One of the following can be used to specify the value:
| First value for comparison | |
| SecondValue | Yes | Same allowed values as for the FirstValue parameter | Second value for comparison |
<plugin name="CHECKMASTERORMAPID" handler="BlobCompareValue"
ishcondition="CurrentAction in ('Create', 'Update', 'Checkin', 'CreateTranslation') and (EDT='EDTXML')">
<description>Check that the id in the document is the same as the DocId provided via metadata</description>
<initialize>
<parameters>
<parameter name="FirstValue">
<value type="DocExtractXPath">(/*[contains(@class,' map/map ')]/@id) | (/*[contains(@class,' topic/topic ')]/@id) | (dita/@id)</value>
</parameter>
<parameter name="SecondValue">
<value type="Parameter">DocID</value>
</parameter>
<!-- -111 = ciErrXMLIncorrectIdError -->
<!-- parameter name="ErrorNumber">-111</parameter -->
</parameters>
</initialize>
</plugin>
Plugin flow
The plugin will retrieve the values for both parameters and compare them.