xbrl尺寸linkbase解析 [英] xbrl dimensions linkbase parsing

查看:96
本文介绍了xbrl尺寸linkbase解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试解析SEC edgar xml数据,并因可链接的定义而感到困惑.以下摘录自苹果为他们的10-Q.注意:roleURI列是从定义链接库中的roleRef元素添加的.

I am trying to parse SEC edgar xml data and am confused by definition linkable. Below is an extract from the definition linkbase for apple for their 10-Q. Note: the roleURI column has been added from the roleRef elements in the definition linkbase.

idx order   role    {http://www.w3.org/1999/xlink}arcrole   {http://www.w3.org/1999/xlink}from  roleURI {http://www.w3.org/1999/xlink}to
16  1   http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/dimension-domain    dei_LegalEntityAxis aapl-20151226.xsd#Role_StatementOfIncome    dei_EntityDomain
33  1   http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/hypercube-dimension us-gaap_StatementTable  aapl-20151226.xsd#Role_StatementOfIncome    dei_LegalEntityAxis
17  1.01    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_OperatingExpensesAbstract   aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_ResearchAndDevelopmentExpense
18  1.02    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_OperatingExpensesAbstract   aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_SellingGeneralAndAdministrativeExpense
19  1.03    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_OperatingExpensesAbstract   aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_OperatingExpenses
14  1.04    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_EarningsPerShareAbstract    aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_EarningsPerShareBasic
15  1.05    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_EarningsPerShareAbstract    aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_EarningsPerShareDiluted
21  1.06    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_SalesRevenueNet
22  1.07    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_CostOfGoodsAndServicesSold
23  1.08    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_GrossProfit
24  1.09    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_OperatingExpensesAbstract
25  1.1 http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_OperatingIncomeLoss
26  1.11    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_NonoperatingIncomeExpense
27  1.12    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest
28  1.13    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_IncomeTaxExpenseBenefit
29  1.14    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_NetIncomeLoss
30  1.15    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_EarningsPerShareAbstract
31  1.16    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract
32  1.17    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_CommonStockDividendsPerShareDeclared
34  1.19    http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract    aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_WeightedAverageNumberOfSharesOutstandingBasic
35  1.2 http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/domain-member   us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract    aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding
20  100 http://www.apple.com/taxonomy/role/StatementOfIncome    http://xbrl.org/int/dim/arcrole/all us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_StatementTable

根据这些数据,我希望能够重新创建呈现的格式

From this data, I would like to be able to recreate the format presented here for the Condensed Consolidated Statements of Operations.

我的问题是我不确定如何解析它.我假设一个从arcrole/all开始,该状态具有从from链接= us-gaap_StatementLineItems到to = us-gaap_StatementTable.从这一点开始,可以在表格中跟踪以下链接:

My issue is that I am not sure how to parse it. I assume that one starts at the arcrole/all which states has a from link = us-gaap_StatementLineItems and to = us-gaap_StatementTable. From this point it is possible to trace the following links through the table:

from                                 to 
us-gaap_StatementTable               dei_LegalEntityAxis
dei_LegalEntityAxis                  dei_EntityDomain

从此处停止,因为dei_EntityDomain没有链接到任何内容.我知道结构应该像这样:

From here, it stops as dei_EntityDomain does not link to anything. I know that the structure should look like this:

渲染数据:

模型结构:

我希望链接库的结构看起来像这样:

I would expect the structure of the linkbase to look something like this:

from                                 to 
us-gaap_StatementTable               dei_LegalEntityAxis
us-gaap_StatementTable               us-gaap_StatementLineItems

我可以看到,这将有效地使Statement表挂起两个级别,但显然不能那样工作.

I can see that this would allow effectively two levels to hang from the Statement table but it clearly isn't working like that.

有人可以告诉我如何使用提供的定义链接库数据来读取它,以到达上图所示的预期结构.一旦了解了定义链接库的工作原理,就可以提取事实和概念.

Can someone tell me how I can use the definition linkbase data provided to read it to get to the intended structure shown in the picture above above. Once I understand how the definition linkbase works, I can extract the facts and concepts.

推荐答案

我已经从Presentation链接库中为StatementofIncome角色创建了表的模型结构.

I have created the model structure of the table from the presentation linkbase for the StatementofIncome role.

order   preferredLabel  role    {http://www.w3.org/1999/xlink}arcrole   {http://www.w3.org/1999/xlink}from  roleURI {http://www.w3.org/1999/xlink}to
1   http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_IncomeStatementAbstract aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_StatementTable
1   http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementTable  aapl-20151226.xsd#Role_StatementOfIncome    dei_LegalEntityAxis
1   http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   dei_LegalEntityAxis aapl-20151226.xsd#Role_StatementOfIncome    dei_EntityDomain
100 http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementTable  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_StatementLineItems
1.06    http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_SalesRevenueNet
1.07    http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_CostOfGoodsAndServicesSold
1.08    http://www.xbrl.org/2003/role/totalLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_GrossProfit
1.09    http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_OperatingExpensesAbstract
1.01    http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_OperatingExpensesAbstract   aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_ResearchAndDevelopmentExpense
1.02    http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_OperatingExpensesAbstract   aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_SellingGeneralAndAdministrativeExpense
1.03    http://www.xbrl.org/2003/role/totalLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_OperatingExpensesAbstract   aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_OperatingExpenses
1.04    http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_EarningsPerShareAbstract    aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_EarningsPerShareBasic
1.05    http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_EarningsPerShareAbstract    aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_EarningsPerShareDiluted
1.1 http://www.xbrl.org/2003/role/totalLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_OperatingIncomeLoss
1.11    http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_NonoperatingIncomeExpense
1.12    http://www.xbrl.org/2003/role/totalLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest
1.13    http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_IncomeTaxExpenseBenefit
1.14    http://www.xbrl.org/2003/role/totalLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_NetIncomeLoss
1.15    http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_EarningsPerShareAbstract
1.16    http://www.xbrl.org/2003/role/verboseLabel  http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract
1.17    http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_StatementLineItems  aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_CommonStockDividendsPerShareDeclared
1.19    http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract    aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_WeightedAverageNumberOfSharesOutstandingBasic
1.2 http://www.xbrl.org/2003/role/terseLabel    http://www.apple.com/taxonomy/role/StatementOfIncome    http://www.xbrl.org/2003/arcrole/parent-child   us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract    aapl-20151226.xsd#Role_StatementOfIncome    us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding

首先,我按顺序排序,然后找到包含单词"Abstract"的第一行"from"行.在这里,我通过"links}到"链接进行迭代,以使用顺序字段创建正确的排序来创建以下表格结构:

Firstly, I sorted by order and then found the first 'from' row which contained the word 'Abstract'. From here I iterated through the 'links}to' links to create the following table structure using the order field to create the correct sorting:

us-gaap_IncomeStatementAbstract

Statement [Table]                                           us-gaap_StatementTable
    Legal Entity [Axis]                                     dei_LegalEntityAxis
        Entity [Domain]                                     dei_EntityDomain
    Statement [Line Items]                                  us-gaap_StatementLineItems
        Net sales                                           us-gaap_SalesRevenueNet
        Cost of sales                                       us-gaap_CostOfGoodsAndServicesSold
        Gross margin                                        us-gaap_GrossProfit
        Operating expenses:                                 us-gaap_OperatingExpensesAbstract
            Research and development                        us-gaap_ResearchAndDevelopmentExpense
            Selling, general and administrative             us-gaap_SellingGeneralAndAdministrativeExpense
            Total operating expenses                        us-gaap_OperatingExpenses
        Operating income                                    us-gaap_OperatingIncomeLoss
        Other income/(expense), net                         us-gaap_NonoperatingIncomeExpense
        Income before provision for income taxes            us-gaap_IncomeLossFromContinuingOperationsBeforeIn...
        Provision for income taxes                          us-gaap_IncomeTaxExpenseBenefit
        Net income                                          us-gaap_NetIncomeLoss
        Earnings per share:                                 us-gaap_EarningsPerShareAbstract
            Basic                                           us-gaap_EarningsPerShareBasic
            Diluted                                         us-gaap_EarningsPerShareDiluted
        Shares used in computing earnings per share:        us-gaap_WeightedAverageNumberOfSharesOutstandingAb...
            Basic                                           us-gaap_WeightedAverageNumberOfSharesOutstandingBa...
            Diluted                                         us-gaap_WeightedAverageNumberOfDilutedSharesOutsta...
        Cash dividends declared per share                   us-gaap_CommonStockDividendsPerShareDeclared

这看起来与从渲染应用程序创建的模型结构非常相似:

This looks very similar to the model structure created from a rendering application:

这篇关于xbrl尺寸linkbase解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