Specification for Inline XBRL 0.40

Markup for embedding inline XBRL data into XHTML documents

Internal Working Draft 7 January 2008

This version:
<http://www.xbrl.org/IWD/2008017/InlineXBRLSpec>
Editors:
Ian Stokes-Rees , DecisionSoft Limited <ijs@decisionsoft.com>
Philip Allen , DecisionSoft Limited <plega@decisionsoft.com>
Contributors:
David vun Kannon , PricewaterhouseCoopers <david.k.vun.kannon@us.pwc.com>
Hugh Wallis , XBRL International, Inc. <hughwallis@xbrl.org>
Neil Griffiths , CoreFiling Limited <neil.griffiths@corefiling.com>
Walter Hamscher , Standard Advantage <walter@hamscher.com>

Status of this document

This document is normative. It is an Internal Working Draft, published for review by members of XBRL International. Other documents may supersede this document.

Please send feedback on this document to the editors.

Abstract

Inline XBRL is a standard for embedding XBRL fragments into an extended XHTML document. The objective is to provide a single document which is both directly human readable through a standard web browser, and also tagged with machine readable XBRL. This standard presents the syntax and technique for constructing such an Inline XBRL extended XHTML document and does not discuss validation or processing of the Inline XBRL into a valid XBRL instance document.

Table of Contents

Introduction
   1.1  Conventions used in this document
Motivation
Overview (non-normative)
Namespaces
Hiding
XBRL Header
XBRL Simple Facts
XBRL Tuples
Number formatting
   9.1  General
   9.2  Tagging
   9.3  Scale
   9.4  Sign
10  Text formatting
11  Open issues
   11.1  Boolean Types
   11.2  Date Types
   11.3  Footnotes
   11.4  FractionItemType
   11.5  Other tuple issues

Appendices

A   Acknowledgements (non-normative)
B   Document history (non-normative)
C   References

List of tables

List of examples

List of figures


1 Introduction

Based on the issues documented in the Inline XBRL Use Case document [USE CASES], there is a need to simplify the problem of XBRL rendering. One way of doing this is to allow preparers to produce their reports in an arbitrary format, provide an XHTML representation of this, and then augment the XHTML with Inline XBRL. It is then possible to post-process the XHTML document and extract an XBRL instance document. This standard describes the Inline XBRL syntax.

Inline XBRL addresses five XBRL components: header, contexts, tuples, simple facts, and footnotes. The header is simply the xbrl declaration including namespaces. Inline XBRL also provides meta-data markup to augment the XHTML to manage namespaces, locale formatting, and visibility control. The following sections describe how these are added to an XHTML document.

Inline XBRL is a standard way of embedding additional meta-data or markup into web-readable (i.e. (X)HTML) content in order to facilitate a specific sort of processing. A similar approach has been taken by [INLINE SVG] and [MATHML]

1.1 Conventions used in this document

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119].

2 Motivation

Publishing financial and business information into a static format is an essential aspect in establishing fixed reference information. Traditionally this was done via "hard copy" printed reports, and recently has shifted to fixed electronic (or "soft copy") versions available through PDFs or on corporate websites. Machine readable formats of the same data in XBRL MUST be tightly coupled to those human readable publications. The original strategy for this within XBRL was to post-process XBRL into the human-readable format, however this has proved challenging to adopt directly. Instead, Inline XBRL starts with an electronically published human readable report and then augments this with the Inline XBRL meta-data markup, thus allowing an XBRL Instance document to be extracted.

The purpose of Inline XBRL, then, is to make it possible to deliver structured, machine-readable data inside a human readable rendering of these data.

3 Overview (non-normative)

The format of an Inline XBRL enhanced XHTML document is straight forward. The XBRL Instance document header, contexts, and static hidden facts are embedded between the head and body XHTML elements. XBRL facts are tagged directly within the XHTML using standard XBRL. Where displayed values are not in the correct XBRL format, meta-data attributes are added to indicate the required transformation. Tuples are supported by wrapping a set of simple facts, possibly with ordering meta-data added, and other standard XHTML formatting. In situations where there is XBRL content which should not be displayed in the human-readable XHTML, a standard approach is provided for concealing the content. Producing a full XBRL Instance document from Inline XBRL consists of appending the tuples and simple facts into the header section with any necessary reformatting, dissolving any XHTML, meta-data markup, and content associated with presentation mark-up and not XBRL.

4 Namespaces

It is required that common browsers of 2007, using an XSLT 1.0 stylesheet, MUST be able to create XHTML when pointed to a document conforming to this specification.

All display formatting elements MUST be in the XHTML namespace http://www.w3.org/1999/xhtml [XHTML]. This allows them to be identified and removed from the extracted XBRL.

