Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter ElevenSGML Functions (continued)

XBRLAddConcept Function

Overview

The XBRLAddConcept function adds a concept to the XBRL Model concept table.

Syntax/Parameters

Syntax

int = XBRLAddConcept ( handle hXM, string properties[], [dword flags] );

Parameters

hXM

A handle to an XBRL Object obtained using the XBRLCreateObject function.

properties

A string list containing information about the concept to be added.

Return Value

Returns an int as the index of the record position for the added item or a formatted error code on failure. The last error message will contain additional textual information regarding the failure. Use the GetLastErrorMessage and GetLastError functions to retrieve error information.

Remarks

Concepts can be added to the taxonomy concepts table one by one using this function. The caller must create a keyed string array using the following key names:

I
  Key Name   Description/Comment  
           
  Control Information:      
    id   String concept ID as specified by the taxonomy. While optional, this value should unique. If the value is set to “(auto)”, the function will create an ID based on prefix and concept name. The uniqueness of the ID is tested on post processing.
  Basic Data:      
    name   Concept name. The name should follow LC3 and XBRL Style Guide recommendations and be XML valid for an element name.  
    namespace   The namespace for the item. This should match the eventual filename/url for the exported data.  
    uri   The namespace for the item. This should match the eventual filename/url for the exported data.  
    prefix   Prefix to be associated with the namespace. When combined with the name, this creates a qname for a qualified reference to the concept.  
  Attributes:      
    abstract   Optionally specifies that the concept is an abstract. The value is tested as a “true” or “1”. An error or default is “false”.  
    nillable   Optionally specifies that facts using the concept can be nil. The value is tested as a “true” or “1”. An error or default is “false”.  
    period_type   The period type for the concept. Set as “instance” or “duration” or blank if not provided in the taxonomy schema.  
    balance_type   Optionally specifies the balance type for the concept. Set as “debit” or “credit” or blank if not provided in the taxonomy schema.  
    data_type   Data type for facts associated with the concept. The data type must exist within the XBRL Model object.  
    substitution_group  

The substitution group for the concept. This may be one of the following:

xbrldt:dimensionItem

xbrldt:hypercubeItem

xbrli:item

xbrli:tuple

[Or it may be custom. It will empty on a incomplete concept record.]

 
    typed_domain_ref   Data locate the element in an XML Schema that defines the content of a typed dimension.  
    restrictions   Locally defined data type restrictions. For tokens, a line delimited (0x0D) list is provided with the header “Enumerations:”.  

 

At the completion of adding concepts, the model must be post processed using the XBRLPostProcess function to sort/resort the data for reference by other functions.

Data types must be imported using the XBRLImportTaxonomy function prior to referencing them within an added concept. Standard XML and XBRL types are automatically added [but should be imported so they are added to the import list].

Related Functions

Platform Support

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

Legato IDE, Legato Basic