The basis of all validation engines

From XBRLWiki
Jump to: navigation, search

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:

  1. The entire classpath (all jars in the classpath) are examined looking for a directory called RSXBRLMANIFEST and a file in that directory called
  2. When a file with that information is found, a property with name processor-factories is obtained.
  3. That property value must be a comma separated list of class names implementing the XBRLProcessorFactory interface.
  4. An instance of the factory class is created with no arguments constructor and the method getProcessorName() is called over the new factory instance.
  5. 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

A validation chain is the content of the PROCESSORS_SEQUENCE property that is passed in to the creation of the DTSContainer

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:

  1. a processor factory must be registered with a unique name
  2. the processor name must be added to the PROCESSORS_SEQUENCE property
  3. during a call to the validate() method, the processor can creare new errors and inconsistencies and add them to the validation report


XBRL API related discussions