xbrl us gaap contextRef standard?

accounting, parsing, standards, xbrl, xml

Solution

its in `xbrl 2.1 specification` http://www.xbrl.org/Specification/XBRL-RECOMMENDATION-2003-12-31+Corrected-Errata-2005-04-25.htm#_4.6.1

      <context id="BalanceAsOf_20120531">
        <entity>
          <identifier scheme="http://www.sec.gov/CIK">0000866729</identifier>
        </entity>
        <period>
          <instant>2012-05-31</instant>
        </period>
      </context>
      <context id="BalanceAsOf_20120531_AccumulatedOtherComprehensiveIncomeMember">
        <entity>
          <identifier scheme="http://www.sec.gov/CIK">0000866729</identifier>
          <segment>
            <xbrldi:explicitMember dimension="us-gaap:StatementEquityComponentsAxis">us-gaap:AccumulatedOtherComprehensiveIncomeMember</xbrldi:explicitMember>
          </segment>
        </entity>
        <period>
          <instant>2012-05-31</instant>
        </period>
      </context>
      <unit id="USD">
        <measure>iso4217:USD</measure>
      </unit>
    <us-gaap:AssetsCurrent contextRef="BalanceAsOf_20120531" unitRef="USD" decimals="-5">929900000.0</us-gaap:AssetsCurrent>
    <us-gaap:Assets contextRef="BalanceAsOf_20120531" unitRef="USD" decimals="-5">1670300000.0</us-gaap:Assets>
    <us-gaap:StockholdersEquity contextRef="BalanceAsOf_20120531_AccumulatedOtherComprehensiveIncomeMember" unitRef="USD" decimals="-5">-74200000.0</us-gaap:StockholdersEquity>

for example; consider these two context; `ids` needs to be unique with respect to their content(With respect to `period` `entity`; and `entity` with its sub elements; `identifier` and `segment` if present) we will use its `id` to map financial facts. Here in example `AssetsCurrent` refers to unit--> whose `id` is `USD` and context information--> whose id is `BalanceAsOf_20120531`; and detail of this this context id can be found in `context` element. here everything should be unique other wise it will create duplicate facts/contexts. You can see here that; both context has same period but so why can't their `ids`? because one context has addition detail `segment` information. (i am not going in detail here; if you want to know; how it is detecting duplicate/error consider example no 25 and 26 from the link.) in other way you can also view facts/values with three axis as `CIK` `period` and `xmlname`;and this uniqueness makes them comparing with other company's facts with these axis.

Problem

Please tell me this is standardized, or at least there is some way to decipher it. I'm looking at these 3 random 10-Qs and Ks from 2012Q4. - ftp://ftp.sec.gov/edgar/data/1001288/0001001288-12-000041.txt - ftp://ftp.sec.gov/edgar/data/1002037/0001193125-12-506687.txt - ftp://ftp.sec.gov/edgar/data/1002360/0001000096-12-000199.txt The line items are standardized; however, there are many of them per document. For instance, one document will have a few `us-gaap:OperatingIncomeLoss`es, and the only way I can tell that they denote which period they are reporting is with `contextRef`. That's where things get complicated. I see no discernible pattern. Sometimes they're ascending then descending. They all have their own date formats. Some do multi-period grouping. Some don't. I've tried to find a standard on this. No go. Does anyone have any ideas? Many thanks!

Original source