XBRL Streaming Extensions Module 1.0

Public Working Draft 06 March 2013

Copyright © 2013 XBRL International Inc., All Rights Reserved.

This version:
<http://www.xbrl.org/Specification/streaming-extensions-module/PWD-2013-03-06/streaming-extensions-module-PWD-2013-03-06.html>
Editor:
Paul Warren, CoreFiling <pdw@corefiling.com>
Contributor:
Mark Goodhand, CoreFiling <mrg@corefiling.com>

Status

Circulation of this Public Working Draft is unrestricted. This document is normative. Other documents may supersede this document. Recipients are invited to submit comments to spec@xbrl.org, and to submit notification of any relevant patent rights of which they are aware and provide supporting documentation.

Abstract

This document defines the requirements for an extension to enable efficient streaming of XBRL v2.1 instance documents.

Comments

1 Paul Warren: To-do: error codes are required for all "MUST"s.
2 Paul Warren: Note that this is effectively optional functionality, and so should be designated as such in the conformance suite.

Table of Contents

1 Introduction
1.1 Terminology
2 Namespaces and namespace prefixes
3 Serialisation constraints
3.1 Header
3.1.1 Specification Version
3.2 Context
3.2.1 Context example
3.3 Units
3.3.1 Context and unit example
3.4 Footnotes
4 Processors
4.1 Definition

Appendices

A References
B Intellectual property status (non-normative)
C Document history
D Errata corrections in this document

Table

1 Namespaces and namespace prefixes

Definitions

Configuration Aspect
Streamable Instance Document
Streamable Instance Document Header
Streaming Configuration
Validating Conformant Processor


1 Introduction

[Paul Warren: To-do: error codes are required for all "MUST"s. ]

1.1 Terminology

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

The key words concept, context, fact, footnote, instance and unit. in this document are to be interpreted as described in the XBRL Specification [XBRL 2.1].

The key words processing instruction in this document are to be interpreted as described in the XML Specification [XML].

2 Namespaces and namespace prefixes

Namespace prefixes [XML Names] will be used for elements and attributes in the form ns:name where ns is the namespace prefix and name is the local name. Throughout this specification, the mappings from namespace prefixes to actual namespaces is as defined in Table 1.

Table 1: Namespaces and namespace prefixes
Prefix Namespace URI
xbrli http://xbrl.org/2003/instance
link http://xbrl.org/2003/linkbase

3 Serialisation constraints

A Streamable Instance Document is an XBRL v2.1 instance document that obeys the serialisation constraints defined in this section.

3.1 Header

A Streamable Instance Document MAY include a Streamable Instance Document Header.

A Streamable Instance Document Header is an XML processing instruction with a target of xbrl-streamable-instance.. A Streamable Instance Document Header MUST appear after the opening xbrli:xbrl tag for the document to which it relates, and before any child elements.

The content of the processing instruction is treated as a string containing pseudo-attributes, and is parsed according to the rules defined in [XMLSTYLESHEET]. The resulting set of pseudo-attributes is the Streaming Configuration, with each pseudo-attribute defining a Configuration Aspect. This specification defines behaviour based on the value of Configuration Aspects with specific names. Configuration Aspects with names that are not documented in this specification MAY also appear. The names and values of Configuration Aspects are case-sensitive.

3.1.1 Specification Version

A Streamable Instance Document Header MUST include a pseudo-attribute named version. The value of this pseudo-attribute MUST be a string consisting of two integer components, separated by a decimal point. The component before and after the decimal point are referred to as the major and minor version respectively.

This specification defines the semantics for documents with a version number of "1.0". Future specifications defining semantics for other versions with a major version of "1" will only add features that are backwards compatible with this specification. A processor conforming to this specification MUST accept Streamable Instance Documents with a major version of "1".

Processors MUST reject Streamable Instance Documents with an unsupported major version number. Note that a processor MAY support future versions of this specification in addition to this one, and rejection should occur only if the major version number used is not defined by any supported specification.

3.2 Context

A Streamable Instance Document may optionally obey additional constraints on the placement of xbrli:context elements within the document by declaring that contexts will appear before the facts that reference them, or by declaring the maximum number of context declarations that are necessary to be retained when consuming the instance in document order.

