Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ElevenSGML Functions (continued)

XBRLLoadTaxonomy Function

Overview

The XBRLLoadTaxonomy function loads the taxonomy referenced by an instance or as specified.

Syntax/Parameters

Syntax

int    = XBRLLoadTaxonomy ( handle hXM, [string uri], [handle hLog] );

handle = XBRLLoadTaxonomy ( string uri, [handle hLog] );

Parameters

hXM

A handle to an XBRL Object. If this parameter is omitted, the function creates an XBRL Object and returns a handle to the object.

uri

A string to a taxonomy URI. When using an existing XBRL Object, this string can be omitted or empty which will force the loader to use the schema reference from the loaded instance. If loading with an instance, the URI can be unqualified in which case the base path of the instance source is used.

When creating a new XBRL Object, the a qualified URI is required.

hLog

A handle to an optional Log Object.

Return Value

If used with an XBRL Object handle, returns an int as ERROR_NONE on success or a formatted error code on failure.

If an XBRL Object is created, returns a handle to an XBRL Object or NULL_HANDLE on failure.

Note that coding errors do not count as a failure but the count is ORed in and returned as part of the return value and last error. Use the GetLastError function to retrieve error information.

When processing has been completed, the script should use the CloseHandle function to discard the handle, if created.

Remarks 

The XBRLLoadTaxonomy function can either load the taxonomy associated with an instance or load a standalone taxonomy.

With an Instance — When loading as part of an instance, an existing instance handle must be provided. The instance should contain a schema reference for the taxonomy that instance is employing. However, and if not, the uri can be provided which will override the schema reference.

Standalone — When loading a taxonomy without an instance, the instance functions such as retrieving facts, will return empty sets.

If the function succeeds, the last error will contain a count of loading errors, such as a missing linkbase. If a log handle is provided, any load errors will be logged in the object. Note, that function does not perform extensive testing of the incoming data but will report coding issues that impact the quality of the loaded instance.

If a progress window is open, the second status line is updated as linkbases are loaded.

Use the XBRLPostProcess function after the load and any imports to link all sections of the taxonomy. If the post process is not run, many high level taxonomy functions will return context errors.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic