HMRC Inline XBRL Style Guide V1.3
User Manual:
Open the PDF directly: View PDF .
Page Count: 18
Download | |
Open PDF In Browser | View PDF |
v1.3 – December 2010 HMRC CT Inline XBRL Style Guide Contents 1. Introduction ................................................................................................................................. 1 2. Conformance with the Inline XBRL Specification ........................................................ 2 3. Document level Issues ............................................................................................................. 3 3.1 Multiple input documents ........................................................................................... 3 3.2 Single output document ............................................................................................... 3 3.3 XHTML vs HTML ............................................................................................................. 3 3.4 Document Encoding & Use Of “non-‐standard” Characters ........................... 4 3.5 Java Applets, JavaScript ................................................................................................ 5 3.6 CSS styling .......................................................................................................................... 6 3.7 Pagination .......................................................................................................................... 6 3.8 Images, logos, etc ............................................................................................................ 6 3.9 XML Canonicalisation & Encoding Submissions ............................................... 7 3.10 HTMLElement ................................................................................................ 7 4. Element level Issues ................................................................................................................. 9 4.1 Transformation rules .................................................................................................... 9 4.2 Duplication of marked-‐up facts ............................................................................. 10 4.3 Escaped HTML in non-‐numeric data ................................................................... 11 4.4 Number Signs ................................................................................................................ 11 4.5 Scaling and Precision ................................................................................................. 13 4.6 Percentages .................................................................................................................... 13 4.7 Nesting Mark-‐up .......................................................................................................... 14 4.8 Tuple Member Ordering ........................................................................................... 15 5. XBRL-‐related Issues ............................................................................................................... 16 5.1 Minimum Tagging Requirement ........................................................................... 16 5.2 Entity Identifier Scheme for HMRC submissions ........................................... 16 5.3 Document Creator Information ............................................................................. 17 1. Introduction The Inline XBRL Style Guide is intended to assist commercial and in-‐house software developers engaged in the process of producing applications that create one or both of the Inline XBRL components of an online Company Tax Return (i.e. a Tax Computation and/or a set of Statutory Accounts). It does not cover information relating to the Company Tax Return itself (the CT600 and its supplementary pages) or the mechanisms of online filing – for these, please refer to the ‘Tech Pack’ for CT online filing, published by HMRC’s Software Developer Support Team (SDST) at http://www.hmrc.gov.uk/ebu/ct-‐tech-‐index.htm. The information and guidance presented here is not mandatory (except where it relates to requirements of the Specification itself or the HMRC online service) but is intended to assist developers in producing Inline XBRL documents that are as complete and useful as possible. Page 1 of 18 v1.3 – December 2010 This Guide should be read in conjunction with the Inline XBRL 1.0 Background Information and Guidance document produced by the XII1 Rendering Working Group, which is intended as a non-‐normative companion to the Specification itself – the Proposed Recommendation version of the background document can be found at: http://www.xbrl.org/Specification/inlineXBRL/PR-‐2010-‐01-‐28/inlineXBRL-‐ background-‐PR-‐2010-‐01-‐28.html In addition, this Guide builds upon, and is consistent with, the information contained in the XBRL UK Preparers and Developers Guide, which is targeted at those creating financial reports (in particular company accounts) in XBRL in the United Kingdom. 2. Conformance with the Inline XBRL Specification The HMRC CT online service (launched on 23rd Nov 2009 and updated on 11th October 2010) is currently conformant with the first Proposed Recommendation (January 2010) of the Inline XBRL Specification, which can be found at: http://www.xbrl.org/Specification/inlineXBRL-‐part1/PR-‐2010-‐01-‐28/inlineXBRL-‐ part1-‐PR-‐2010-‐01-‐28.html The update on 11th October 2010 included one additional (backwards-‐compatible) feature of use to users of the HMRC CT online service (discussed more fully in the section on ‘Duplication of marked-‐up facts’ below). An update to the HMRC CT online service to align with the final Recommendation version of the Specification will be signalled well in advance, and will be applied to the test service first. The XII Rendering Working Group (the body that controls the Specification) and HMRC have taken care to ensure that any changes from the 4th Candidate Recommendation onwards (originally introduced in November 2009) are backwards-‐compatible so that Inline XBRL production software already “in the field” is not invalidated by new Recommendations. 1 XBRL International Inc. A consortium of over 600 companies, government agencies and accountancy firms that oversees and manages the publication of the XBRL “family” of Specifications. Page 2 of 18 v1.3 – December 2010 3. Document level Issues 3.1 Multiple input documents The vast majority of Tax Computations and Accounts supplied by vendor applications are expected to be single, self-‐contained Inline XBRL documents that can be opened and viewed in a single browser window. However, for practical reasons, multiple Inline XBRL documents (sometimes referred to as an Inline XBRL Document Set, or IXDS) are allowed by the service (the CT600 XML Schema permits multiple iXBRL instance documents to be presented in a single submission for each of the Tax Computation and the Accounts). The potential for generating “oversized” Inline XBRL documents is the only reason to create a document set as opposed to a single Inline XBRL document. Experience has shown that XHTML documents larger than about 5mb in size present difficulties for most current web browsers, so for the sake of your customers and HMRC staff, arrange to break up Inline XBRL documents that may approach this size. There are however some extra things to think about with multiple input documents. First, give due consideration to navigation between documents – you may have a summary document with links to all the detailed parts, or you may simply chain two or more documents together. Either way, navigation links must be implemented with relative URLs so that they continue to function correctly within HMRC’s environment -‐ absolute URLs containing your customer’s domain are not going to resolve properly. It is best to avoid sub-‐directories and keep the collection of documents in a single directory – that way the navigation URLs only depend on the preservation of the original filenames, which will have to be supplied as attributes (see the CT600 XML Schema for details). One, and only one, of the documents in the set will have to be nominated as the “entry point” via an attribute on its CT600 or element. This is the document that you want the user to see first when opening and viewing the document set. Multiple input documents with no nominated “entry point” will be rejected, as will multiple input documents with more than one nominated “entry point” (for single input documents there is no need to provide the “entry point” attribute at all). 3.2 Single output document The result of processing one, or a set of related, Inline XBRL “input” document(s) in a submission is always a single target XBRL instance document. Multiple target XBRL instance documents are not supported by the service, despite being permitted by the Inline XBRL Specification. The consequence is that the service will always derive a single XBRL instance document for the Tax Computation (where supplied) and a single XBRL instance document for the Accounts (where supplied) even if those instance documents refer to concepts defined in multiple Taxonomies (e.g. when a private extension Taxonomy is supplied). 3.3 XHTML vs HTML The Inline XBRL Specification is designed to allow Inline XBRL to work with either HTML or XHTML. The choice of XHTML for the HMRC CT online service is made for us by Page 3 of 18 v1.3 – December 2010 the UK Govt Gateway, which expects submission payloads to be well-‐formed XML. Only XHTML meets this requirement. As a consequence you should ensure that the root element of your Inline XBRL document is in the XHTML namespace. This is usually achieved by setting the default namespace for the document, thus: xmlns='http://www.w3.org/1999/xhtml' in addition to all the other namespace declarations required for Inline XBRL use. In particular, an Inline XBRL document is recognised by the presence of one or more elements that have the “http://www.xbrl.org/2008/inlineXBRL” namespace name. The provision of a DOCTYPE declaration for Inline XBRL documents is not recommended – in many processing situations this will lead to an unsuccessful attempt to validate the document against a DTD. A full modular Schema for the Inline XBRL extension to XHTML is available, a full Inline XBRL DTD is not. The XHTML version attribute may be used to identify a document as Inline XBRL, but it is not recommended. If used, the value must be the Formal Public Identifier “-//XBRL International//DTD XHTML Inline XBRL 1.0//EN”, as of 11th October 2010. The use of XHTML also allows more rigorous checking of the mark-‐up (including the Inline XBRL mark-‐up elements) against the XHTML modular Schema, reducing the likelihood of HMRC accepting Inline XBRL that renders slightly differently in different browsers. 3.4 Document Encoding & Use Of “non-‐standard” Characters The UK Govt Gateway expects submission payloads to be UTF-‐82 encoded, and so Inline XBRL documents submitted to the HMRC CT online service must also be UTF-‐8 encoded by default. If your Inline XBRL document is to be used standalone (e.g. as a saved version of the submitted document) then it is advisable to provide an initial XML declaration that explicitly sets the document encoding to UTF-‐8, thus: This will ensure that web browsers treat the document as intended and render any embedded, multi-‐byte UTF-‐8-‐encoded characters correctly. HMRC systems will always treat the content as UTF-‐8 encoded, so this ensures that character renderings are consistent on both sides of the fence. When embedding an Inline XBRL document in the CT600 or element the XML declaration must be removed. The complete XML transaction (rooted at ) should have an initial XML declaration containing ‘encoding=”utf-‐8”’ which will apply to the transaction document as a whole. 2 8-‐bit UCS/Unicode Transformation Format – see http://www.unicode.org, http://wikipedia.org/wiki/Unicode and http://wikipedia.org/wiki/UTF-‐8 Page 4 of 18 v1.3 – December 2010 There are two principal methods of including “non-‐standard” (a euphemism for characters that fall outside of the ASCII 7-‐bit character set) characters in Inline XBRL documents (such characters may include currency symbols, simple graphic symbols, accented characters, etc). The first is to use the appropriate UTF-‐8 encoding, which will usually (but not always) be a two-‐byte value, both of which will have their top (i.e. 8th) bit set. So long as the document encoding is correctly set then browsers or other display tools will be able to interpret these bytes correctly as the appropriate character. However, be aware that text editors and other display tools that don’t understand document encodings and treat the content as 7-‐bit ASCII will not display UTF-‐8 encoded characters correctly, and if used to modify a document with embedded UTF-‐8 encoded characters may actually destroy or alter the encoding such that it no longer renders correctly in UTF-‐8-‐aware applications. To avoid such eventualities, if needs be, the second method may be employed. XML (of which XHTML is an application) provides for escaped character references of the form “xxx;” where “xxxx” may be replaced by a decimal number representing the Unicode code point (see http://wikipedia.org/wiki/Code_point for more details) of the character glyph to be displayed. For example, here are some common symbol glyphs and their character reference equivalents: £ (pound sign) £ € (euro sign) € © (copyright) © Such code point values are also encoded into the bytes of a UTF-‐8 encoded multi-‐byte character – you can think of an XML character reference and a UTF-‐8-‐encoded character as two alternative ways of specifying a Unicode code point, which in turn represents a particular character glyph. The advantage of the second method is that non-‐UTF-‐8-‐aware text editors and text display tools will not disrupt or damage the character references, though they will not be displayed as intended. The exceptions to the rule are the five characters special to XML mark-‐up: ‘<’, ‘>’, ‘&’, ‘’’ and ‘”’. Their ASCII character representations are UTF-‐8 compatible, so to protect them from interpretation by XML-‐aware processors, XML provides five named character entities to escape them (“<”, “>”, “&”, “'” and “"”). You can use these named character entities in preference to the five equivalent numeric character references if you wish. It is recommended that you avoid using named character entities aside from these five “special” ones. Named character entities are usually defined in a DTD (Document Type Definition) and the XHTML DTD defines quite a number of them. However, Inline XBRL does not have a fully defined DTD (the preference being for the modular XHTML Schema) meaning that the interpretation of these named entities becomes browser dependent. 3.5 Java Applets, JavaScript Java applets, JavaScript, and any other HTML