The constraints to be followed are specified by the value of the contextBuffer Configuration Aspect, which is interpreted as follows:

  • none, or absent: There are no constraints on the placement of xbrli:context elements beyond those imposed by XBRL v2.1.
  • INF: In addition to the constraints imposed by XBRL v2.1, context declarations MUST appear before any facts which use them.
  • any positive, non-zero integer value: Any reference to a context by a fact must refer to a context declaration which is in the preceding N context declarations, where N is the value of the contextBuffer Configuration Aspect.

The contextBuffer Configuration Aspect MUST have one of the values specified above, or be absent.

3.2.1 Context example

In the example below, the contextBuffer Configuration Aspect has a value of one. This means that only the most recent context declaration is available for use by facts.

<xbrli:xbrl
  xmlns
="http://www.example.com/mytaxonomy"

  xmlns:xbrli
="http://www.xbrl.org/2003/instance"
>
<?xbrl-streamable-instance version="1.0" contextBuffer="1" ?>
<xbrli:context id="c1">
<!-- ... -->
</xbrli:context>
<xbrli:context id="c2">
<!-- ... -->
</xbrli:context>
<!-- Only context c2 is in scope at this point -->
<fact1 contextRef="c2">
My fact
</fact1>
<xbrli:context id="c3">
<!-- ... -->
</xbrli:context>
</xbrli:xbrl>

A processor MAY be configurable to attempt to consume a Streamable Instance Document by assuming a more restrictive value for the contextBuffer Configuration Aspect. If processing is aborted because the document cannot be processed using the assumed value, then it MUST be rejected with the error codes below rather than the standard codes listed above.

This functionality is intended to allow a processor to attempt to consume documents that have no Streamable Instance Header by assuming specific sizes for the context and/or unit buffers. It also allows a processor to take a "best efforts" approach to all input. As noted in Section 4, it is also possible for processor to be configured to reject documents that either do not have a Streamable Instance Header, or which require too large a buffer.

[Paul Warren: Note that this is effectively optional functionality, and so should be designated as such in the conformance suite. ]

3.3 Units

A Streamable Instance Document may optionally obey additional constraints on the placement of xbrli:unit elements within the document by declaring that units will appear before the facts that reference them, or by declaring the maximum number of unit declarations that are necessary to be retained when consuming the instance in document order.

The constraints to be followed are specified by the value of the unitBuffer Configuration Aspect, which is interpreted as follows:

  • none, or absent: There are no constraints on the placement of xbrli:unit elements beyond those imposed by XBRL v2.1.
  • INF: In addition to the constraints imposed by XBRL v2.1, unit declarations MUST appear before any facts which use them.
  • any positive, non-zero integer value: Any reference to a unit by a fact MUST refer to a unit declaration which is in the preceding N unit declarations, where N is the value of the unitBuffer Configuration Aspect.

The unitBuffer Configuration Aspect MUST have one of the values specified above, or be absent.

3.3.1 Context and unit example

In the example below, the contextBuffer Configuration Aspect has a value of one, and the unitBuffer Configuration Aspect has a value of INF. This combination is usually a good default, as the number of units in the document is typically small, whereas for highly dimensional documents, the number of contexts is likely to increase with the number of facts.

<xbrli:xbrl
  xmlns
="http://www.example.com/mytaxonomy"

  xmlns:xbrli
="http://www.xbrl.org/2003/instance"
>
<?xbrl-streamable-instance version="1.0" contextBuffer="1" unitBuffer="INF"?>
<xbrli:unit id="u1">
<!-- ... -->
</xbrli:unit>
<xbrli:unit id="u2">
<!-- ... -->
</xbrli:unit>
<xbrli:context id="c1">
<!-- ... -->
</xbrli:context>
<xbrli:context id="c2">
<!-- ... -->
</xbrli:context>
<!-- All preceding units are in scope at this point. Unit u3 is out of scope. -->
<fact1 contextRef="c2" unitRef="u1">
My fact
</fact1>
<xbrli:unit id="u3">
<!-- ... -->
</xbrli:unit>
<xbrli:context id="c3">
<!-- ... -->
</xbrli:context>
</xbrli:xbrl>

A processor MAY be configurable to attempt to consume a Streamable Instance Document by assuming a more restrictive value for the unitBuffer Configuration Aspect. If processing is aborted because the document cannot be processed using the assumed value, then it MUST be rejected with the error codes below rather than the standard codes listed above.

3.4 Footnotes

A Streamable Instance Document may optionally obey additional constraints on the placement of link:footnoteLink elements within the document.

