Create extension taxonomy

Is there any way to create the extension taxonomy based on a XbrlDocument?

I need to create the

  • xyz.xsd
  • xyz_pre.xml
  • xyz_cal.xml
  • xyz_def.xml
  • xyz_lab-de.xml

cant find anything about it

@Developer0815

To create an extension taxonomy based on an XbrlDocument, you can utilize the XbrlDocument class provided by Aspose.Finance. This class allows you to create various XBRL files, including xyz.xsd, xyz_pre.xml, xyz_cal.xml, xyz_def.xml, and xyz_lab-de.xml.

Cause

You need to create an extension taxonomy for your XBRL documents.

Solution

Here’s a step-by-step approach to achieve this:

  1. Create an XBRL Document: Start by initializing a new instance of the XbrlDocument class.

  2. Add Schema References: Use the SchemaRefCollection to add schema references to your XBRL instance.

  3. Define Contexts: Create contexts using the Context class, which includes period and entity information.

  4. Add Units and Items: Define units and items that will be part of your XBRL instance.

  5. Save the Document: Finally, save the document in the desired format.

Here’s a minimal code example to get you started:

using Aspose.Finance.Xbrl;

XbrlDocument document = new XbrlDocument();
XbrlInstanceCollection xbrlInstances = document.XbrlInstances;
XbrlInstance xbrlInstance = xbrlInstances[xbrlInstances.Add()];

// Add schema reference
SchemaRefCollection schemaRefs = xbrlInstance.SchemaRefs;
schemaRefs.Add("path/to/xyz.xsd", "example", "http://example.com/xbrl/taxonomy");

// Define context
ContextPeriod contextPeriod = new ContextPeriod(DateTime.Parse("2020-01-01"), DateTime.Parse("2020-12-31"));
ContextEntity contextEntity = new ContextEntity("exampleIdentifierScheme", "exampleIdentifier");
Context context = new Context(contextPeriod, contextEntity);
xbrlInstance.Contexts.Add(context);

// Add units and items as needed...

// Save the document
document.Save("path/to/output/xyz_pre.xml");

You can repeat similar steps to create the other files (xyz_cal.xml, xyz_def.xml, xyz_lab-de.xml) by adjusting the content and structure as required.

Next Steps

For more detailed guidance, refer to the Aspose documentation on creating XBRL files.

If you have any further questions or need additional assistance, please feel free to ask!

This creates the iXbrl document but not the extension taxonomy files

@Developer0815,

We request you to provide a sample XBRL document along with the desired extension taxonomy files. We will review it soon.

P.S. We would appreciate it if you could zip the files before attaching them here.

Cant upload because it says too big but you can download an example here → https://www.gleif.org/about/governance/annual-report/gleif-annual-report-2023.zip

I mean the taxonoy files under gleif-annual-report-2023\gleif-2022-12-31-en\gleif.org\xbrl\2021

Is it possible to create them via aspose?

@Developer0815,

Thanks for the sample taxonomy files.

We require thorough evaluation of your requirements. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): FINANCENET-406

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.