Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter ElevenSGML Functions (continued)

XBRLGetRoleReferences Function

Overview

The XBRLGetRoleReferences function returns all presentation links present in the instance/taxonomy.

Syntax/Parameters

Syntax

string[][] = XBRLGetRoleReferences ( handle hXM, [int linkbase] );

Parameters

hXM

A handle to an XBRL Object containing taxonomy information.

linkbase

An optional int specifying which specific linkbase to retrieve the role references. The default value is -1, or all linkbases.

Return Value

Returns a string table of all role references or an empty array on failure. Use the GetLastError function to retrieve a formatted error code.

Remarks

If a linkbase is not specified, all role references are returned. The linkbase types have SDK definitions as follows:

  SDK Definition   Value   Description  
  XM_RRST_UNDEFINED   0   Undefined (not set)  
  XM_RRST_CALCULATION   1   Calculation Linkbase  
  XM_RRST_DEFINITION   2   Definition Linkbase  
  XM_RRST_FOOTNOTE   3   Footnote Link  
  XM_RRST_LABEL   4   Label Linkbase  
  XM_RRST_PRESENTATION   5   Presentation Linkbase  
  XM_RRST_REFERENCE   6   Reference Linkbase  

 

The return data data is a table containing a row for each definition. The column key names are as follows: 

  Key Name   Description/Comment  
           
  Position      
    position   Zero-based decimal string version of the position of the record.  
  Reference Record:      
    role_uri   The identifier used to reference the record.  
    href   The taxonomy item to reference.  
    src_type   The linkbase source type as defined in the table above.  
  Control      
    s_dx   Source file DTS index. String is “-1” if not from the DTS.  
    s_lx   Source file linkbase index. String is “-1” if not from the Linkbase List.  
    o_sx   Position in source file.  
    o_sy   Position in source file.  
    ref_cnt   Number of arc references.  
    rr_flags   A string as a hexadecimal value for the status of the entry.  

 

On taxonomy load, the role reference list is sorted by the role_uri keyname. The position column indicates the original order, as discovered.

The XBRLGetLinkbaseList function can be used to translate the source file for the s_lx key name. Likewise, the XBRLGetSchemaList function can be used to retrieve file URLs for the s_dx key name.

Related Functions

Platform Support

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

Legato IDE, Legato Basic