IWriteMetadataAndBlobPlugin - BlobValidate
Checks whether the XML content is valid against a DTD.
Plugin Configuration
The following parameters can be configured:
| Parameter | Required | Default value | Allowed values | Description |
|---|---|---|---|---|
| DocumentRequiresDTD | No | No | Yes, No | Specifies whether the xml must have a DTD. If 'Yes' and no DTD is found, an error is thrown |
| AllowInvalid | No | Yes | Yes, No | If 'Yes', logs a warning when invalid xml is found. If 'No', throws an error. |
<plugin name="VALIDATEDTD" handler="BlobValidate"
ishcondition="CurrentAction in ('Create', 'Update', 'Checkin') and (EDT='EDTXML')">
<description>Checks document validity against DTD</description>
<initialize>
<parameters>
<parameter name="AllowInvalid">No</parameter>
<parameter name="DocumentRequiresDTD">Yes</parameter>
</parameters>
</initialize>
</plugin>
Plugin flow
The plugin will first determine whether the XML content contains a "<DOCTYPE" part or not. If yes, the plugin will validate using DTD. If not, and DocumentRequiresDTD='Yes', the plugin will throw an error.