IWriteMetadataAndBlobPlugin - BlobExtractConditions
Extracts all condition names and values used in the document and stores them in metadata. When syntactically incorrect conditions are found, it either logs a warning or throws an error. The resulting metadata contains something like e.g. MODEL:330, MODEL:660, GPRS:Y
Plugin Configuration
The following workset fields need to be configured:
| Field Name | Field Level |
|---|---|
| The name specified in the MetadataField parameter (or 'FISHCONDITIONS' if the parameter is not present) | The level specified in the MetadataFieldLevel parameter (or 'lng' if the parameter is not present) |
The following parameters can be configured:
| Parameter | Required | Default value | Allowed values | Description |
|---|---|---|---|---|
| ExtractXPath | No | //*[not(ancestor-or-self::*[@varref])][not(ancestor::*[@conref])]/@ishcondition | XPath expression with the ishcondition attributes to extract. | |
| AllowInvalid | No | No | Yes, No | If syntactically incorrect conditions are found and this setting is 'Yes', a warning is logged. If this setting is 'No', an error is thrown |
| MetadataField | No | FISHCONDITIONS | The metadata field which should be set | |
| MetadataFieldLevel | No | lng | logical, version, lng | The metadata field level |
<plugin name="ISHSYSCONDITIONSTOMETADATA" handler="BlobExtractConditions"
ishcondition="CurrentAction in ('Create', 'Update', 'Checkin') and (EDT='EDTXML')">
<description>Find conditioname/value pairs in the document, checks them and stores them in metadata</description>
<workingset>
<ishfields>
<ishfield name="FISHCONDITIONS" level="lng"/>
</ishfields>
</workingset>
<initialize>
<parameters>
<parameter name="ExtractXPath">
//*[@ishcondition][not(ancestor-or-self::*[@varref])][not(ancestor::*[@conref])]/@ishcondition</parameter>
<parameter name="AllowInvalid">No</parameter>
<parameter name="MetadataField">FISHCONDITIONS</parameter>
<parameter name="MetadataFieldLevel">lng</parameter>
</parameters>
</initialize>
</plugin>
Plugin flow
The plugin will first determine all ishcondition attributes, then syntactically check them, and then extract the condition name + value parts.