我正在尝试解析 SEC edgar xml 数据,并且对可链接的定义感到困惑。以下是苹果10-Q定义链接库的摘录。注意:该roleURI
列是从roleRef
定义链接库中的元素添加的。
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
根据这些数据,我希望能够为Condensed Consolidated Statements of Operations
.
我的问题是我不确定如何解析它。我假设一个从arcrole/all
which states 有一个 from link =us-gaap_StatementLineItems
和 to =开始us-gaap_StatementTable
。从这一点可以通过表格跟踪以下链接:
from to
us-gaap_StatementTable dei_LegalEntityAxis
dei_LegalEntityAxis dei_EntityDomain
从这里开始,它停止,因为dei_EntityDomain
没有链接到任何东西。我知道结构应该是这样的:
渲染数据:
模型结构:
我希望链接库的结构看起来像这样:
from to
us-gaap_StatementTable dei_LegalEntityAxis
us-gaap_StatementTable us-gaap_StatementLineItems
我可以看到这将有效地允许从 Statement 表挂起两个级别,但它显然不是那样工作的。
有人可以告诉我如何使用提供的定义链接库数据来读取它以达到上图所示的预期结构。一旦我了解了定义链接库的工作原理,我就可以提取事实和概念。