[Philip Allen: I have removed reference to HTML in the first paragraph. Is this appropriate ? We don't want to impose unnecessary restrictions on preparing applications, but I'm not sure that allowing HTML is a valid option here. ]

XBRL Instance document elements MUST all be in the http://www.xbrl.org/2003/instance namespace [XBRL], with associated XBRL linkbase and XLink elements in the http://www.xbrl.org/2003/linkbase and http://www.w3.org/1999/xlink [XLINK] namespaces respectively.

Inline XBRL does not introduce any elements, however a number of meta-data attributes are defined in this standard. These are all in the http://www.corefiling.com/ns/2007/inlinexbrl namespace.

[Ian Stokes-Rees: If adopted, the namespace is expected to change to an XBRL International rooted namespace. ]

The following table lists the standard namespace prefixes that are used in this document for each of these namespaces. Inline XBRL does not require any particular prefix to be used for a given namespace, and default namespaces MAY be used as appropriate. By convention and to support XHTML renderers which are not XML Namespace aware it is common to exclusively assign the XHTML Namespace as the default, thereby avoiding the need to use a prefix. [Ian Stokes-Rees: Does XBRL ever require a particular namespace prefix to be used? ] [Ian Stokes-Rees: Should the statement regarding XHTML as the default NS be stronger? E.g. should it state "XHTML Namespace MUST always and only be used via the default namespace declaration"? ]

Prefix Namespace
xhtml http://www.w3.org/1999/xhtml
xbrli http://www.xbrl.org/2003/instance
link http://www.xbrl.org/2003/linkbase
xlink http://www.w3.org/1999/xlink
ix http://www.corefiling.com/ns/2007/inlinexbrl

5 Hiding

Sections of XBRL which are meant to be hidden MUST use the XHTML standard CSS [CSS] style property display: none. There are various strategies for achieving this. Some examples are: the use of an explicit style attribute on the root element of the XML fragment to be hidden; a class attribute on the root element of the XML fragment to be hidden, with a corresponding CSS class definition containing display: none. The addition of class or style attributes to XBRL elements MUST be removed once the XBRL is extracted into a single XBRL Instance document.

6 XBRL Header

The XBRL instance document header, including all namespace declarations and contexts, plus any static XBRL facts or tuples which are not displayed as part of the human-readable XHTML are placed in a section of standard XBRL rooted with the standard xbrli:xbrl element placed within the xhtml:html root element, between the xhtml:html/xhtml:head and xhtml:html/xhtml:body elements. This XML fragment is the only node found by the XPath [XPATH] /xhtml:html/xbrli:xbrl. This XML fragment MUST be hidden as per Section 5 .

7 XBRL Simple Facts

Any portion of the Inline XBRL document (that is, the XHTML document) MAY have XBRL taxonomy elements wrapping a region of text or figures. Any XHTML tags (but not their content) within the XBRL simple fact will be dissolved when transforming the Inline XBRL into an XBRL Instance document. The following table shows some examples of this:

Inline XBRL XHTML XBRL
< td class=" rightalign">< pt: TangibleFixedAssets id=" s2-1" contextRef=" e2003" unitRef=" GBP" precision=" 4"> 7464</ pt: TangibleFixedAssets></ td>< td class=" rightalign">< pt: IntangibleFixedAssets contextRef=" e2003" unitRef=" GBP" precision=" 3"> 750</ pt: IntangibleFixedAssets></ td>
< pt: TangibleFixedAssets id=" s2-1" contextRef=" e2003" unitRef=" GBP" precision=" 4"> 7464</ pt: TangibleFixedAssets>< pt: IntangibleFixedAssets contextRef=" e2003" unitRef=" GBP" precision=" 3"> 750</ pt: IntangibleFixedAssets>
< pt: TypeOrdinaryShare contextRef=" y2003">< i>< b> A</ b>  shares</ i></ pt: TypeOrdinaryShare>
< pt: TypeOrdinaryShare contextRef=" y2003"> A shares</ pt: TypeOrdinaryShare>

8 XBRL Tuples

[Ian Stokes-Rees: There is an assumption that tuples can always be distinguished from simple facts based exclusively on the presence of a contextRef attribute: all simple facts have one, while tuples never have it. If this assumption is false, then a tag ix:type="simple|tuple" is required to guide processing. ] Tuples are similar to simple facts. Tuples MAY have XHTML content which is not inside an XBRL Fact. This will be removed (tags and text content) in the extracted XBRL Instance document. Tuples MUST contain decendants which are either nested tuples or simple facts. These will form the tuple content.