The constraints to be followed are specified by the value of the footnoteBuffer Configuration Aspect, which is interpreted as follows:

  • none, or absent: There are no constraints on the placement of link:footnoteLink elements beyond those imposed by XBRL v2.1.
  • INF: In addition to the constraints imposed by XBRL v2.1, link:footnoteLink elements MUST appear before any facts which are referenced by link:loc elements contained within them.
  • any positive, non-zero integer value: In addition to the ordering imposed by a value of INF, there MUST be no more than N-1 other link:footnoteLink elements appearing between a link:footnoteLink element and any fact referenced by a link:loc element contained within that link:footnoteLink, where N is the value of the footnoteBuffer Configuration Aspect.

The contextBuffer Configuration Aspect MUST have one of the values specified above, or be absent.

For example, a value of 1 for the footnoteBuffer Configuration Aspect would mean that all facts referenced by a footnote must appear before the next link:footnoteLink element.

It should be noted that the many-to-many relationships between footnotes and facts, and the fact that it is not clear that multiple footnotes with the same content referencing different footnotes are always semantically equivalent to a single footnote referencing all such facts, means that, unlike the contextBuffer and unitBuffer Configuration Aspects, it will not always be possible to serialise a document to comply with a value of 1 for footnoteBuffer.

4 Processors

4.1 Definition

A Validating Conformant Processor is a processor which consumes Streamable Instance Documents conforming to the constraints prescribed in Section 3 and raises the prescribed error codes for all other input.

A Validating Conformant Processor MAY be configurable to only accept Streamable Instance Documents with specified values for particular Configuration Aspects, and to reject other input.

For example, a particular application might wish to impose upper limits on the contextBuffer and unitBuffer values.

Appendix A References

IETF RFC 2119
IETF (Internet Engineering Task Force). "RFC 2119: Key words for use in RFCs to Indicate Requirement Levels"
Scott Bradner.

(See http://www.ietf.org/rfc/rfc2119.txt)
XBRL 2.1
XBRL International Inc.. "Extensible Business Reporting Language (XBRL) 2.1 Includes Corrected Errata Up To 2008-07-02"
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-2008-07-02.htm)
XML
W3C (World Wide Web Consortium). "Extensible Markup Language (XML) 1.0 (Fifth Edition)"
Tim Bray
, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, and François Yergeau.
(See http://www.w3.org/TR/REC-xml/)
XML Names
W3C (World Wide Web Consortium). "Namespaces in XML 1.0 (Second Edition)"
Tim Bray
, Dave Hollander, Andrew Layman, and Richard Tobin.
(See http://www.w3.org/TR/REC-xml-names/)
XMLSTYLESHEET
W3C (World Wide Web Consortium). "Associating Style Sheets with XML documents 1.0 (Second Edition)"
James Clark
, Simon Pieters, and Henry S. Thompson.
(See http://www.w3.org/TR/xml-stylesheet/)

Appendix B Intellectual property status (non-normative)

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to XBRL International or XBRL organizations, except as required to translate it into languages other than English. Members of XBRL International agree to grant certain licenses under the XBRL International Intellectual Property Policy (www.xbrl.org/legal).

This document and the information contained herein is provided on an "AS IS" basis and XBRL INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

The attention of users of this document is directed to the possibility that compliance with or adoption of XBRL International specifications may require use of an invention covered by patent rights. XBRL International shall not be responsible for identifying patents for which a license may be required by any XBRL International specification, or for conducting legal inquiries into the legal validity or scope of those patents that are brought to its attention. XBRL International specifications are prospective and advisory only. Prospective users are responsible for protecting themselves against liability for infringement of patents. XBRL International takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Members of XBRL International agree to grant certain licenses under the XBRL International Intellectual Property Policy (www.xbrl.org/legal).

Appendix C Document history

DateAuthorDetails
04 January 2013Paul Warren

Initial draft.

11 February 2013Paul Warren

Change location of header processing instruction. Made header optional. Added support for footnotes.

20 February 2013Paul Warren

Fixed examples and typos.

Appendix D Errata corrections in this document

This appendix contains a list of the errata that have been incorporated into this document. This represents all those errata corrections that have been approved by the XBRL International Base Specification and Maintenance Working Group up to and including 06 March 2013. Hyperlinks to relevant e-mail threads may only be followed by those who have access to the relevant mailing lists. Access to internal XBRL mailing lists is restricted to members of XBRL International Inc.

No errata have been incorporated into this document.