Schema Errors Cause XBRL Facts To Not Be Created

A Gepsio user recently emailed in with an interesting problem: the XBRL document being loaded contained an dei:EntityRegistrantName element, but Gepsio did not have a fact with that name in the Facts collection of the XBRL fragment. What was going on?

The XBRL instance looked good. It defined the dei namespace and pulled in a schema:

<XBRL
    xmlns="http://www.xbrl.org/2003/instance"
    xmlns:us-gaap="http://fasb.org/us-gaap/2014-01-31"
    xmlns:xl="http://www.xbrl.org/2003/XLink"
    xmlns:us-types="http://fasb.org/us-types/2014-01-31"
    xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
    xmlns:currency="http://xbrl.sec.gov/currency/2014-01-31"
    xmlns:country="http://xbrl.sec.gov/country/2013-01-31"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:xbrli="http://www.xbrl.org/2003/instance"
    xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
    xmlns:dei="http://xbrl.sec.gov/dei/2014-01-31"
    xmlns:link="http://www.xbrl.org/2003/linkbase"
    xmlns:utr="http://www.xbrl.org/2009/utr"
    xmlns:compsci="http://compsciresources.com"
    xmlns:fds="http://investor.factset.com/20140831"
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
>
    <link:schemaRef xlink:type="simple" xlink:href="fds-20140831.xsd"/>

    <!-- snip -->
    <dei:EntityRegistrantName contextRef="c0_From1Sep2013To31Aug2014">
        FACTSET RESEARCH SYSTEMS INC
    </dei:EntityRegistrantName>

The problem was that the referenced schema never actually imported a schema that defined the DEI namespace:

<xs:schema
    xmlns:xbrli="http://www.xbrl.org/2003/instance"
    xmlns:num="http://www.xbrl.org/dtr/type/numeric"
    targetNamespace="http://investor.factset.com/20140831"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:nonnum="http://www.xbrl.org/dtr/type/non-numeric"
    xmlns:us-types="http://fasb.org/us-types/2014-01-31"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:link="http://www.xbrl.org/2003/linkbase"
    xmlns:fds="http://investor.factset.com/20140831"
    elementFormDefault="qualified"
    xmlns:xbrldt="http://xbrl.org/2005/xbrldt"
>
<!-- snip -->
<xs:import
    namespace="http://www.xbrl.org/2003/instance"
    schemaLocation="http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd"
/>
<xs:import
    namespace="http://www.xbrl.org/2003/linkbase"
    schemaLocation="http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd"
/>
<xs:import
    namespace="http://fasb.org/us-types/2014-01-31"
    schemaLocation="http://xbrl.fasb.org/us-gaap/2014/elts/us-types-2014-01-31.xsd"
/>
<xs:import
    namespace="http://www.xbrl.org/dtr/type/numeric"
    schemaLocation="http://www.xbrl.org/dtr/type/numeric-2009-12-16.xsd"
/>
<xs:import
    namespace="http://www.xbrl.org/dtr/type/non-numeric"
    schemaLocation="http://www.xbrl.org/dtr/type/nonNumeric-2009-12-16.xsd"
/>
<xs:import
    namespace="http://xbrl.org/2005/xbrldt"
    schemaLocation="http://www.xbrl.org/2005/xbrldt-2005.xsd"
/>

<!-- where is the import for http://xbrl.sec.gov/dei/2014-01-31? -->

When Gepsio started building facts for this instance, it found the dei:EntityRegistrantName element and attempted to build a Fact object. When Gepsio creates a Fact object, it begins by searching through the schemas, looking for the element definition. In this case, Gepsio could not find a schema element definition for dei:EntityRegistrantName, so it didn’t build a Fact object and didn’t put a fact in the Facts collection for dei:EntityRegistantName.

Gepsio did the right thing — it can’t build a Fact object if there is no definition for the element — but it could have done more to report the issue. Today, Gepsio is silent regarding uncreatable Fact objects. Perhaps a new validation error is needed to report this condition. Hopefully, a future CTP can address this need.

Advertisements

6 thoughts on “Schema Errors Cause XBRL Facts To Not Be Created

  1. Hi Gepsio,
    I am having a hard time making this work for the Danish Taxonomy. I found this thread on stackoverflow where Jeff Fergusson from Gepsio is commenting on a similar issue on the Dutch Taxonomy (https://stackoverflow.com/questions/24061494/xml-schema-parsing-from-xbrl-schemaref).
    I am trying to debug the Gepsio sourcecode to locate the problem, but without any luck so far. I am guessing that the issue mentioned above is talking about the same problem.
    The XBRL file I am trying to parse is this one (https://datacvr.virk.dk/data/offentliggorelse?dl_ref=ZG9rdW1lbnRsYWdlcjovLzAzLzA3L2NhL2Y0Lzg1LzE4MjEtNDE1Mi1hNDI3LWYxNjQ4ZTA1YTI1ZQ)
    With the related taxonomy (https://erhvervsstyrelsen.dk/sites/default/files/media/xbrl20161001_20161123_1408.zip)

    Can anyone help me with this issue?

    Best regards
    Gustav

    Like

  2. I got it loaded and here’s a summary:
    XbrlFragments (1), Contexts (5), Units (1), ValidationErrors (0)
    Do you have any sample test code that you want to share?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s