A degree of XBRL fact reordering within a tuple between the Inline XBRL XHTML document and the extracted XBRL Instance document is possible. The ix:order attribute MAY be added to the immediate children of the parent XBRL tuple element, in order to assert an ordering. The specified ordering MUST correspond to the taxonomy definition ordering for the tuple. The following example shows the Inline XBRL XHTML fragment and the extracted XBRL.

< ae: DepreciationRate>  
  
< td ix:order=" 1">< ae: CategoryItem contextRef=" y2003"> Land &amp; Buildings
    
</ ae: CategoryItem></ td>  
  
< td style=" padding-left: 40px" ix:order=" 3">< ae: RateDepreciation contextRef=" y2003" unitRef=" pure" precision=" 2"> 10
    
</ ae: RateDepreciation>
  
</ td>  
  
< td ix:order=" 2">< ae: TypeDepreciation contextRef=" y2003"> straight line 
    
</ ae: TypeDepreciation></ td>  
</ ae: DepreciationRate>

< ae: DepreciationRate>
  
< ae: CategoryItem contextRef=" y2003"> Land &amp; Buildings</ ae: CategoryItem>
  
< ae: TypeDepreciation contextRef=" y2003"> straight line</ ae: TypeDepreciation>
  
< ae: RateDepreciation contextRef=" y2003" unitRef=" pure" precision=" 2"> 10</ ae: RateDepreciation>
</ ae: DepreciationRate>

9 Number formatting

9.1 General

Displayed numeric values MAY differ from the desired XBRL value. All numeric values MUST be identified by the presence of a precision attribute on the containing XBRL element, and this attribute MUST NOT be used for any non-numeric XBRL.

9.2 Tagging

An Inline XBRL tagged numeric value MUST NOT contain any XML elements (XBRL, XHTML or otherwise). Inline XBRL requires that any markup or text beyond the numeric value (including positive or negative signs), decimal separator, and thousands separator MUST be outside the Inline XBRL element. Forbidden characters include, but are not restricted to: $ € £ ( ) # ~. The translation of the Inline XBRL value into the desired final XBRL value is only to remove any thousands (or other grouping) separator and to transform the decimal separator into the conventional "dot".

[Ian Stokes-Rees: The current stylesheet only supports commas for thousand separators and "dot" for decimal separator. ]

9.3 Scale

The Inline XBRL tagged value MAY have a different scale to that of the final XBRL Instance document value. In that case, the ix:scale attribute MUST be used to indicate the required scaling value. For instance, if the tagged value is displayed in thousands, it will be necessary to multiply the Inline XBRL value by 1,000 to determine the correct value for the final XBRL Instance document, and the ix:scale attribute is used to establish this.

The value of the ix:scale attribute shall be the appropriate scale factor (for instance, 1,000 in the previous example) expressed as an exponent of ten. Thus, if it is necessary to multiple the tagged value by 1,000 to determine the correct value for the final XBRL Instance document, the value of the ix:scale attribute shall be 3.

The ix:scale attribute MUST be an integer.

If the ix:scale attribute is not present then a default value of 0 is assumed.

[Philip Allen: We followed Walter's suggestion that an abbreviation mechanism was necessary to make it easier to define the scale factor without making mistakes. However, we didn't like using character-based abbreviations (K, M, B etc.) because they involve lookups (which tend to be a nuisance) and are potentially ambiguous (cf. US vs. UK billions). Also, they would have to co-exist with straight numbers, so that you could achieve ghastly constructions such as "10k". So, we plumped for following the XBRL precision definition and using exponents. ]

9.4 Sign

In cases where the displayed value is negative but not indicated by a minus sign (for instance, as indicated by brackets or colour) then an ix:sign attribute, with a value of -, MUST be used to indicate the change of sign.

If the ix:sign attribute is not present then the sign of the tagged value will not be changed.

[Philip Allen: ...but, exponents can have a negative sign of their own (albeit it may not be that likely in Inline XBRL), so we had to separate out the sign flipping to a separate "sign" attribute. ]

10 Text formatting

[Ian Stokes-Rees: This section is not yet complete. It is necessary to define the set of formats, exact format conversions, and how scaling applies to different formats. The current stylesheet does not support ix:format. ] When an XBRL Fact is displayed in a format which is different from that required by the XBRL standard or a particular taxonomy, it is necessary to perform some transformations. Two meta-data attributes are defined to enable these transformations to be done. The first is ix:format which contains a code associated with a particular transformation. Table 1 defines an initial set of transforms. The second is ix:scale, which is a factor used to multiply the Inline XBRL value (after any ix:format transformations, if applicable) to generate the extracted XBRL Fact value. This can be used for power-of-ten scaling, and for sign inversion (positive/negative). [Ian Stokes-Rees: Since factors will always be powers of 10, it would be much nicer for the ix:scale value to be used for power of 10 scaling (i.e 1 = x10, 2 = x100, 3 = x1000, etc), however there also seems to be a need for sign inversion. The most straight forward way of handling this is to add it to ix:scale and simply multiply the Inline XBRL value directly by the ix:scale value. ]

