The basis of all validation engines
The basis of Reporting Standard S.L. validation engines
What's a validation engine
A validation engine is a java class that implements the XBRLPlugInProcessor interface and performs validation of an XBRL report or XBRL Taxonomy by executing code and utilizing the XBRL object model from the RS API. All existing processors already works the same way. All them implements the XBRLPlugInProcessor interface and executes code looking for error conditions as indicated in the XBRL Specifications.
Validation engines are created by the API when they are needed during the validation process. The validation process is driven internally by the DTSContainer class.
In order for the DTSContainer class to create a validator instance, validation factories must be registered.
What's a validation engine factory
A validation engine factory is a java class implementing the XBRLProcessorFactory interface (or extending the XBRLProcessorFactoryBase abstract class) that is able to create an instance of the a validation engine when it is needed to validate a specific DTSContainer instance.
During the API initialization phase, all factories of validation engines are "discovered" in the java classpath using this technique:
- The entire classpath (all jars in the classpath) are examined looking for a directory called RSXBRLMANIFEST and a file in that directory called xbrlprocessors.properties.
- When a file with that information is found, a property with name processor-factories is obtained.
- That property value must be a comma separated list of class names implementing the XBRLProcessorFactory interface.
- An instance of the factory class is created with no arguments constructor and the method getProcessorName() is called over the new factory instance.
- Then, the factory class is registered inside the static part of the DTSContainer and the new processor name is available to be used in the validation chain.
What's the validation chain
This property can be used to manipulate the chain of processors that will handle XBRL Validation.
In order to use custom processors during XBRL Validation phase they must satisfy the following requirements:
- a processor factory must be registered with a unique name
- the processor name must be added to the PROCESSORS_SEQUENCE property
- during a call to the validate() method, the processor can creare new errors and inconsistencies and add them to the validation report