Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ElevenSGML Functions (continued)

XBRLExportXMLSegment Function†

Overview

The XBRLExportXMLSegment function exports a portion of the XBRL Model object as an XML segment to be used to build XML instances, taxonomies or linkbases.

Syntax/Parameters

Syntax

string = XBRLExportXMLSegment ( handle hXM, dword what, [string options] );

Parameters

hXM

A handle to an XBRL Object.

what

A dword specifying what to export. This defines the model item to export and additional formatting options. See Remarks below.

options

An optional string specifying parameter-value pairs for specific export segments. The parameter names are specific to the table being exported.

Return Value

Returns an int as the count of the number of contexts loaded or a formatted error code on failure.

Remarks 

† This function and the associated writing functions are in a prototype state,

The XBRLExportXMLSegment functions exports a section of the XBRL Model to XML. Since taxonomies and instances and can be constructed in differing manners, this function allows those components to be exported and the caller to determine which files contain which components.

The what parameter determines what will be exported:

                                                        /*******************************/
                                                        /* ** Export Types (prototype) */
                                                        /*  * Export What              */
#define XM_EXPORT_TYPE_MASK             0x0FFFF000      /* Export Type Mask            */
                                                        /*  o Instance Items           */
#define XM_EXPORT_CONTEXTS              0x00001000      /* Contexts                    */
#define XM_EXPORT_FACTS_XML             0x00002000      /* Facts (XML)                 */
#define XM_EXPORT_FACTS_IXBRL           0x00003000      /* Facts (iXBRL)               */
#define XM_EXPORT_FOOTNOTES ‡           0x00004000      /* Footnotes                   */
#define XM_EXPORT_IX_HEADER_OPEN ‡      0x00005000      /* iXBRL Header Tags           */
#define XM_EXPORT_IX_HEADER_CLOSE ‡     0x00006000      /* iXBRL Header Tags           */
#define XM_EXPORT_REFERENCES ‡          0x00007000      /* References (Schema)         */
#define XM_EXPORT_UNITS                 0x00008000      /* Units                       */
                                                        /* o Combination               */ 
#define XM_EXPORT_XML_INSTANCE ‡        0x0000B000      /* XML Instance                */
#define XM_EXPORT_IXBRL_HIDDEN          0x0000C000      /* iXBRL Hidden Section        */
                                                        /*  o Taxonomy                 */
#define XM_EXPORT_CONCEPTS              0x00010000      /* Concepts (only)             */
#define XM_EXPORT_SCHEMA                0x00020000      /* Schema                      */
                                                        /*  > Linkbases                */
#define XM_EXPORT_CALCULATION ‡         0x00110000      /* Calculation Linkbase        */
#define XM_EXPORT_DEFINITION ‡          0x00120000      /* Definition Linkbase         */
#define XM_EXPORT_LABELS ‡              0x00130000      /* Label Linkbase              */
#define XM_EXPORT_PRESENTATION ‡        0x00140000      /* Presentation Linkbase       */
#define XM_EXPORT_REFERENCE ‡           0x00150000      /* Reference Linkbase          */
                                                        /*  * Options                  */
#define XM_EXPORT_PAD_MASK              0x0000000F      /* Pad of Code                 */
#define XM_EXPORT_INDENT_MASK           0x000000F0      /* Indent Mask                 */
#define XM_EXPORT_INDENT_SHIFT          0x00000004      /* Indent Shift Value          */
#define XM_EXPORT_NEW_LINES             0x10000000      /* Adds New Lines              */

 

‡ Indicates not implemented. 

Concept Options

The model can contain many cpncepts from multiple taxonomies. They can consist of many groups of concepts belonging to specified and imported schemas. By default, the XBRLExportXMLSegment will export the specified items. If it is desired or export another prefix/namespace, then the following option would be used:

prefix: name

Allows only records with the specified prefix to be exported, The default only the specified concepts are exported.

Related Functions

Platform Support

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

Legato IDE, Legato Basic