1 / 32

DEV18: Applied XSLT - Exposing XBRL Structures for Visual Review

DEV18: Applied XSLT - Exposing XBRL Structures for Visual Review. Date/Time: Wednesday, December 6 from 5:00 to 5:30 pm Session Leader: Bill Palmer, R W Palmer Consulting. 14th International XBRL Conference. The problem.

taite
Download Presentation

DEV18: Applied XSLT - Exposing XBRL Structures for Visual Review

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DEV18: Applied XSLT - Exposing XBRL Structures for Visual Review Date/Time: Wednesday, December 6 from 5:00 to 5:30 pm Session Leader: Bill Palmer, R W Palmer Consulting 14th InternationalXBRL Conference

  2. The problem • Because XBRL source XML files need to be extensible and modular - • source is not accommodating to human readers. • id or link references are used that require interpretation • all meta-data is not directly expressed in a single file or is implicit • general purpose viewer software is limited 14th InternationalXBRL Conference

  3. XSLT 1.0 solution “3” benefits • SUMMARY: • #1 - client software support • #2 - maturity of technology • #3 - designed for XML and XPATH 14th InternationalXBRL Conference

  4. XSLT 1.0 solution “3” benefits • #1 XSLT 1.0 is built into client software • avoid install • minimize training • use existing security • is reliable 14th InternationalXBRL Conference

  5. XSLT 1.0 solution “3” benefits • #2 XSLT 1.0 is a mature technology • good support in open forums • performance issues known • technical limitations understood • code libraries freely available • development resources in all environments 14th InternationalXBRL Conference

  6. XSLT 1.0 solution “3” benefits • #3 XSLT 1.0 is specially designed for XML transformation • resolving many XML complexities such as namespaces and encoding. • integrating tightly with Xpath simplifying access to XML structures. • providing its own special functions to ease processing XML. 14th InternationalXBRL Conference

  7. XSLT 1.0 challenges • Language is rule-based and unfamiliar to many programmers. • Few XBRL-specific libraries or examples exist for XSLT 1.0. • Automatic execution in browsers and Excel require adding processing instructions within the XML files. • Performance may be poor on large files. 14th InternationalXBRL Conference

  8. Operations to visualize XBRL source code. • Dereference contextRef and unitRef attributes in instances. • Dereference xlink relations. • Dereference tuple scope or tuple membership. • Sort and regroup structures. • Derive implicit information. • Apply DTS extension logic. • Condense and highlight details. 14th InternationalXBRL Conference

  9. Operations to visualize XBRL source code. Charting three actions - dereference, imply, sort See file VisualizingXBRLcode_XSLTuseCases.pdf

  10. Simplifying assumptions for XBRL source code visuals. • Retain element camelcase and Qnames, do not substitute label linkbase content. • Cut down URI names to the non-repeating text. • Perform DTS discovery as file merges before XSLT. • Use HTML fonts, links and color rather than grid displays. • Capture and distribute inefficient (or very large) results as HTML, Excel(.xls) or PDF. • Visualize source code meaning and structure only, stopping short of “XBRL processing”. 14th InternationalXBRL Conference

  11. Sample of a visual linkbase source file See file xmsft-20050228_calVISUAL.pdf

  12. Sample of a visual schema source file (+ all lang?) One of our special coding schemes is called PBRN. Perhaps meaning “prefixed business reporting notation”. It prefixes concepts with an uppercase version of XBRL prefix and then a couple of two character schema-related icons. XSLT is used to create the next Excel spreadsheet which scrolling right shows computer approx. application of 2005-05-15 language labels to the latest 2006-08-15 taxonomy from the IASB. Note in the PBRN prefix that AT is for instant and PD is for duration. Monetary types are DR CR NM. Abstract items are AI and custom types are all OT for “other”. String types are TX. Other codes are probably clear by what they appear on. The PBRN display ends the need to view elements in alphabetic or other distracting sequences. On far left is tuple participation of each element. 14th InternationalXBRL Conference

  13. Sample of a visual schema source file (+ all lang?)

  14. Sample of a visual schema source file (+ all lang?)

  15. Sample of a visual schema source file (+ all lang?)

  16. Sample of a visual schema source file (+ all lang?)

  17. Sample of a visual schema source file (+ all lang?)

  18. Sample of a visual schema source file (+ all lang?) Chinese?

  19. Sample of a visual instance source file (SEC filings) All of the filings from the SEC Voluntary Filing Program as of August 21, 2006 were combined and then intersorted with XSLT . This result in a PDF format is available and is documented on the xbrl-public mailing list discussion group. The next slide shows an annotated view of one screen from this PDF. See mail list archive: http://finance.groups.yahoo.com/group/xbrl-public/message/3948 File available at: http://billp9619.googlepages.com/INSTANCE_xml_sec20060821.pdf (7.2MB) 14th InternationalXBRL Conference

  20. Sample of a visual instance source file (SEC filings) SEC Instance Documents 2006-08-21 ll of the filings from the SEC Voluntary Filing Program as of August 21, 2006 were combined and then intersorted with XSLT . This result in a PDF format is available and is documented on the xbrl-public mailing list discussion group. The next slide shows an annotated view of one screen from this PDF.

  21. Applied XSLT for XBRL Technical review of special features of XSLT 14th InternationalXBRL Conference

  22. Yikes! Need XLINK processor? XBRL INSTANCE FILE - example footnote assignment @id is unique to this XML tag. <link:footnote> Dereference is opposite direction: from @id to text of the footnote(s). 14th InternationalXBRL Conference

  23. XSLT = XPATH processor? XBRL INSTANCE FILE - example footnote assignment Single expression - from @id get all footnote text nodes Ancestor axis keeps search for footnote within same <xbrl> tag. select=" ancestor::xbrli:xbrl//*[ @xlink:from= ancestor::xbrli:xbrl//*[@xlink:href= concat('#',current()/@id)]/@xlink:label]" Add ‘#’ to match href current() is XSLT function. Here is @id value of ‘CashID001’ in example. 14th InternationalXBRL Conference

  24. XSLT for number of months: endDate vs. startDate • xsl:include of external library • Julian dates for determining durations One standard library for XSLT is the “xsltsl” open source library. Almost every template in this collection is useful in XBRL, and especially as relates to dates and text. The examples in these presentations version 1.2.1 was used. The Julian date is used so can subtract any date and get a duration in days. 14th InternationalXBRL Conference

  25. 14th InternationalXBRL Conference XSLT for number of months: endDate vs. startDate “*” for match of ANY element tag. When your parent has a child containing an <enddate> tag , then you are a tag inside of a <context>. Use the endDate therein. If you are a tag outside of a <context> tag, then see if you can use your @contextRef to dereference the <context> and find <endDate> text within. Calculation on last line here is simply days duration divided by 30. About 6800 years count of days. 14th InternationalXBRL Conference

  26. XSLT for linkbase dereference by key() • <xsl:key> and key() function • <xsl:for-each> and generate-id() function It is worth noting that XSLT 1.0 has some specific functions and features not even present in Xquery. Special functions and additional axis searches, particularly “ancestor::” used in several examples here. When generate-id() is applied to a node it will always give the same string, if in the same stylesheet run. So asking if any element is equal to the first such element, this allows processing to run from each first item then its siblings using xsl:for-each. These are additional XSLT id’s, not schema id’s. 14th InternationalXBRL Conference

  27. XSLT for linkbase dereference by key()

  28. XSLT for linkbase dereference by key() Simple <key> definition creates something like a indexed table of all elements with a particular xlink attribute in DTS. We want not the label , not the href - but rather the part of the href after the ‘#’. It is the schema @id of the item.

  29. Output: XBRL retrieve by XSLT key() Summations occur at intersection of xlink:arcrole, xlink:role and xlink:from parent. Note use of clean schema id taken after ‘#’ in xlink:href. 14th InternationalXBRL Conference

  30. XSLT for linkbase dereference by key() • <xsl:include> for standard library One standard library for XSLT is the “xsltsl” open source library. Almost every template in this collection is useful in XBRL, and especially as relates to dates and text. The examples in these presentations version 1.2.1 was used. 14th InternationalXBRL Conference

  31. XSLT for duration in months from XBRL startDate and endDate Sample output HTML display : See file DURATIONINMONTHStempl.xsl 14th InternationalXBRL Conference

  32. A blog discussion regarding Excel SpreadsheetML column indexing. Another issue with XML saved from Excel is that columns are not all given an index number, which makes finding columns complex. Here is a blog entry addressing the XSLT cleanup of standard Excel spreadsheetML format files. 14th InternationalXBRL Conference

More Related