Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter ElevenSGML Functions (continued)

11.20.10 Instance — Contexts

After a load has been performed, the contexts are sorted by ID for fast searching.

The following key name are use as context list entries or as table columns:

  Key Name   Description/Comment  
           
  Control Information:      
    position†   A decimal string specifying the position of the item within the context records. This can be used for direct access to data records.  
    id   String context ID as specified by the instance. This value must be unique and the context list primary sorted key is based on this ID.  
  Basic Data:      
    entity†   The legal entity axis.  
    scheme†   The legal entity scheme (unique URL for type and syntax).  
    date_a   The instance date or the starting date of a duration.  
    date_b   The ending date of a duration.  
  Dimensions:      
    dimension_xx   Zero or more dimension concepts. If not present, this key is not used.  
    domain_xx   Zero or more typed concepts. If not present, this key is not used. This field is only used with typed members.  
    value_xx   Zero or more member concepts or data values. If not present, this key is not used.  
    member_flags_xx   Flags for the member entry such as errors, type, etc.  
  Position:      
    c_sy c_sx   Open tag group file position.  
    c_ey c_ex   Close tag group file position.  
    order   A decimal string specifying the order of the item as originally read from the source.  
  Instance Stats:      
    ref_cnt†   Number of fact references.  
    ct_flags   A hexadecimal version of flags associated with the entry.  

 

† This value is not presented in terse mode.

 

Sequential dimensional key numbers start at “01” to the maximum number of keys. The key name will not be in the list if the underlying value is not present in the context. The key name position will always be in order. As such, if an axis is located in a list or column, the +2 index will be the value.

Typed members and explicit members share the same data space using the above sets of named and numbered keys.

For Typed Members, the fields are as follows:

dimension    The type axis concept name, normally with an “Axis” suffix.

domain       The type domain concept name, normally with an “Domain” suffix.

value        The type axis value or data as string data or a concept name.

Explicit Members will not have the domain field present (no key name) in the result:

dimension    The dimension concept name, normally with an “Axis” suffix.

value        The member concept name, normally with an “Member” suffix.

The key names relate as follow to XML XBRL. For Typed Members: 

<xbrldi:typedMember dimension="dimension">
  <domain>value</domain>
  </xbrldi:typedMember>

For Explicit Members:

<xbrldi:explicitMember dimension="dimension">value</explicitMember>

The relationships are not validated against the taxonomy or other linkbases. 

To access the flags, the HexToInteger function can be used. The context entry and member entries have the following bitwise flags:

  Definition   Bitwise   Description  
  Context Flags (ct_flags)        
     Errors          
    XM_CONTEXT_ERROR_MASK   0x0000FFFF   Mask for Error Bits  
    XM_CONTEXT_DUPLICATE_ID   0x00000001   Duplicate ID  
    XM_CONTEXT_DUPLICATE_CONTENT   0x00000002   Duplicate Content  
    XM_CONTEXT_MISSING_CONTENT   0x00000004   Missing Content  
    XM_CONTEXT_NOT_REFERENCED   0x00000008   Not Referenced  
    XM_CONTEXT_PROPERTY_ERROR   0x00000010   Error in Property  
               
  Member Data Flags (md_flags)          
     Conditions          
    XM_MEMBER_EXPLICIT         0x01   Explicit Dimension  
    XM_MEMBER_TYPED         0x02   Typed Dimension  
    XM_MEMBER_ERROR         0x80   Dimension has an Error  

 

Functions

Page revised 2024-04-22