This document defines a CSV-based representation of the information in an XBRL report, as defined in the XBRL Open Information Model OIM. It provides significant flexibility in the layout of the CSV tables, in order to enable tables that are efficient and intuitive, allowing related facts to be grouped into rows, and share common aspects. The structure of the tables is controlled by a JSON metadata file.
The mapping of an xBRL-CSV report into the OIM report model is described in this specification, enabling lossless transformation of xBRL-CSV reports into other formats, including the XML-based xBRL-XML representation.
It should be noted that the flexibility in table layout means that there are many different ways of representing the same OIM report using xBRL-CSV. It is anticipated that processors performing a transformation into the xBRL-CSV format will require some level of user input into the specification of the metadata file in order to achieve intuitive and efficient tables.
QNames in parenthetical red text after a "MUST" or "MUST NOT" statement prescribe standardised error codes to be used if the preceding condition is violated.
xBRL-CSV makes use of QNames to represent expanded names and SQNames to represent some other values. The prefix map for resolving QNames, SQNames and other prefixed content is provided by the namespaces object.
All prefixes defined in the table below are reserved prefixes as described in [OIMCOMMON].
Prefix | Namespace URI |
---|---|
xbrl | http://www.xbrl.org/WGWD/YYYY-MM-DD |
xbrli | http://www.xbrl.org/2003/instance |
xsd | http://www.w3.org/2001/XMLSchema |
xbrlce | http://www.xbrl.org/WGWD/YYYY-MM-DD/xbrl-csv/error |
The xBRL-JSON format make use of URI aliases as an abbreviated representation of URIs, as described in OIM Common. The table below defines reserved URI aliases for the linkTypes and linkGroups URI maps.
URI alias | URI |
---|---|
footnote | http://www.xbrl.org/2003/arcrole/fact-footnote |
explanatoryFact | http://www.xbrl.org/2009/arcrole/fact-explanatoryFact |
_ | http://www.xbrl.org/2003/role/link |
On encountering a document with the xBRL-CSV document type an xBRL-CSV processor MUST raise errors with the specified error codes if the document does not conform to the constraints defined in this specification. Additionally, such a processor MUST perform the validation required of a conformant processor. A processor MAY apply the validation required of a validating conformant processor.
An xBRL-CSV report is a CSV-based representation of a XBRL report, consisting of a JSON metadata file and zero or more CSV data tables. The metadata file provides links to the data tables that contain the report data, and defines the meaning of the columns in each data table.
An xBRL-CSV report is identified by a path or URL to a metadata file, referred to as the primary metadata file.
The metadata file may optionally extend other metadata files in order to reuse definitions that are common to multiple xBRL-CSV reports.
The metadata files contain references to the associated CSV files.
An xBRL-CSV metadata file is a JSON file that conforms to the format described in this section. A metadata file name SHOULD have an extension of .json
.
xBRL-CSV metadata files MUST be valid JSON, per RFC 8259 (xbrlce:invalidJSON).
In order to avoid interoperability issues, objects within JSON documents conforming to this specification MUST have unique keys (xbrlce:invalidJSON).
JSON documents MUST use the UTF-8 character encoding (xbrlce:invalidJSON), and MAY include a Unicode Byte Order Mark, although this is neither required nor recommended.
This specification documents the allowed types for all values in JSON metadata. Types are specified as a combination of JSON primitive types (string, array, object, number, boolean and null) and XML Schema simple types, identified by a QName. Values within JSON documents MUST have the JSON type specified and MUST be in the canonical lexical representation (xbrlce:invalidJSONStructure). Note that values for facts and taxonomy-defined dimensions are not required to be in canonical form.
Properties marked as "required" MUST be present wherever the enclosing object is present (xbrlce:invalidJSONStructure).
A document has the xBRL-CSV document type if it is a valid JSON document in which the JSON Pointer /documentInfo/documentType
resolves to the string http://xbrl.org/CR/2020-05-06/xbrl-csv
. A document that does not have the xBRL-CSV document type MUST be treated as described in OIM Common and the errors defined in this specification MUST NOT be raised, aside from xbrlce:invalidJSON (see Section 3.1.1).
In order to facilitate the inclusion of additional information within the metadata file, additional properties beyond those defined in this specification MAY be included within the following objects:
Additional properties MUST NOT be included elsewhere (xbrlce:invalidJSONStructure).
Unless defined in a specification published by XBRL International, any such additional properties included in the above objects MUST have names that are QName values (xbrlce:invalidJSONStructure), and MUST have a prefix that identifies a namespace that does not use the xbrl.org domain name (xbrlce:invalidJSONStructure).
The content of any such additional properties is not constrained by this specification.
A metadata file consists of a JSON object with the following properties:
documentInfo
(object)tableTemplates
(object)tables
(object)parameters
(object)parameterURL
(string)xsd:anyURI
that provides the location of a CSV file containing report parameters. See Section 3.1.12.dimensions
(object)decimals
(number or string)links
(object)The documentInfo object provides document-level information about the xBRL-CSV report. The object has the following properties:
documentType
(string)http://xbrl.org/CR/2020-05-06/xbrl-csv
namespaces
(object)linkTypes
(object)linkGroups
(object)taxonomy
(array)xsd:anyURI
) defining the taxonomy for the report. Relative URLs are resolved relative to the primary metadata file.extends
(array)xsd:anyURI
) of other xBRL-CSV metadata files. The current metadata file is combined with the referenced files, as described in Section 3.1.17. Relative URLs are resolved relative to the file in which the property appears.final
(object)features
(object)baseURL
(string)xsd:anyURI
) providing a base URL for the report (see Section 3.1.5.6).The namespaces object provides a prefix map for prefixed content values.
Each key provides a prefix, which is mapped to the URI provided by the value.
The prefix map for values appearing within a metadata file is provided by the namespaces
object in the effective metadata of the metadata file in which the value appears.
The prefix map for values appearing in a data table is the namespaces
object in the effective metadata of the primary metadata file.
The linkTypes object is a URI map defining URI aliases used to identify link types in this report.
The URI map for a URI alias for a link type is the linkTypes
object in the effective metadata of the metadata file in which the URI alias appears.
The linkGroups object is a URI map defining URI aliases used to identify link groups in this report.
The URI map for a URI alias for a link group is the linkGroups
object in the effective metadata of the metadata file in which the URI alias appears.
The final object defines objects and arrays which cannot be extended in importing files. The object has the properties shown in the table below. All properties are optional, and if present take the fixed value of true
, indicating that the corresponding object or array cannot be extended by importing metadata files (see Section 3.1.17).
Property name | Corresponding object | Notes |
---|---|---|
namespaces |
/documentInfo/namespaces |
|
taxonomy |
/documentInfo/taxonomy |
|
linkTypes |
/documentInfo/linkTypes |
|
linkGroups |
/documentInfo/linkGroups |
|
features |
/documentInfo/features |
|
tableTemplates |
/tableTemplates |
|
tables |
/tables |
|
dimensions |
/dimensions |
Note that this refers to the root-level dimensions object that defines report dimensions only. |
parameters |
/parameters |
See Section 3.1.17.1 for details of interaction with /parameterURL |
The table above uses JSON Pointer notation to specify the objects controlled by each property name.
The features object indicates additional constraints to which the report conforms, beyond those required for xBRL-CSV itself. See Section 5 for more information.
The properties of the object are xsd:QName
values, corresponding to the name of a
feature. The values can be any non-null JSON value, indicating the state
of the feature. A value of false
is equivalent to omitting the property,
and indicates that the feature is disabled. Any other value indicates that
the feature is enabled. Values other than true may be used to indicate
specific additional properties of the feature.
If present, the baseURL
property provides the value of the {base-url} property for the {report}. Otherwise, the {base-url} property for the {report} may optionally be set to the absolute URL of the primary metadata file.
When creating an xBRL-CSV report from an OIM report model, this baseURL
may optionally be set to the {base-url} property for the {report}, if any, and MUST be absent otherwise.
The baseURL
property enables the meaning of relative URLs in fact and dimension values to be preserved. The baseURL
property does not play any role in resolving URLs that appear within xBRL-CSV metadata.
The tableTemplates object provides table template definitions.
A table template defines the structure of a table that may be included in an xBRL-CSV report. Each CSV data table is the instantiation of a table template in a CSV file. Each table template may be used by zero or more tables with the report.
The keys of the tableTemplates object are identifiers, providing a unique table template identifier for each table template.
Each value is a table template object with the following properties:
rowIdColumn
rowIdColumn
property MUST be the name of a property in the columns
object (xbrlce:undefinedRowIdColumn).columns
decimals
dimensions
transposed
false
, meaning that lines in the CSV file correspond to rows in the table.The columns object specifies the columns that may appear in a table.
Keys of the columns object MUST be identifiers.
Each value is a column object with the following properties:
decimals
xsd:integer
(JSON number) providing a value for the {decimals} property of any numeric facts produced by the column.dimensions
If the dimensions
property is present then the column is a fact column. Note that the dimensions object MAY be empty.
The decimals
property MUST NOT be present unless the dimensions
property is also present xbrlce:misplacedDecimalsOnNonFactColumn.
A column object MAY be empty. This declares a column that MAY be included in a corresponding CSV data table (see Section 3.2.3), but which is not a fact column.
A dimensions object is a JSON object that defines a set of dimension values.
A dimensions object defines a set of dimension values which map to the {dimensions} property of facts as described in Section 4.2.5.
If the value of a dimension property starts with $
(but not $$
) then it MUST be either a parameter reference or a row number reference, and its value is determined as described in Section 3.1.14 or Section 3.1.15.
If the value of a dimension property starts with $$
then it is treated as starting with a literal $
.
If the value of a dimension property is #none
, the dimension has an explicit no-value.
An explicit no-value for a dimension is equivalent to not specifying the dimension at all in the dimensions object, except that it also prevents inheritance of a value for that dimension from another location (see Section 4.2.5).
Otherwise, the value is treated as a cell value, as described in
Section 3.2.4.1. It should be noted that whilst the special
values #empty
and #nil
are permitted in JSON metadata, they are semantically equivalent to
an empty JSON string, and the JSON null
value, respectively.
The properties of a dimensions object are listed below. Constraints on the value obtained after applying the processing described above.
concept
(string)xsd:QName
) providing a value for the concept core dimension.entity
(string)dtr:SQNameType
) providing a value for the entity core dimension.period
(string)unit
(string)language
(string)A decimals value provides a value for the {decimals} property of numeric facts and MUST have one of the following forms: (xbrlce:invalidDecimalsValue)
#none
, in which case the value is infinity.Note that this prohibits the use of #nil
and #empty
in as cell values (Section 3.2.4) for the target of parameter references, and where a decimals value is defined in JSON, either directly or as a table parameter or report parameter, it MUST be a JSON number, not a string containing a number.
The tables object associates table template definitions with CSV data tables .
The keys of the tables object are identifiers, providing a unique table identifier for each data table.
Each value is a table object with the following properties:
url
(string)xsd:anyURI
) to the CSV file for this table. Relative URLs are resolved relative to the primary metadata file.template
(string)optional
(boolean)url
property is not required to exist. Defaults to false. If false, the file specified MUST exist (xbrlce:missingRequiredCSVFile).parameters
(object)A table parameter is a table-wide value that can be referenced in the table template definition for the table.
The keys and values of the parameters
object provide the names and values for the table parameters, respectively.
Names for table parameters MUST be identifiers (xbrlce:invalidParameterName).
A report parameter is a report-wide value that can be referenced in any table template definition.
Report parameters can be defined using the parameters
and parameterURL
properties (see Section 3.1).
The parameter
property provides an object, with the keys and values giving names and values for the report parameters, respectively.
The parameterURL
property is treated as a URL to a CSV file, as defined in
Section 3.2.1. Relative URLs are resolved relative to the primary metadata file. The specified file MUST exist (xbrlce:missingParametersFile).
The file MUST conform to the following constraints: (xbrlce:invalidParameterCSVFile)
Note that there is no header row.
Where the first field in a row is not empty, the first and second fields of the row provide the name and value of a report parameter, respectively.
Note that report parameters provided via a CSV file are treated as if they
are defined in the parameters
property of the primary metadata file
(see Section 3.1.17.1). The CSV file MUST NOT define any parameters
that have the same name as a report parameter defined in the primary metadata file
(xbrlce:illegalReportParameterRedefinition). Note that the constraints
defined in Section 3.1.17 ensure that the CSV file cannot redefine
report parameters that are defined in the parameter
property of any other
metadata file in an extension chain.
Names for report parameters MUST be identifiers (xbrlce:invalidParameterName).
The links object defines relationships between facts in the report.
The object has the following form:
The links object defines a list of relationships between S and each fact in TF, with link type G and link type T.
A parameter reference has one of the following forms:
$
parameter-name$
parameter-name@
period-specifierWhere parameter-name is an identifier, and period-specifier, if
present, MUST be either start
or end
(xbrlce:invalidPeriodSpecifier).
parameter-name MUST be at least one of the following (xbrlce:invalidReferenceTarget):
Parameter references are resolved according to the effective metadata of the primary metadata file of an xBRL-CSV report. This allows the value for a parameter reference to be provided by a metadata file that extends the metadata file in which the parameter reference appears (see Section 3.1.17).
If present, period-specifier MUST be either start
or end
(xbrlce:invalidPeriodSpecifier).
The value of the parameter reference is determined as follows:
start
is specified, and the instant at the end of the duration if end
is specified.See Appendix A for a summary of the special values available in different contexts.
A row number reference is denoted by the following string:
$rowNumber
The value of a row number reference is the row number for the current row.
See Appendix A for a summary of the special values available in different contexts.
The period dimension may be specified in a number of different formats. Either of the date time-based formats permitted by xBRL-JSON may be used:
2019-01-01T00:00:00
) denoting an instant. /
(e.g. 2019-01-01T00:00:00/2020-01-01T00:00:00
), denoting a duration.In addition, a number of abbreviated forms may be used to specify a duration:
..
denoting a duration of whole days between, and including, both dates (e.g. 2019-01-01..2019-12-31
). 2019-01-01
)2019-02
)2019
)Q
and an integer in the range 1
to 4
denoting a calendar quarter (three month period) (e.g. 2019Q2
)H
and either 1
or 2
, denoting the first or second half of the year (e.g. 2019H1
)YYYYWww
where ww
is a two-digit integer, in the range 01
to 53
, denoting a duration of a week with the corresponding week number (e.g. 2019W03
).A suffix of @start
or @end
may be added to any of the abbreviated forms except the first one, specifying the instant at the start or end end of the duration, respectively.
Time zone specifiers MUST NOT be included in any of the abbreviated forms.
Examples of these abbreviated forms, and their equivalent ISO 8601 date time forms, are shown below:
xBRL-CSV format | Period type | Equivalent date time-based representation | Notes |
---|---|---|---|
2019-01-01..2019-12-31 | duration | 2019-01-01T00:00:00/2020-01-01T00:00:00 | inclusive date range |
2019-06-01 | duration | 2019-06-01T00:00:00/2019-06-02T00:00:00 | duration of a single day |
2019-06 | duration | 2019-06-01T00:00:00/2019-07-01T00:00:00 | calendar month |
2019 | duration | 2019-01-01T00:00:00/2020-12-31T00:00:00 | calendar year |
2019Q2 | duration | 2019-04-01T00:00:00/2019-07-01T00:00:00 | calendar quarter |
2019H1 | duration | 2019-01-01T00:00:00/2019-07-01T00:00:00 | calendar half |
2019W29 | duration | 2019-07-15T00:00:00/2019-07-22T00:00:00 | ISO week |
2019W29@start | instant | 2019-07-15T00:00:00 | Start of ISO week |
2019Q2@end | instant | 2019-07-01T00:00:00 | End of calendar quarter |
An identifier is a value used to identify a table template, table, row, column or parameter. Identifiers MUST be a valid NCName and MUST NOT contain the .
character.
In order to allow reuse of common definitions, xBRL-CSV metadata may be split
across multiple JSON metadata files. The metadata file for a report may
reference another metadata file via the extends
property on the
documentInfo object. Referenced metadata files may in turn extend
other metadata files, forming a chain.
The effective metadata for a metadata file consists of the metadata
defined in that file combined with that of any metadata files that are
referenced directly or indirectly from that file via the extends
property.
The process for combining metadata files is described in this section.
When a metadata file, X, extends a list of other metadata files, YY, the properties of the following objects in X are combined with the corresponding object in the effective metadata of each metadata file, Y, in YY (this list uses JSON Pointer notation):
If a key exists in X that also exists in the corresponding object of the effective metadata of Y, the properties MUST have the same value (xbrlce:conflictingMetadataValue).
If the same key exists for corresponding objects in the effective metadata of multiple files in YY, then the properties MUST have the same value (xbrlce:conflictingMetadataValue).
The following array of X is extensible:
The value of this array in the effective metadata of X is the concatenation of the value of this array in each Y in YY, in order, followed by the value of the array in X, if any.
A base file, Y, MAY specify that an object or array is final (see the final object). In this case, the value of the specified object or array in the effective metadata of X MUST be the value of that object or array in the effective metadata of Y (xbrlce:illegalExtensionOfFinalProperty).
Although the final object itself cannot be marked final, it still respects the constraint that once defined, keys cannot be altered during extension. This means that X inherits, and can only add to, final definitions from Y. If another metadata file, Z, extends X, Z cannot extend any objects that are specified as being final in either X or Y.
All properties not listed above are not extensible, and, with the
exception of documentInfo
, MUST NOT appear in more than one metadata file (xbrlce:illegalRedefinitionOfNonExtensibleProperty).
The documentInfo
object MUST appear in all metadata files and MUST have
at least the documentType
property (see Section 3.1.2).
All metadata files that contribute to the effective metadata of the
primary metadata file MUST have the same value for the documentType
property (xbrlce:multipleDocumentTypesInExtensionChain).
Note that any report parameters defined via the parameterURL
property
(see Section 3.1.12) are treated as if they appear in the
parameters
object of the primary metadata file. For this reason, a
metadata file MUST NOT have both parameterURL
and a final object
containing parameters
in its effective metadata
(xbrlce:unusableParameterURL).
It should be noted that whilst an extending metadata file cannot modify the definition of a table template from another file, it can add additional dimensions to an imported table template by specifying them as report dimensions. If this is undesirable, the base file should include dimensions in final.
A data table is a CSV file that is referenced by table object in a metadata file. Data tables are interpreted as described in this section.
CSV files MUST follow the format defined in RFC 4180, with the following modifications (xbrlce:invalidCSVFileFormat):
This gives the following modified version of the RFC 4180 ABNF grammar:
file = [header line-end] record *(line-end record) [line-end]
header = name *(COMMA name)
record = field *(COMMA field)
name = field
field = (escaped / non-escaped)
escaped = DQUOTE *(TEXTDATA / COMMA / CR / LF / 2DQUOTE) DQUOTE
non-escaped = *TEXTDATA
COMMA = %x2C
CR = %x0D
DQUOTE = %x22
LF = %x0A
line-end = (CR LF) / CR / LF
TEXTDATA = %x09 / %x20-21 / %x23-2B / %x2D-D7FF / %xE000-FFFD / %x10000-10FFFF
A table would normally be mapped to a CSV file such that each row in the table maps to a line in the CSV file, and each column maps to fields at the same position within each row.
A transposed table is mapped to a CSV file with the axes of the table swapped. In this case, each line in the CSV file represents a table column, and fields with corresponding positions within a line represent the table rows.
This arrangement can be convenient for tables have a large number of columns but few rows. In particular, it can be used with a single row to provide a natural representation for key/value pairs, by defining the "keys" as columns, and providing a single value for each column. Using a transposed table means that the values are more obviously associated with the keys:
column1,value1
column2,value2
column3,value3
column4,value4
...
The terms "row" and "column" in this specification refer to logical rows and columns within the table, and the mapping to lines and fields within the CSV file depends on whether the table is transposed.
The first row in a table is the header row. Each cell in the header row MUST either be empty, or contain a valid identifier (xbrlce:invalidHeaderValue).
Each value in the header row provides a column identifier for the column.
Column identifiers MUST be defined in the table template definition for the table (xbrlce:unknownColumn).
Column identifiers MUST be unqiue within a table (xbrlce:repeatedColumnIdentifier).
The following special treatment is applied to cell values:
#empty
represents an empty string value.#nil
represents the nil value.##
is treated as starting with #
.See Appendix A for a summary of the special values available in different contexts.
A column that is referenced by a parameter reference in the same table template, a report dimension or a report-level decimals
property (Section 3.1.4) is a parameter column. Note that a column MAY be both a fact column and a parameter column.
If a cell in a parameter column has a value and the column is not also a fact column, then the column MUST be the target of a parameter reference in the definition of at least one fact column that has a value in the current row (xbrlce:unmappedCellValue).
Values MAY appear anywhere in a column that is not a parameter column. If such a column is not a fact column then the values will not be mapped into the OIM Report Model.
All table parameters MUST be referenced by at least one fact column in the table template definition for the table which has a value in that column in at least one row (xbrlce:unmappedTableParameter).
All report parameters MUST be referenced by at least one fact column in any table template definition which is used by at least one table which has a value in that column in at least one row (xbrlce:unmappedReportParameter).
Parameter columns MUST appear before any fact columns that reference them (xbrlce:invalidColumnOrder).
Row ID columns MUST appear before all fact columns (xbrlce:invalidColumnOrder).
This section describes how an xBRL-CSV document is mapped to an OIM Report Model. The starting point of the model is the report component, which corresponds to an xBRL-CSV report.
The report component has the following properties:
taxonomy
member of the documentInfo object.Each cell in a fact column of a data table that has a value is mapped to an fact component, with the properties described in Section 4.2.2.
The fact has the following properties:
The value of the cell, after applying the treatment described in Section 3.2.4. If the value is non-nil, then it MUST be represented as: (xbrlce:invalidFactValue)
xs:QNames
, in the case of a set-valued enumeration fact;xs:QName
, in the case of a single-valued enumeration fact;If value is nil, the fact MUST be nillable (xbrlce:invalidFactValue).
If the value is prefixed content, any prefixes MUST be defined in the namespaces object.
The {id} property for a fact is in an xBRL-CSV report is the concatenation of the table identifier for the current table, the row identifier for the current row and the column identifier for the current column, separated by .
, i.e.:
{table-identifier}.{row-identifier}.{column-identifier}
A row identifier provides a unqiue identifier for a row that is used, in combination with the table identifier and column identifier to produce fact identifiers. The row identifier for the current row is:
r
N where N is the row number of the current row. Where a data table includes a row ID column the values in the column have the following constraints:
The {dimensions} property of a fact consists of the union of the following dimension values:
In the case of a non-numeric fact, values for the unit core dimension are excluded.
In the case of a non-text fact, values for the language core dimension are excluded.
If multiple locations include the same dimension for a single fact, then the first location (considered in the order listed above) that specifies either a value or an explicit no-value is used.
Note that it is an error to provide a duration value for an instant fact. Where the period is obtained from a duration value via a parameter reference, a period-specifier can be used to obtain an instant value that is either the either the start or end of the duration.
If the concept core dimension for a fact is xbrl:note
then
the {dimensions} property additionally has an xbrl:noteId
dimension with a
value equal to the fact's {id} property. The xbrl:noteId
dimensions
MUST NOT be defined explicitly in an xBRL-CSV report (xbrlce:invalidNoteIdDimension).
If the value for a taxonomy-defined dimension is not nil, it MUST be expressed in a lexical representation that is valid according to the XML Schema datatype of the dimension (xbrlce:invalidDimensionValue). If the value is nil, the dimension MUST be a nillable, typed taxonomy-defined dimension (xbrlce:invalidDimensionValue). If the value is prefixed content, any prefixes MUST be defined in the namespaces object.
The {decimals} property of a numeric fact is determined by the first of the following properties that is present:
decimals
property of the column object for the current table.decimals
property of the tableTemplates object for the current table.decimals
property of the documentInfo object.If no such property exists, the value of the {decimals} property is "infinite".
Otherwise, the value of the {decimals} property is obtained as described in Section 3.1.9
Non-numeric facts do not have a {decimals} property, and any decimals
properties in the xBRL-CSV metadata are ignored for such facts.
The features mechanism allows an xBRL-CSV report to assert that it conforms to additional constraints beyond those required by this specification. This can be used by consuming software to safely make simplifying assumptions about how data can be processed.
A feature is a specific property of the report, identified by an expanded name. This specification does not define any standard features. Additional features MAY be defined by other specifications. Such specifications that are not published by XBRL International MUST NOT use a namespace that uses the xbrl.org domain name.
Feature enablement is controlled by the features object (see Section 3.1.5.5).
The table below shows a summary of the special values that are available for use as cell values in CSV files and xBRL-CSV metadata files. For reference, the equivalent representation in xBRL-JSON is also included.
Unless otherwise stated, all values in monospaced
font are string literals. This means that in JSON files they should be enclosed between quotation marks.
Meaning | In CSV files | In xBRL-CSV metadata (JSON) | In xBRL-JSON |
---|---|---|---|
Reference to parameter param |
n/a | $param |
n/a |
Period start from parameter param |
n/a | $param@start |
n/a |
Period end from parameter param |
n/a | $param@end |
n/a |
Nil value of fact/dimension | #nil |
null (JSON literal) or #nil |
null (JSON literal) |
Empty string | #empty |
Empty string or #empty |
Empty string |
The string literal #val |
##val |
##val |
#val |
The string literal val# |
val# |
val# |
val# |
The string literal $val |
$val |
$$val |
$val |
The string literal val$ |
val$ |
val$ |
val$ |
Nonexistent fact | Empty cell | n/a | No fact object |
Decimals value of 3 | 3 |
3 (JSON number) |
3 (JSON number) |
Infinite decimals | Empty cell or #none |
#none |
No decimals property |
Inherit decimals (defaults to infinite) | n/a4 | No decimals property1 |
n/a |
Absent dimension | Empty cell or #none |
#none 2 |
No property for dimension |
Inherit dimension | n/a4 | No property for dimension1 | n/a |
No period3 | Empty cell or #none |
#none 2 |
No period property |
Inherit period | n/a4 | No period property1 |
n/a |
No entity3 | Empty cell or #none |
#none 2 |
No entity property |
Inherit entity | n/a4 | No entity property1 |
n/a |
No unit3 | Empty cell or #none |
#none 2 |
No unit property |
Inherit unit | n/a4 | No unit property1 |
n/a |
Notes:
#none
(an explicit no-value) overrides any inherited value. Facts will not have the corresponding dimension (or will have infinite decimals), even if a value is specified in higher-level metadata."$col"
notation), it is not then possible to inherit a value for that dimension. An empty cell in the relevant column will result in the absence of that dimension (or infinite decimals).This section shows an example of an xBRL-CSV report consisting of two tables. This provides information about individual loans, with one row per loan.
Loan ID | Firm ID | Country of incorporation | Local currency | Fixed Rate period | Deposit amount (home currency) | Deposit amount (local currency) | Loan to value | Rate |
---|---|---|---|---|---|---|---|---|
L001 | 09209384832 | GB | GBP | 2017-01-01 to 2019-12-31 | €1,000 | 2,100 | 45.6% | 5.1% |
L002 | 12312312123 | FR | EUR | 2017-06-21 to 2019-03-20 | €1,100 | 1,374 | 38.8% | 4.6% |
L003 | 02393823489 | DE | EUR | 2017-07-01 to 2017-12-31 | €800 | 871 | 34.8% | 4.3% |
The second table provides summary information about loans broken down by country:
Country | Number of loans | Amount outstanding |
---|---|---|
GB | 208 | €1,284,486 |
FR | 512 | €1,734,222 |
DE | 333 | €325,031 |
A sample metadata file for the above tables is shown below.
{
"documentInfo": {
"documentType": "http://xbrl.org/YYYY/xbrl-csv",
"namespaces": {
"ld": "http://xbrl.org/oim/conformance/firm-loans",
"lei": "http://standards.iso.org/iso/17442",
"iso4217": "http://www.xbrl.org/2003/iso4217"
},
"taxonomy": [
"https://xbrl.org/oim/conformance/firm-loans.xsd"
]
},
"dimensions": {
"entity": "$entityLEI",
"period": "$reportPeriod"
},
"tableTemplates": {
"loan_data_template": {
"columns": {
"loan_id": {},
"company_lei": {
"dimensions": {
"concept": "ld:CompanyLEI"
}
},
"country_inc": {
"dimensions": {
"concept": "ld:CountryOfIncorporation"
}
},
"local_currency": {},
"fixed_rate_period": {},
"deposit_amount_hc": {
"dimensions": {
"concept": "ld:DepositAmount",
"period": "$fixed_rate_period@start",
"unit": "iso4217:EUR"
}
},
"deposit_amount_lc": {
"dimensions": {
"concept": "ld:DepositAmount",
"period": "$fixed_rate_period@start",
"unit": "$local_currency"
}
},
"ltv_end_fr": {
"decimals": 3,
"dimensions": {
"concept": "ld:ExpectedLoanToValueRatio",
"period": "$fixed_rate_period@end"
}
},
"rate": {
"decimals": 4,
"dimensions": {
"concept": "ld:InterestRate",
"period": "$fixed_rate_period"
}
}
},
"rowIdColumn": "loan_id",
"dimensions": {
"ld:LoanId": "$loan_id"
}
},
"loan_summary_template": {
"columns": {
"country": {},
"loan_count": {
"dimensions": {
"concept": "ld:NumberOfLoans",
"period": "$reportPeriod@end"
}
},
"amount": {
"dimensions": {
"concept": "ld:AmountOutstanding",
"period": "$reportPeriod@end"
}
}
},
"rowIdColumn": "country",
"dimensions": {
"ld:Country": "$country"
}
}
},
"tables": {
"loan_data": {
"template": "loan_data_template",
"url": "loan-data-facts.csv"
},
"loan_summary": {
"template": "loan_summary_template",
"url": "loan-summary-facts.csv"
}
},
"parameters": {
"entityLEI": "lei:00EHHQ2ZHDCFXJCPCL46",
"reportPeriod": "2019-01-01T00:00:00/2020-01-01T00:00:00"
}
}
Corresponding CSV data is show below.
loan-data-facts.csv
loan_id,company_lei,country_inc,local_currency,fixed_rate_period,deposit_amount_hc,deposit_amount_lc,ltv_end_fr,rate
L001,5299006S3ALB1X1PU159,ld:GB,iso4217:GBP,2017-01-01..2018-12-31,1000,2100,0.456,0.051
L002,529900VVQ4470YJ67K26,ld:FR,iso4217:EUR,2017-06-21..2019-03-20,1100,1374,0.388,0.046
L003,549300UGDXWZ30VPHZ52,ld:DE,iso4217:EUR,2017-07-01..2017-12-31,800,871,0.348,0.043
loan-summary-facts.csv
country,loan_count,amount
ld:GB,208,1284486
ld:FR,512,1734222
ld:DE,333,325031
Note:
ld:GB
, ld:FR
, ld:DE
values correspond to explicit domain members defined within the taxonomy.