XhBtRmL Configuration file

From XBRLWiki
Jump to: navigation, search

During the creation of an [TransformProcessor] instance, the URI of a configuration file is required. The configuration file contains information required by the TransformProcessor in order to get all required information.

The configuration file must be a valid instance of an XML document according to the schema documented in this section.


The namespace for the configuration file is http://www.reportingstandard.com/transform/0

Schema location

The schema location for the configuration file is http://www.reportingstandard.com/taxonomies/versioning/transformer.xsd

Sample file

This is the content of a sample configuration file: <syntaxhighlight lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <xbrlTransformation

 xsi:schemaLocation="http://www.reportingstandard.com/transform/0 http://www.reportingstandard.com/taxonomies/versioning/transformer.xsd">
       <transformer class="com.ihr.xbrl.transform.target.HTMLFactHandler" configFile="samples/htmlFactConfigFile.xml"/>
       <result class="com.ihr.xbrl.transform.target.HTMLReportHandler" configFile="samples/htmlReportConfigFileSample.xml"/>

</xbrlTransformation> </syntaxhighlight>

Configuration file content

Root element

The root element is <xbrlTransformation ...>. The content of the <xbrlTransformation ...> is a sequence of one or more dts elements. This means, the same TransformProcessor instance can be used for multiple DTSs simultaneously.

The dts element

This element defines how a DTS is defined and what the TransformProcessor will do with it. The first child of the dts element is optional and is an indication to let the processor knows if the DTS will contain or not dimensions. This is indicated by the optional empty dimensional element.

The file element

The next element is file. The content of the file element is a relative or absolute URL pointing to a file. There may be one or many file elements. file elements will be used in order to define the DTS that should match the DTS of instance document submitted to the transformer for processing.

A DTS will be defined inside the transformation processor using the URLs indicated in file elements and the DTS discovery rules in section 3.2 of the XBRL 2.1 specification. If the user points to a schema that contains linkbases, the DTS will contain the schema and the discovered linkbases. A matching instance document accepted for processing must contain the same documents set in the DTS.

The transformer element

Transformation requires an object responsible of attending transformation events. This is done by classes implementing interfaces, in this case the transformer is implemented by the com.ihr.xbrl.transform.target.HTMLFactHandler class. The interface of that class accepts a configuration file but the implementation class actually does not require a configuration file so the parameter is not used.

The resultInstances element

The TransformProcessor instance keeps an internal pool of created ReportHandlers. ReportHandlers are used in order to allow multiple threads to run concurrently on the transformation from XBRL to HTML without interfering one in the memory space of the other. The parameter indicated here is the initial pool size. The pool grows up automatically.

The result element

This is the class and configuration file for the ReportHandler. In this example the class in use is the com.ihr.xbrl.transform.target.HTMLReportHandler and this class requires a configuration file in order to indicate special number formatting options, default number formatting options and the initial template to be used. Refer to the section XhBtRmL HTMLReportHandler Configuration file for more information.


Main Page | XhBtRmL