<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Using SPIN to Formalise Accounting Regulations on the Semantic Web</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Dennis Spohr</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Philipp Cimiano</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>John M</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sean O'Riain</string-name>
          <email>sean.oriain@deri.org</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Cognitive Interaction Technology Centre of Excellence Semantic Computing Group, University of Bielefeld</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Digital Enterprise Research Institute NUI Galway</institution>
          ,
          <country country="IE">Ireland</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The eXtensible Business Reporting Language (XBRL) has standardised nancial reporting and provide a machine-interpretable format that makes nancial and business reports easier to access and consume. Leveraging XBRL with Open Linked Data for purposes such as multi-dimensional regulatory querying and investigation requires XBRL formalisation as RDF. This paper investigates the use of o -the-shelf Semantic Web technologies to formalise accounting regulations speci ed in XBRL jurisdictional taxonomies. Speci cally the use of the SPARQL Inferencing Notation (SPIN) with RDF to represent these accounting regulations as rule constraints, not catered for in the RDF abstract model is investigated. We move beyond previous RDF to XBRL transformations and investigate how SPIN enhanced formalisation enables inferencing of nancial statement facts associated with nancial reporting concepts and sophisticated consistency checks, which evaluate the correctness of reported nancial data with respect to the calculation requirements imposed by accounting regulation. The approach illustrated through two use cases demonstrates the use of SPIN to meet central requirements for nancial data and regulatory modelling.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Despite the proliferation of nancial information available from sources such
as company websites, institutions and regulating bodies there remains a lack of
transparency with regard to nancial information. Two areas that can contribute
to enhancing transparency are the adoption of a standard data representation
formalism and greater levels of interoperability with and between di erent
nancial sources.</p>
      <p>
        Multiple heterogeneous formats (e.g. HTML, PDF, CSV), ensure that data
