How pseboek/xbrl-taxonomy works
Purpose and entry points
This is a Java 25/Maven reference pipeline that converts structured ESRS disclosure input into XBRL, inline XBRL (iXBRL), interactive viewer output, validation results, and taxonomy-analysis HTML artifacts. The executable entry point is src/main/java/org/esrs/pipeline/EsrsPipelineApplication.java; it composes the pipeline through src/main/java/org/esrs/pipeline/orchestration/ReportingPipelineOrchestrator.java. Maven configuration is pom.xml; generated artifacts are isolated under output/.
Input contract and orchestration
ReportEnvelope and related models provide the internal boundary between ingestion and all downstream stages: reporting entity, period, disclosure facts, units, dimensions, rendering context, and validation issues. ApiIngestionService adapts structured input into this model; the repository includes representative JSON inputs in src/main/resources/testdata/fictive-esrs-input.json and src/main/resources/testdata/fictive-esrs-input-full.json.
• src/main/java/org/esrs/pipeline/api/ApiIngestionService.java
• src/main/java/org/esrs/pipeline/model/ReportEnvelope.java
• src/main/java/org/esrs/pipeline/orchestration/ReportingPipelineOrchestrator.java
Mapping and taxonomy boundary
Mapping data resolves source fields to ESRS concepts and carries type, period, unit, and dimensional requirements. MappingRegistry loads the mapping set; scope and taxonomy validators reject mappings incompatible with the configured ESRS taxonomy. The local taxonomy package is authoritative rather than fetched at runtime, with package metadata and schemas/linkbases rooted in META-INF/ and xbrl.efrag.org/.
• mapping/map-esrs-2023-12-22.json
• src/main/java/org/esrs/pipeline/mapping/MappingRegistry.java
• src/main/java/org/esrs/pipeline/mapping/MappingTaxonomyValidator.java
XBRL construction
The pipeline transforms mapped disclosures into reusable XBRL contexts, units, and facts, then serializes a standalone XBRL instance. Context identity is a deduplication/control boundary for entity, period, and dimensions; unit definitions are catalogued separately. Output is output/report-instance.xml.
• src/main/java/org/esrs/pipeline/xbrl/context/ContextBuilder.java
• src/main/java/org/esrs/pipeline/xbrl/fact/FactBuilder.java
• src/main/java/org/esrs/pipeline/xbrl/serializer/XbrlInstanceWriter.java
iXBRL rendering and viewer export
The iXBRL branch renders report content using an XHTML base template and layout mapping, embeds generated inline facts, then produces a viewer-compatible interactive HTML export. This is a distinct presentation boundary: XBRL semantics originate in the model/mapping path while placement and report structure originate in templates/layout configuration.
• src/main/java/org/esrs/pipeline/ixbrl/template/IxbrlTemplateRenderer.java
• src/main/java/org/esrs/pipeline/ixbrl/embedding/IxbrlEmbeddingService.java
• src/main/java/org/esrs/pipeline/ixbrl/viewer/IxbrlViewerExporter.java
Validation and operational gates
Arelle is an external CLI dependency invoked by the Java validation adapter against generated XBRL and iXBRL; its logs are parsed into pipeline validation issues. Strict behavior is controlled by environment variables such as SKIP_ARELLE, FAIL_ON_VALIDATION_ISSUES, and REQUIRE_VIEWER_PLUGIN. The bundled Python Arelle iXBRL Viewer plugin and its prebuilt browser bundle support viewer export; bottle may be required by that plugin.
• src/main/java/org/esrs/pipeline/validation/arelle/ArelleValidator.java
• src/main/java/org/esrs/pipeline/validation/arelle/ValidationReportParser.java
• scripts/run-strict-production-gate.ps1
Taxonomy visualization outputs
A taxonomy exporter analyzes the local ESRS schemas, linkbases, formulas, mappings, and layout allocation to write a suite of standalone HTML analysis views, indexed from output/taxonomy-visualization.html. This stage consumes taxonomy/mapping artifacts rather than the browser viewer application.
• src/main/java/org/esrs/pipeline/visualization/TaxonomyVisualizationExporter.java
• xbrl.efrag.org/taxonomy/esrs/2023-12-22/esrs_all.xsd
• mapping/report-layout-map.json
Runtime and delivery
Primary runtime is Java 25 on Maven; CI is GitHub Actions. Arelle CLI/Python is the validation runtime, while the bundled viewer is Python plus browser JavaScript. No service deployment, database, or network API is implied: inputs, taxonomy, mappings, templates, and outputs are filesystem-based.
• .github/workflows/ci-xbrl-ixbrl-java.yml
• arelle/plugin/iXBRLViewerPlugin/iXBRLViewer.py
• arelle/plugin/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js
Main entry points: ReportEnvelope.java Report envelope · FactBuilder.java Fact builder · MappingRegistry.java Mapping registry · XbrlInstanceWriter.java XBRL instance writer
Components 23
Pipeline Core
- Java application
src/main/java/org/esrs/pipeline/EsrsPipelineApplication.java - Reporting orchestrator
src/main/java/org/esrs/pipeline/orchestration/ReportingPipelineOrchestrator.java - API ingestion
src/main/java/org/esrs/pipeline/api/ApiIngestionService.java - Report envelope · Boundary carrying facts, entity, period, units, dimensions, rendering, and issues.
src/main/java/org/esrs/pipeline/model/ReportEnvelope.java - Representative JSON input
src/main/resources/testdata/fictive-esrs-input-full.json
Mapping & Taxonomy
- Mapping registry
src/main/java/org/esrs/pipeline/mapping/MappingRegistry.java - ESRS mapping set
mapping/map-esrs-2023-12-22.json - Mapping taxonomy validator
src/main/java/org/esrs/pipeline/mapping/MappingTaxonomyValidator.java - Local ESRS taxonomy · Schemas and linkbases are local; no runtime fetch is required.
xbrl.efrag.org/taxonomy/esrs/2023-12-22/esrs_all.xsd
XBRL & Presentation
- Context builder · Deduplicates entity, period, and dimensional identities.
src/main/java/org/esrs/pipeline/xbrl/context/ContextBuilder.java - Fact builder
src/main/java/org/esrs/pipeline/xbrl/fact/FactBuilder.java - XBRL instance writer
src/main/java/org/esrs/pipeline/xbrl/serializer/XbrlInstanceWriter.java - XBRL instance
- iXBRL template renderer
src/main/java/org/esrs/pipeline/ixbrl/template/IxbrlTemplateRenderer.java - iXBRL embedding
src/main/java/org/esrs/pipeline/ixbrl/embedding/IxbrlEmbeddingService.java - Viewer exporter
src/main/java/org/esrs/pipeline/ixbrl/viewer/IxbrlViewerExporter.java - Report layout map
mapping/report-layout-map.json - Bundled iXBRL viewer
arelle/plugin/iXBRLViewerPlugin/iXBRLViewer.py
Validation & Delivery
- Arelle validator
src/main/java/org/esrs/pipeline/validation/arelle/ArelleValidator.java - Validation report parser
src/main/java/org/esrs/pipeline/validation/arelle/ValidationReportParser.java - Taxonomy visualization exporter
src/main/java/org/esrs/pipeline/visualization/TaxonomyVisualizationExporter.java - Strict production gate · Controls validation and viewer requirements through environment variables.
scripts/run-strict-production-gate.ps1 - GitHub Actions CI
.github/workflows/ci-xbrl-ixbrl-java.yml
Connections 28
- Java application → Reporting orchestrator: starts
- Representative JSON input → API ingestion: supplies
- API ingestion → Report envelope: adapts to
- Reporting orchestrator → Report envelope: coordinates
- ESRS mapping set → Mapping registry: loaded by
- Mapping registry → Mapping taxonomy validator: validates mappings
- Local ESRS taxonomy → Mapping taxonomy validator: defines compatibility
- Report envelope → Context builder: entity, period, dimensions
- Report envelope → Fact builder: disclosures
- Mapping registry → Fact builder: resolves concepts
- Context builder → XBRL instance writer: contexts and units
- Fact builder → XBRL instance writer: facts
- XBRL instance writer → XBRL instance: writes
- Report envelope → iXBRL template renderer: rendering context
- Report layout map → iXBRL template renderer: places report sections
- iXBRL template renderer → iXBRL embedding: XHTML base
- Fact builder → iXBRL embedding: inline facts
- iXBRL embedding → Viewer exporter: iXBRL document
- Bundled iXBRL viewer → Viewer exporter: viewer bundle
- XBRL instance → Arelle validator: validates
- Arelle validator → Validation report parser: CLI logs
- Validation report parser → Report envelope: validation issues
- Local ESRS taxonomy → Taxonomy visualization exporter: analyzes
- ESRS mapping set → Taxonomy visualization exporter: analyzes mappings
- Report layout map → Taxonomy visualization exporter: analyzes allocation
- Strict production gate → Arelle validator: controls execution
- Strict production gate → Viewer exporter: requires plugin
- GitHub Actions CI → Java application: builds and runs