Table 1 

Code Input Format Output Format Comment
commadot mmm,ttt,uuu.dd mmmtttuuu.dd Comma separated thousands, dot for decimal separator. Remove commas, retain dot
dotcomma mmm.ttt.uuu,dd mmmtttuuu.dd Dot separated thousands, comma for decimal separator. Remove thousands separators, convert comma to dot for decimal separator.
usdate MM/DD/YY(YY) YYYY-MM-DD Month/Day/Year date format converted to W3C date standard of YYYY-MM-DD.
eurodate DD/MM/YY(YY) YYYY-MM-DD Day/Month/Year date format converted to W3C date standard of YYYY-MM-DD.

11 Open issues

11.1 Boolean Types

The UK GAAP taxonomy uses boolean type elements to model assertions, such as compliance with legal and accounting standards. In UK practice, statements of compliance with given legal standards, such as those followed in preparing the accounts, use generally accepted boilerplate, and the UK GAAP taxonomy uses boolean types to refer to the presence of these. We need a mechanism to convey the relationship between the boilerplate text and the boolean value.

11.2 Date Types

These are partially covered in Section 10 above, but will need a more extensive treatment.

[Hugh Wallis: This is a minefield. No matter what you do you will find someone whom you haven't satisfied if you try to do anything deeper than put a hook in there for some user defined conversion. You have different languages, different calendars, different conventions, inconsistent conventions (how many documents have I seen with dates represented in multiple different ways even in the same document!!) People have tried and failed many times (Microsoft has done pretty well but even they manage to miss some formats that people want - and they are certainly not flexible enough to allow multiple culture formats to co-exist in the same document without a lot of finnicky manipulation). We don't want to be another failure :) Rather than expound further on this I thought I would just point you to one web page that only just scrapes the surface of this issue but should provide an insight - http://www.hackcraft.net/web/datetime/ In particular the section at http://www.hackcraft.net/web/datetime/#output is worth reading. ]

11.3 Footnotes

How should we capture footnotes?

11.4 FractionItemType

This issue has not been looked at yet.

11.5 Other tuple issues

We have, so far, addressed some of the relatively simple tuple models used within UK GAAP. We expect that there will be more complex tuple usages which are less easy to model.

Appendix A  Acknowledgements (non-normative)

Appendix B  Document history (non-normative)

Date Author Details
29 November 2007 Ian Stokes-Rees

Initial draft of Inline XBRL standard.

5 December 2007 Ian Stokes-Rees

Minor changes prior to circulation.

16 December 2007 Philip Allen

Addition of references to RFC 2119.

Clarifications to tuple ordering and hidden section.

Addition of open issues from Wiki.

7 January 2008 Philip Allen

Changed "mf" to "ix".

Removed remaining references to microformats.

Major overhaul of numeric handling.

Appendix C  References

CFLWIKI
CoreFiling Limited. " Inline XBRL Wiki. An initiative of CoreFiling working with the wider internet community, for the benefit of the XBRL International Consortium "
(See http://micro-xbrl.corefiling.com)
CSS
W3C. "Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification"
(See http://www.w3.org/Style/CSS/)
INLINE SVG
"SVG-Wiki: Inline SVG"
(See http://wiki.svg.org/Inline_SVG)
MATHML
W3C. "Mathematical Markup Language (MathML™) 1.01 Specification"
(See http://www.w3.org/TR/REC-MathML/)
RFC 2119
BCP 14, RFC 2119. "Key words for use in RFCs to Indicate Requirement Levels"
Scott Bradner.
(See http://www.ietf.org/rfc/rfc2119.txt)
USE CASES
"Use cases for Inline XBRL"
(See http://micro-xbrl.corefiling.com/wiki/MicroUseCases)
XBRL
XBRL International Incorporated. "Extensible Business Reporting Language (XBRL) Version 2.1"
Phillip Engel, Walter Hamscher, Geoff Shuetrim, David vun Kannon, and Hugh Wallis.
(See http://www.xbrl.org/Specification/XBRL-RECOMMENDATION-2003-12-31+Corrected-Errata-2006-12-18.htm)
XHTML
W3C. "XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition)"
(See http://www.w3.org/TR/xhtml1/)
XLINK
W3C. "XML Linking Language (XLink) Version 1.0"
(See http://www.w3.org/TR/xlink/)
XPATH
W3C. "XML Path Language (XPath) 2.0"
(See http://www.w3.org/TR/xpath20/)