XODEL is an expression syntax that allows the creation of XBRL taxonomies using a XULE processor.
XODEL uses the XULE syntax to create new taxonomy objects and redefine existing taxonomy objects. The diagram below shows how XODEL can be used to redefine existing taxonomies into new taxonomies, how taxonomies can be created from alternative data sources and how taxonomies can be serialized into different components.
Creating Taxonomy Objects using XODEL
XODEL allows a user to define the following taxonomy objects:
- Packages
- Documents
- Roles
- Arcroles
- Relationships
- Concepts
- Labels
- References
- Networks
- Types
The ability to manipulate taxonomy objects at a granular level using XULE means that it is possible to perform the following:
- Create XBRL concepts based on an Excel sheet
- Rollover an existing taxonomy package to to a subsequent taxonomy
- Create a taxonomy package from an existing taxonomy
- Create an extension taxonomy
Taxonomy Generation Example
Create an extension taxonomy with the following extension elements. These are defined in extensions.csv
Add extensions.csv to a variable called $EXTENSION_CONCEPTS
constant $EXTENSION_CONCEPTS = csv-data('extensions.csv',false, list( 'string', 'string', 'string')
This uses the function csv-data that has the following structure:
csv-data(file name, has headers, list of field types)
First, we define a new taxonomy package We call the new taxonomy package MyTaxonomy. This taxonomy imports the FASB taxonomy, the dei taxonomy and the srt taxonomy.
constant $EXTENSION_TAXONOMY = 'MyTaxonomy'
output create_base_taxonomy true package-name $EXTENSION_TAXONOMY package-url 'https://taxonomies.xbrl.us/xodel/MyTaxonomy' document-uri 'abc.xsd' document-import set('https://fasb.org/elts/us-gaap-2023.xsd', 'https://fasb.org/elts/us-srt-2023.xsd', 'https://sec.gov/elts/dei-2023.xsd') document-package-entry-point true document-package-entry-point-description 'main entry point'
Next, we create the extension concepts based on the Assets concept in the us-gaap taxonomy. The first step is to bring in the us-gaap taxonomy as follows:
constant $US-GAAP = taxonomy('https://fasb.org/elts/us-gaap-2023.xsd')
Then create new concepts based off the us-gaap taxonomy element Assets.
output create_extension_concepts $baseAsset = $US-GAAP.concept(Assets) $UniqueAssets = set(filter $EXTENSION_CONCEPTS returns $item[1]) for $asset in $UniqueAssets $asset package-name $EXTENSION_TAXONOMY document-uri 'abc.xsd' concept $baseAsset.to-xodel concept-namespace 'https://abc.com/2024' concept-local-name $rule-value
Finally, we create the labels based on the data in the csv file.
output create_extension_labels for $label in $EXTENSION_CONCEPTS $label package-name $EXTENSION_TAXONOMY document-uri 'abc_lab.xml' label-concept-name qname('https://abc.com/2024', $label[1]).to-xodel label-text $label[3] label-role 'http://www.xbrl.org/2003/role/' + $label[2]
This will generate a taxonomy package containing the following files:
- abc.xsd
- abc_lab.xml
- catalog.xml
- taxonomyPackage.xml
Comment
You must be logged in to post a comment.