140 likes | 256 Vues
Sphinx, developed by CoreFiling, is a domain-specific assertion language tailored for making assertions about XBRL facts. Designed for human readability and ease of editing, Sphinx evolved from 2009 to 2013 through substantial user feedback. It allows rapid creation of business and accounting rules while ensuring quality and consistency checks for regulatory compliance. Despite its proprietary nature and limitations as a non-XII standard, Sphinx provides high-quality tools and facilitates the efficient validation of financial data. Explore its capabilities and usage examples for optimal implementation.
E N D
Sphinx a user-friendly assertion language David North Senior Developer, CoreFiling Eurofiling Workshop, Luxembourg, December 2013
What is Sphinx? • Domain-specific language for making assertions about XBRL facts • High-level, semantic, based on an n-dimensional world • Not XML • Designed for humans to write and edit directly • Proprietary
History • 2009 – first prototypes • 2011 – stable language reaches 1.0 • 2012 – version 2.0 incorporating real-world feedback requiring breaking changes • 2013 – (later abandoned) attempt to offer the Sphinx IP to XBRL International
The requirements Sphinx grew from • XBRL US (XUSI) – development of the XBRL US Consistency Checks for quality/consistency of SEC filings • CIMA – regulator needing to check quality/consistency of incoming instances • Replaced a stopgap spreadsheet-based solution
Who uses it? • XUSI • CIMA • HMRC
Proprietary: Disadvantages • Not an XII standard • Fewer options for implementations • Difficult for a regulator to mandate its usage by filers • Can't be part of DTS
Proprietary: Advantages • High quality tools available from CoreFiling • Fast evolution of the language in response to customer feedback
What can it be used for? • Rapid creation of business and accounting rules • Typical checks might include: • X must be reported • Co-constraints (if X is reported, Y must be too) • Comparing data across dimensions
The language • Based on item expressions • The most basic: [ ] • Represents the table of all items in the instance. Operations on it apply to every cell in turn • Restrict by axes (“aspects” in XBRL formula) • FooConcept[ ] – restriction to facts with FooConcept • [Geography=UK, Product=Cheese] – restricts dimensions
Lining up How is the following expression evaluated? Revenue[ ] = SalesRevenue[ ] + RentRevenue[ ]
Examples Please refer to accompanying file “Sphinx Examples.txt”
Tools • Rules authored in SpiderMonkey, potentially alongside taxonomy development • Can test against instances here • Can plug authored “rulebase” into other CoreFiling tools both for GUI-based instance validation and command-line/web based validation (e.g. filter gateway).
Sphinx vs XBRL formula • Sphinx does lining up (implicit filtering) by default • Sphinx cannot do fact creation • Sphinx cannot use XPath • User-defined Sphinx functions are in-language only (no ability to make them implementation-defined)