usage and interpretation typically has a dependency on manual intervention
with a knock on e ect for accurate and timely analysis of for example, nancial
reports [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Overcoming transparency and re-use issues associated with
heterogeneous formats requires that nancial information providers move towards data
provision in machine-interpretable and interoperable formats. XBRL 1, has been
adopted by regulatory agencies for consolidated nancial lings and is gaining
acceptance for general business reporting. Within the U.S. the Securities and
Exchange Commission (SEC) has mandated XBRL use by all nancial lers by
20142.
      </p>
      <p>XBRL, an XML-based format de nes nancial concepts and their relations
based on jurisdictional Generally Accepted Accounting Practices (GAAP'S).
Relations include calculation rules for monetary concepts { for example, the value
for the nancial element Assets is calculated from the sum of Current assets and
Non-current assets { in addition to other more complex business rules expressed
through XBRL formula.</p>
      <p>
        XBRL o ers automated processing of nancial reports and increased
interoperability between reporting instances. Even though XBRL provides a common
interoperable format its document-centric nature has been identi ed as an
inhibitor to integration of nancial information from multiple sources [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]).
XBRL's abstract model also remains unclear as to how instances and concepts
can be linked with other data sources. Semantic Web formalisms such as RDF
with a well de ned and understood abstract model has been gaining popularity
for multiple data source integration using the data mash-up approach. Attempts
to make XBRL interoperable with other Web based information through its
transformation to RDF or OWL have gained momentum in recent years (e.g. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
and [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]). While the approaches adequately represent nancial statements
contained within XBRL formatted nancial reports, they do not formalise the
semantics inherent in the calculation rules. As the calculation rules represent
country speci c regulatory instruction for nancial instrument calculation, inability
to adequately express them will result in a lack of conformance and regulatory
checking capability against the accounting standards from which they have been
reported. Formalising regulatory information especially when transferring to an
alternate representation is therefore important.
      </p>
      <p>In this paper, we present an approach to implementing XBRL semantics using
o -the-shelf Semantic Web technologies and speci cally SPIN3, ) to semantically
model regulatory requirements mentioned. The resulting representation can be
used to infer values for monetary concepts, and consistency check reported
values without the need for customised XBRL software. The SPIN vocabulary,
developed for business rule representation, can capture the intended semantics
of accounting regulations in a transparent and intuitive way. SPIN adoption is
supported by tools such as TopBraid Composer4), in progress standardisation
e orts and an open-source Java API 5.
1 XBRL V2.1 Taxonomy Speci cation Recommendations http://www.xbrl.org/</p>
      <p>SpecRecommendations/.
2 See http://xbrl.sec.gov/.
3 Speci cation at http://www.spinrdf.org/
4 Seehttp://topquadrant.com/products/TB_Suite.html
5 See http://www.spinrdf.org/faq.html for more details.</p>
      <p>
        After a brief introduction to XBRL, nancial reporting using XBRL
taxonomies and SPIN, we position our work with respect to recent e orts from
Garc a and Gil [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and Bao et al. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Section 3 presents the general translation
of XBRL to RDF/OWL with particular focus on transforming calculation rules
to SPIN (Section 3.2). Section 4 then illustrates how resulting representations
are capable of inferring values for reporting concepts, and checking that the
values of reported concepts conform to the rules as de ned in the respective
accounting standard. In Section 5, we relate this SPARQL-based approach to
generally available rule-based approaches. Finally Section 6 outlines how
emergent XBRL-related developments integrate with the approach presented here.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Background and related work</title>
      <p>This section introduce the main aspects of XBRL and nancial reporting as
relevant to this work (Section 2.1), as well as the basic features of SPIN
(Section 2.3). Section 2.2 discusses related work, rstly with respect to transforming
XBRL data to its RDF equivalent, and secondly regarding the use of SPARQL
for business-related modelling issues.
2.1</p>
      <sec id="sec-2-1">
        <title>Financial reporting in XBRL</title>
        <p>
          XBRL is an XML-based formalism which aims to replace dependency on
proprietary formats usage in nancial reports preparation and compilation [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. XBRL
targets increased interoperability across di erent companies, thereby reducing
the manual e ort required to create and consume nancial information. At its
core is the notion of taxonomies and instance documents (see Fig. 1). The
instance document represents the nancial report 6, stating nancial instrument
data facts such as its monetary value and units. Each fact is linked to a reporting
context, which additionally speci es an entity { commonly the company which
issued the report { as well as the period to which the fact applies. In XBRL
these are termed dimensions. The example (1), taken from the 2009 SAP annual
report, speci es that SAP had Cash and cash equivalents of e 1.88 billion on
December 31, 2009.
(1) &lt;context id="FYp0Qp0e"&gt;
&lt;entity&gt;
&lt;identifier scheme="http://www.sec.gov/CIK"&gt;0000943042&lt;/identifier&gt;
&lt;/entity&gt;
&lt;period&gt;
&lt;instant&gt;2009-12-31&lt;/instant&gt;
&lt;/period&gt;
&lt;/context&gt;
...
&lt;ifrs:CashAndCashEquivalents contextRef="FYp0Qp0e" decimals="-6"
unitRef="EUR"&gt;1884000000&lt;/ifrs:CashAndCashEquivalents&gt;
        </p>
        <p>As shown in (1), values in an instance document refer to concepts de ned in
XBRL taxonomies, which specify, for example, that Cash and cash equivalents
is a monetary concept with balance debit, which is measured at a point in time
{ as opposed to over a duration of time. In addition to adopting internationally
standardised taxonomies like the International Financial Reporting Standards
(IFRS), companies can also provide their own taxonomy extensions, in instances
where they need to report a value for a concept which is not covered by the
standard. For example, the concept Software revenue is not found in the 2009
IFRS taxonomy, but is provided as a custom taxonomy extension by SAP, with
the facts in the instance document. Each concept in a taxonomy is linked to
a set of XLink linkbases8 (called resource and relation networks in the gure).
These specify labels for the concepts, as well as other information such as, how
the values of the concepts should be displayed in di erent statement types . For
example, the International Financal Accounting Standard 9 \Statement of
nancial position, current/non-current" speci es that the concept \Assets" should
be displayed above \Non-current assets" and \Current assets" in a consolidated
ling, whereas the nancial instrument \Statement of nancial position, order of
liquidity" places \Assets" above \Property, plant and equipment", \Investment
property". To express such relationships, XBRL uses XML Linking Language
(XLink:10) arcs and extended links, which can be used to group any number of
6 Note: XBRL has also been used by the Global Reporting Initiative https://www.</p>
        <p>globalreporting.org/ to report on sustainability issues.
7 http://xbrl.squarespace.com
8 e.g. the U.S. 2009 GAAP taxonomy contains 450 linkbases.
9 http://www.ifrs.org/XBRL/IFRS+Taxonomy/IFRS+Taxonomy+2011/IFRS+</p>
        <p>Taxonomy+2011.htm.
10 http://www.w3.org/TR/xlink/.
arcs and link them to other resources For the case just described, the XBRL
presentation linkbase speci es how the concepts are linked using parent-child arcs,
and that a set of presentation arcs are associated with a particular accounting
standard using an extended link role.</p>
        <p>For the purpose of our investigations we focus on the XBRL calculation
linkbases, which de nes how concept values are calculated as de ned by speci c
accounting standards and general business rules (see sections 3.2 and 6. Example
(2) shows the XBRL representation of a calculation arc taken from the
calculation linkbase of the IFRS taxonomy. The XBRL formula linkbase is outside the
research scope and left for future work considerations.
(2) &lt;loc xlink:type="locator" xlink:label="ifrs_CashAndCashEquivalents"
xlink:href="http://xbrl.iasb.org/taxonomy/2009-04-01/</p>
        <p>ifrs-cor_2009-04-01.xsd#ifrs_CashAndCashEquivalents" /&gt;
&lt;calculationArc xlink:type="arc"
xlink:arcrole="http://www.xbrl.org/2003/arcrole/summation-item"
xlink:from="ifrs_CurrentAssets"
xlink:to="ifrs_CashAndCashEquivalents" order="1" weight="1" /&gt;
The arc states that the concept \CurrentAssets" is linked to
\CashAndCashEquivalents" through a \summation-item" relation. The arc weight of 1
indicates that the concept values are added and a weight of -1 that the values
are subtracted. Currently XBRL calculation links only allow for the summation
of items. Clearly Semantic Web formalisms o er a far more compact and
intuitive representation for expressing such statements. To that end we next discuss
related approaches that convert XBRL data to its RDF equivalent.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Related work</title>
        <p>
          Transforming XBRL to Semantic Web formalisms. Bao et al. [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] have presented
the most recent approach to transforming XBRL data to a Semantic Web
standard. They present an OWL-based model that \faithfully preserves the implicit
semantics in XBRL" (see [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], p. 144). In fact, however, due to their focus on
making the semantics of linkbase arcs explicit, their approach omits a considerable
amount of the semantics described in XBRL documents. One of these concerns
the use of extended link roles, which Bao et al. [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] refer to as \non-semantic".
These link roles (Section 2.1)limit the scope of assertions in an XBRL linkbase
e.g. to a particular type of statement. Such information seems to be lost in the
representation of Bao et al., making their arcs become globally applicable.
        </p>
        <p>
          In addition to this, their strategy for representing linkbase arcs is based on
the assumption that the intended interpretation of arcs holds between instances
of the respective concepts linked by a particular arc. The XBRL Speci cation
does not note this as being the intended interpretation, but instead states that
arcs relate \one XBRL concept to one other XBRL concept"11. While the
assumption seem reasonable for concrete-numeric-concepts, abstract concepts by
de nition do not have instances. Irrespective they are still related by means of
parent-child arcs, and it is not apparent how [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] caters for those cases.
        </p>
        <p>
          Bao et al. are not \mechanical" in their preservation of the structural
properties of XBRL while other approaches by Declerck and Krieger [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] and Garc a
and Gil [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] are. Adhering to the latter approaches we preserve relevant aspects
of the structural information in XBRL, while adding further interpretation that
address the shortcomings of Semantic Web vocabularies to semantically model
mathematical relations contained in the XBRL calculation [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ].
        </p>
        <p>
          Using SPARQL in the context of business information. Furber and Hepp [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]
have presented an approach to using SPARQL in order to detect data quality
problems. The use of SPIN to model consistency constraints in di erent
scenarios is discussed and how detected inconsistencies are agged, illustrated in
TopBraid Composer. We note the overlap with our approach through the use
of some of their SPIN constraints that can also be applied to XBRL data. We
however further the use of SPIN in a more advanced scenario that requires
performing constraint checking on data which have been inferred through iterative
rule application.
2.3
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>SPARQL Inferencing Notation (SPIN)</title>
        <p>According to its developers, the SPARQL Inferencing Notation (SPIN) \is the
de-facto industry standard to represent SPARQL rules and constraints on
Semantic Web models"12. SPIN has been developed out of the necessity to perform
calculations on property values, a task which is largely unsupported in current
Semantic Web formalisms, as well as the need for constraints checking with
closed-world semantics (see Section 5).</p>
        <p>SPIN provides the syntax to attach SPARQL queries to resources in an
RDFcompliant way using RDF properties spin:rule, spin:constraint, and
superproperty spin:query. The spin:rule property accepts SPARQL CONSTRUCT
queries as value and can be used to infer new triples on the basis of the
statements in the query's WHERE clause. A basic example is provided in (3), and
the corresponding SPIN representation in Turtle syntax in (4).
(3) CONSTRUCT { ?this a ?c2 . }</p>
        <p>WHERE { ?c1 rdfs:subClassOf ?c2 .</p>
        <p>?this a ?c1 . }
(4) [ a sp:Construct ; sp:templates ([ sp:subject spin:_this ;
sp:predicate rdf:type ;
sp:object _:b1 ])
sp:where ([ sp:subject _:b3 ;
sp:predicate rdfs:subClassOf ;
sp:object _:b1
] [ sp:subject spin:_this ;</p>
        <p>sp:predicate rdf:type ;
sp:object _:b3 ]) ]
12 See http://www.spinrdf.org.</p>
        <p>The example, based on that available from TopBraid's SPIN website13,
formalises the semantics of rdfs:subClassOf and illustrated variable use. While
variables in a SPARQL query are generally mapped to blank nodes, in SPIN
RDF notation, the variable ?this refers to the resource spin: this. This
variable, like the corresponding keyword in object-oriented programming languages,
refers to an instance of the class to which the respective rule has been attached.
As a result, if the rule in Example (3) was attached to owl:Thing, it would be
applied to every instance of owl:Thing satisfying the statements in the WHERE
clause.</p>
        <p>The spin:constraint property can be used to model consistency constraints,
using the SPARQL ASK queries. Where an ASK query evaluates to true, the
respective instance is indicated as violating the constraint. Finally, the general
property spin:query can be used to generally attach SPARQL queries to RDF
resources, i.e. also SELECT queries. As will be shown in Section 3, we make use
primarily of CONSTRUCT and ASK queries in order to capture the intended
semantics of accounting regulations.</p>
        <p>In addition to standard SPARQL operators like UNION, OPTIONAL and
FILTER, SPIN supports SPARQL extensions such as the ARQ keyword LET14,
which allows for value assignment to variables, as well as the possibility to de ne
custom functions.</p>
        <p>With SPIN having recently started standardisation activities as a W3C
member submission and the fact that SPARQL is already the query language of choice
in numerous Semantic Web applications { there is a solid basis for its wide-spread
adoption by the Semantic Web community.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Transforming XBRL to RDF</title>
      <p>This section discusses the conversion of XBRL to RDF, with focus on the
SPINbased representation of accounting regulations. After a brief introduction to
the general underlying ideas in Section 3.1, we discuss the representation of
calculation rules (3.2) and consistency constraints used (3.3) to transform the
accounting regulations from XBRL to RDF.
3.1</p>
      <sec id="sec-3-1">
        <title>General strategy</title>
        <p>
          Our approach adheres to what Bao et al. [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] refers to as a representation of
the \logical model" of XBRL, which preserves structural information from the
original data. The motivation for doing so is to have a representation of XBRL
that is interoperable with other data on the Semantic Web and also enables
inferences and consistency checking, while at the same time allowing users to
query the structure itself (e.g. \what is the "Assets" concept hierarchy in the
"Statement of nancial position")?
13 http://topbraid.org/spin/owlrl-all.html
14 See e.g. http://jena.sourceforge.net/ARQ/assignment.html.
In order to model the regulatory calculation of monetary concepts in a Semantic
Web compliant way, SPIN rules based on the data contained in XBRL
calculation linkbases were generated. speci cally calculation arcs such as those shown
in example (2), are converted into their SPIN representation (below), which
represents the calculation of ifrs:CurrentAssets.
        </p>
        <p>Each of the graph patterns in the query represents one calculation arc.
References to URIs for the context and units, ensure that the values of relevant
instances are only taken into account. This excludes cases where a particular
value refers to di erent entities or di erent segments of the same entity, as well
as cases in which values are reported for di erent time periods. This is a normal
occurrence as nancial statements generally contain gures for both the current
and preceding reporting periods. Finally, the LET clause speci es how the values
of the individual concept instances should be combined. For accounting rules,
this is limited to summation and subtraction. XBRL provides a single arc role
summation-item for this purpose, and uses the value of the weight attribute {
either 1 or -1 (example (2) above) { to indicate whether the value of a particular
concept should be added or subtracted. For further more complex calculations
possible using SPIN we refer the reader to the SPIN vocabulary speci cation 15.</p>
        <p>The example illustrates how rules can make use of previously calculated
values to calculate further values. This allows value calculation for composite
monetary concepts (i.e. those whose values are calculated on the basis of the
values of other concepts) by specifying values for atomic concepts and then
applying the rules iteratively (see Section 4.1 for more details).</p>
        <p>Moreover, it should be noted that in our RDF representation, rules are not
modelled as blank nodes, but instead carry a URI. This has the bene t of
enabling other instances to dereference the rules, allowing a particular calculation
rule be reused across di erent nancial reports of the same accounting standard.
It also further allows attachment of additional properties to a rule and a
reference to the type of nancial statement to which the rule applies. Therefore, in
15 http://www.spinrdf.org.
addition to the actual rule, the instance representing the rule in (5) is the subject
of a triple relating it to the URI representing SAP's Consolidated Statement of
Financial Position by means of xbrlrdf:roleRef.</p>
        <p>As mentioned, rules can be executed iteratively, making use of previously
inferred values. In order to make sure that a particular calculation rule with
atomic concepts (i.e. those concepts which lack regulatory calculation rules
attached) can also be applied, we add the default calculation shown in (6) to atomic
monetary concepts. This rule then assigns the reported value of the respective
instance to xbrlrdf:calculatedValue.
(6) CONSTRUCT { ?this xbrlrdf:calculatedValue ?value . }</p>
        <p>WHERE { ?this xbrlrdf:value ?value } .
3.3</p>
      </sec>
      <sec id="sec-3-2">
        <title>SPIN constraints for consistency checking</title>
        <p>On the basis of the SPIN rules presented above, each monetary concept which
participates in some calculation and has reported values in the respective
context is assigned a calculated value. The next step in modelling the accounting
regulation is to specify that calculated values need to match reported values.
As SPIN rules and constraints are applied to all instances of the class to which
they have been attached, as well as to the instances of its subclasses, this can
be achieved by attaching a single SPIN constraint to the top monetary concept:
(7) ASK WHERE { ?this xbrlrdf:value ?value ;</p>
        <p>xbrlrdf:calculatedValue ?cvalue .</p>
        <p>FILTER (?value != ?cvalue) }</p>
        <p>Additionally, SPIN constraints can be used to formalise more general
constraints imposed by the XBRL speci cation. Below, we illustrate this using a
constraint (restriction) which states that if two concepts have the same balance
type (i.e. credit or debit), they can only be added to one another, not subtracted.
In other words, the value of the XBRL weight attribute, which is preserved in
our structural representation of XBRL, has to be positive:
(8) ASK WHERE { ?this xlink:from ?from ; xlink:to ?to ;</p>
        <p>xbrlrdf:weight ?weight .
?from a ?balance . ?to a ?balance .
?balance rdfs:subClassOf xbrlrdf:BalanceType .</p>
        <p>FILTER (?weight &lt; 0) }
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Speci c use cases</title>
      <p>The SPIN rules and constraints given in Section 3 above can be used to
infer values for instances of the respective reporting concepts, as well as check
their consistency. We next illustrate how these representations integrate with
TopBraid Composer, taking as example the SAP 2009 annual report reported
against its custom extension of the IFRS 2009 taxonomy.
4.1</p>
      <sec id="sec-4-1">
        <title>Inferring values of monetary reporting concepts</title>
        <p>In order to test whether the rules explained in Section 3 actually behave as
desired, we have rst generated a modi ed version of the report such that it
contained reported values for atomic monetary concepts only. All composite
monetary concepts were assigned their values through iterative application of
the SPIN calculation rules. This allowed evaluation as to whether the
available information triggered the application of all rules necessary to calculate the
missing information and whether the calculated gures corresponded to those
reported in the original ling. Table 1 summarises the results, with the gures
from the original report recorded in parentheses.</p>
        <p>Concepts in IFRS 2009 taxonomy and SAP extension
Regulatory calculation rules
Reported monetary values
Monetary concepts with reported values
Inferred monetary values
Monetary concepts with inferred values
Monetary values inferred by default rule
Monetary values inferred by regulatory rules
Regulatory rules applied
Total number of monetary values
Total number of correct monetary values
absolute relative</p>
        <p>Tuples 3 and 4 of the table detail that the modi ed report contains 351
reported values for 129 monetary concepts, compared to 482 and 171, respectively,
from the original report. After applying the calculation rules, values are inferred
for 97.66% of these 171 concepts, indicating that the modi ed report contains
458 values, as opposed to 482 original report values. 25.11% of the 458 inferred
values are due to regulatory rules, outlining that the remaining 343 values have
been inferred for atomic concepts by means of the default rule. Over all 8.54%
of all the regulatory rules available in the IFRS 2009 taxonomy and the SAP
2009 extension have been applied.</p>
        <p>
          The gures illustrate that for 4 of the monetary concepts no value could be
inferred. Analysis revealed that this is due to values for ifrs:BasicEarningsLossPerShare
and ifrs:DilutedEarningsLossPerShare, being missing from the XBRL
report instance, despite being part of a composite concept. As a result, the
corresponding rules could not be applied (see Section 5 for a discussion regarding the
optionality of calculation arcs).
The previous sections detail how the SPARQL CONSTRUCT rules and ASK
queries capture the semantics of the XBRL data in an intuitive and transparent
way. However the XBRL does allow for calculation arcs and if so to have an
assumed value of zero. This usage of default values, cannot be naturally handled
with monotonic logics such as OWL and would normally require the use of a
formalism such as Reiter's default logic [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. A naive approach would be to develop
a SPIN rules by the use of the OPTIONAL keyword available in SPARQL, for
example:
(9) CONSTRUCT { ?this xbrlrdf:calculatedValue ?cvalue . }
        </p>
        <p>WHERE { ?x0 a ifrs:CurrentTaxAssets ;</p>
        <p>xbrlrdf:calculatedValue ?cv0 .</p>
        <p>OPTIONAL {
?x1 a ifrs:CashAndCashEquivalents ;</p>
        <p>xbrlrdf:calculatedValue ?cv1 . }</p>
        <p>LET(?cvalue := 1.0 * ?cv0 + 1.0 * ?cv1) }</p>
        <p>If it is assumed that that rules can be applied in any order, this rule would
be applied before the rule that calculates ?cv1, and a di erent value produced.
We therefore take the position that every value should be de ned or explicitly
stated as not unde ned. While OWL has no speci c vocabulary to state that a
value has not been de ned we can achieve the same result using an OWL class
axiom.</p>
        <p>For example, in order to state that SAP did not report a value for
ifrs:BasicEarningsLossPerShareFromDiscontinuedOperations in units iso4217:EUR
year ending December 200916, the following would need to be asserted.
(10) ifrs:BasicEarningsLossPerShareFromDiscontinuedOperations v</p>
        <p>:((9xbrli:contextRef:fFYp0YTDg) u (9xbrli:unitRef:fiso4217:EURg))</p>
        <p>With the non-existence of such an instance explicitly asserted it can be
combined with the SPIN rules by providing a default rule that speci es the value of
the property if it is known not to exist as follows:
(11) OPTIONAL { ?x4 a ifrs:CashAndCashEquivalents;
xbrli:contextRef ?context; xbrli:unitRef ?unit;
xbrlrdf:calculatedValue ?cv4 } .</p>
        <p>OPTIONAL { NOT EXISTS { ?x4 a ifrs:CashAndCashEquivalents;
xbrli:contextRef ?context;
xbrli:unitRef ?unit; } .</p>
        <p>LET (?cv4 := 0) . }</p>
        <p>Here the assumption is made that NOT EXISTS predicate evaluates to true
where it is provable that the dataset does not contain the predicate. Interesting
future work could look to determine whether a default logic rule language such
as RIF-SILK17 could be used.
16 In SAP's XBRL instance document, the period context represented by FYp0YTD.
17 See http://silk.semwebcentral.org/RIF-SILK.html.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusion and Future Work</title>
      <p>The paper outlines SPARQL's capability to meet complex query requirements,
central to modelling nancial data, and speci cally their accounting regulations
on the Semantic Web. The approach transforms nancial reports represented in
XBRL to RDF, and uses the RDF-compatible SPARQL Inferencing Notation to
capture the regulatory rules expressed by the XBRL calculation linkbase. The
resulting representation was evaluated against XBRL nancial data, both with
respect to inferring values for instances of monetary concepts and checking their
consistency. Additionally the use of the representation to formalise additional
constraints to address the well-formedness and high quality of the data was
discussed.</p>
      <p>The approach taken can be extended to cater for the more complex
mathematical operations of the XBRL formula speci cation18. For example the formula
speci cation de nes that value calculations apply to instances that refer to
identical contexts, and more generally to concept instances which are p(arent)-equal,
c(ontext)-equal and u(nit)-equal. p-equality and u-equality have been previously
shown through rule attachment to the composite class and including the
reference to the unit in the rule. Alternatively c-equality could be inferred
beforehand, by specifying that two contexts which share the same entity and period
are linked by owl:sameAs. When applying the rules iteratively to a repository
that is OWL-aware, the rules shown above can be applied as is.</p>
      <p>
        Arguments for nancial information integration include the ability to
conduct nancial metrics comparison [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and querying of heterogeneous data sets to
gain wider holistic insight [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. For Linked Data driven information systems, data
abstraction presents challenges for nancial integration [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] and nancial values
comparison. Semantic Web o ers a level of interoperability between data sources
that would assist comparability based on the representational transformation of
nancial data, such as XBRL to RDF. The approach is not new, having been
previously applied to areas such as investment funds analysis [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] or more recently
promoted for wider nancial ecosystems evolution [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Financial standards
interoperability also faces additional challenges from di erent jurisdictional and
regulatory rules. Use of an ontology architecture to accommodate multiple XBRL
formats from the business community have only been proposed [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Within this
context the ability of Semantic Web vocabularies to model regulatory relations
contained within XBRL reporting formats will become increasingly important.
      </p>
      <p>
        We have demonstrated SPIN's viability but others rule languages such as
the Semantic Web Rule Language 19 suggested by [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], could also be
investigated as part of a best practises recommendation for Semantic Web rule format
representation.
18 http://www.xbrl.org/Specification/formula/REC-2009-06-22/
formula-REC-2009-06-22.html.
19 http://www.w3.org/Submission/SWRL/
      </p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgements</title>
      <p>The work presented in this paper has been funded by the Multilingual Ontologies
for Networked Knowledge (MONNET) project under EU Grant No. 248458, and
Science Foundation Ireland under Grant No. SFI/08/CE/I1380 (Lion-2).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bao</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rong</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ding</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Representing Financial Reports on the Semantic Web: A Faithful Translation from XBRL to OWL</article-title>
          .
          <source>In: Semantic Web Rules, Lecture Notes in Computer Science</source>
          , vol.
          <volume>6403</volume>
          , pp.
          <volume>144</volume>
          {
          <fpage>152</fpage>
          . Springer (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Debreceny</surname>
          </string-name>
          , R.:
          <article-title>Feeding the information value chain : Deriving analytical ratios from xbrl lings to the sec (</article-title>
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Declerck</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krieger</surname>
          </string-name>
          , H.U.:
          <article-title>Translating XBRL into description logic. An approach using Protege, Sesame &amp; OWL</article-title>
          .
          <source>In: Business Information Systems (BIS)</source>
          . pp.
          <volume>455</volume>
          {
          <fpage>467</fpage>
          . Klagenfurt,
          <string-name>
            <surname>Germany</surname>
          </string-name>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Freitas</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Curry</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Oliveira</surname>
            ,
            <given-names>J.a.G.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>O</given-names>
            <surname>'Riain</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          :
          <article-title>Querying heterogeneous datasets on the linked data web: Challenges, approaches, and trends</article-title>
          .
          <source>IEEE Internet Computing</source>
          <volume>16</volume>
          (
          <issue>1</issue>
          ),
          <volume>24</volume>
          {
          <fpage>33</fpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. Furber,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Hepp</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          :
          <article-title>Using SPARQL and SPIN for Data Quality Management on the Semantic Web</article-title>
          .
          <source>In: Business Information Systems, Lecture Notes in Business Information Processing</source>
          , vol.
          <volume>47</volume>
          , pp.
          <volume>35</volume>
          {
          <fpage>46</fpage>
          . Springer (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Garc</surname>
            <given-names>a</given-names>
          </string-name>
          , R.,
          <string-name>
            <surname>Gil</surname>
          </string-name>
          , R.:
          <article-title>Publishing XBRL as Linked Open Data</article-title>
          .
          <source>In: Proceedings of the WWW2009 Workshop on Linked Data on the Web (LDOW)</source>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. Ho man,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Strand</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          : XBRL Essentials. American Institute of Certi ed Public Accountants, New York (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Lara</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cantador</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Castells</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Xbrl taxonomies and owl ontologies for investment funds</article-title>
          .
          <source>In: 1st International Workshop on Ontologizing Industrial Standards at the 25th International Conference on Conceptual Modelling</source>
          . pp.
          <volume>6</volume>
          {
          <issue>9</issue>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Mueller</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Raggett</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Report for the W3C Workshop on Improving Access to Financial Data on the Web (</article-title>
          <year>2009</year>
          ), http://www.w3.org/
          <year>2009</year>
          /03/xbrl/report.html
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>O</given-names>
            <surname>'Riain</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Curry</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Harth</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>Xbrl and open data for global nancial ecosystems: A linked data approach</article-title>
          .
          <source>Int J Account Inf Syst</source>
          (
          <year>2012</year>
          ), doi:10.1016/j.accinf.
          <year>2012</year>
          .
          <volume>02</volume>
          .002
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>ORiain</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Harth</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Curry</surname>
          </string-name>
          , E.:
          <article-title>Linked data driven information systems as an enabler for integrating nancial data</article-title>
          .
          <source>Information Systems for Global Financial Markets</source>
          ,
          <string-name>
            <given-names>Emerging</given-names>
            <surname>Developments</surname>
          </string-name>
          and E ects pp.
          <volume>239</volume>
          {
          <issue>270</issue>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Reiter</surname>
            ,
            <given-names>R.:</given-names>
          </string-name>
          <article-title>A logic for default reasoning</article-title>
          .
          <source>Arti cial Intelligence</source>
          <volume>13</volume>
          (
          <issue>1</issue>
          ),
          <volume>81</volume>
          {
          <fpage>132</fpage>
          (
          <year>1980</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Wenger</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thomas</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jr</surname>
            ,
            <given-names>J.B.</given-names>
          </string-name>
          :
          <article-title>An ontological approach to XBRL nancial statement reporting</article-title>
          .
          <source>In: 17th Americas Conference on Information Systems</source>
          . Michigan, USA (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>