Chapter 4. An XBRL Primer

In This Chapter

  • Getting deeper into how XBRL works

  • Satisfying your curiosity about what XBRL looks like

  • Being exposed to the technical side of XBRL

  • Getting familiar with the details every business user needs to know

In this chapter, we take a look at the physical "stuff" of XBRL, and we have to tell you that there are some tags and angle brackets. We expose XBRL to you in layers or levels, with each level building on the previous. Not everyone needs to understand XBRL at each level. Business users interact with XBRL through software tools. Good business-user software tools should hide the technical aspects of XBRL from you. We don't teach you how to use software tools here; rather, we give you a solid grounding in XBRL so that when you pick up those tools, you'll know enough about XBRL to quickly become comfortable with any XBRL tool.

We don't try to cover every nuance of XBRL in this chapter: That would be overwhelming for most of you. Instead, we focus on the important details you really need to know. We provide a solid foundation of things you'll use all the time and provide a framework you can use to grow from, if you need to. We even point you to the appropriate resources that you can use to drill into any additional details, if your heart so desires.

Getting Ready for a Geek-Fest of XBRL

In this chapter, we show you XBRL fragments from a basic but complete XBRL taxonomy and XBRL instance that you can find here:

  • XBRL taxonomy: http://xbrl.squarespace.com/storage/examples/Example.xsd

  • XBRL instance: http://xbrl.squarespace.com/storage/examples/Example-instance.xml

Tip

Go to www.dummies.com/go/xbrl to avoid having to type these long links. This takes you to a landing page where you can click the link you need.

Note

We want to keep the code fragments to a minimum and as simple as possible. This chapter's code fragments are focused to help you zoom in specifically on the current discussion. All this chapter's fragments come from these basic examples. The examples provide you with a perspective to see where the focused fragments we're discussing fit into an overall XBRL instance or XBRL taxonomy.

Grasping the XBRL Framework

The XBRL Specification doesn't actually provide a logical model. At XBRL's highest levels, we can, however, imply a logical model. As we dig deeper into XBRL, though, we rely on XBRL's physical model in order to explain it.

The core of XBRL is the XBRL 2.1 Specification (www.xbrl.org/SpecRecommendations). Modules build upon the base XBRL specification, providing additional functionality. You choose whether to use other XBRL modules based on your needs. In this chapter, we stick with the base XBRL Specification. (Chapter 16 gets into the other XBRL modules.)

The XBRL Specification provides a framework that divides XBRL into two main parts:

  • XBRL taxonomies, which are XML schemas that define the concepts and articulate a controlled vocabulary used by XBRL instances, and XLink linkbases, which provide additional information about those concepts.

  • XBRL instances, which contain the facts being reported, along with contextual information for those facts.

We break our explanation of XBRL into two parts: XBRL taxonomies and XBRL instances. An XBRL taxonomy has a lot more moving parts to it than an XBRL instance. But XBRL taxonomies and XBRL instances interact with each other. We put these two pieces of the XBRL framework together and explain how the two interact.

After we cover these key parts, we drill into the pieces that make up an XBRL taxonomy and an XBRL instance. We give you the level of understanding of the important details that you need without overwhelming you with areas of XBRL you'd likely never run across.

Note

A big part of the XBRL framework is the flexibility offered by XBRL's extensibility. We show you how XBRL's extension capabilities are provided by XBRL taxonomies and used by XBRL instances. After introducing the important key ideas, we drill into the key notions to expand your level of understanding in a few specific areas. We finally point you to other chapters that expand on the foundation we lay in this chapter.

Discovering Fundamentals of XML for XBRL Users

As XBRL is an XML language, we need to tell you a little about eXtensible Markup Language (XML). XML is a language for creating markup languages, which XBRL is. XBRL is an XML language. XBRL uses other pieces of the XML family, including namespaces, XML Schema, XML Base, XLink, XPath, and XPointer.

If you want to dig into the details of XML, we recommend Lucinda Dykes and Ed Tittel's XML For Dummies (Wiley).

Exploring XBRL Taxonomy Parts

XBRL taxonomies have various physical pieces and express concepts, resources, and relations (see Chapter 3). These pieces, described in the following sections, work together to provide the functionality you need to express the meaning of business information that is to be exchanged.

Taxonomy schemas and linkbases

XBRL taxonomies are comprised of two parts:

  • Taxonomy schemas are the XML Schema part of the XBRL taxonomy. Taxonomy schemas contain concept definitions that take the form of XML Schema elements. For example, the business concept Cash may be an XML Schema element that has a name attribute value of "Cash" and other attributes.

  • Linkbases are the XLink part of the XBRL taxonomy and are also XML documents. The term linkbase is an abbreviation for link database. Linkbases are physical things used to express a logical thing, networks. Networks come in two types: resource and relation. (We explain networks, resources, and relations in the upcoming section "Networks and extended links.") Resource and relation networks are expressed in the XLink syntax in the form of what is called an extended link.

Note

Extended links are basically containers that hold the data contained within linkbases. We don't want to get into a big technical discussion of extended links here; if you want that, read the XLink specification at www.w3.org/TR/xlink. Chapter 22 provides more information on XLink and linkbases.

Discoverable taxonomy sets

A single XBRL taxonomy may be comprised of a set of multiple taxonomy schemas and linkbases. This set has a specific and important name in XBRL: discoverable taxonomy set (DTS).

A DTS is governed by discovery rules, specified by the XBRL Specification, that XBRL processors understand. A DTS can contain any number of taxonomy schemas and/or linkbases and can start from either a taxonomy schema, a linkbase, or an XBRL instance.

Networks and extended links

Networks are a logical aspect of XBRL expressed physically as a set of linkbases. Linkbases exist within the physical model and are collections of extended links. Extended links work slightly differently in XLink than they do in XBRL. In XLink, each extended link is physically separated. In XBRL, a role attribute is added to an extended link. A network is a collection of all the extended links of a specific type with the same extended link role. An extended link role is nothing more than a unique identifier expressed as a role attribute of an extended link.

Note

You use networks to separate and organize resources and relations. Networks have different extended link roles and different unique identifiers, which creates the separation. Network roles and extended link roles are exactly the same thing. The creators of XBRL taxonomies define these roles within taxonomy schemas.

Resources and relations within networks

Physically, networks come in two types categorized by the type of extended links they use:

  • Resource networks provide additional information about a concept. The additional information is in the form of an XLink resource. Of the five standard types of linkbases, label and reference are resource linkbases, and they express resource networks. Resources can have different resource roles to help further categorize resources. An example of additional information is an English label, Property, Plant and Equipment, with a standard role that is associated with the concept of the name PropertyPlantAndEquipment within a taxonomy schema. An example of a reference is a URL to a company's accounting manual or, say, some descriptive information about the chapter, section, subsection, or page of that manual.

  • Relation networks express relations between concepts using XLink arcs. Of the five standard types of linkbases, presentation, calculation, and definition are relation linkbases, which they express as relation networks. Relations (expressed as an XLink arc) can have different arc roles to help further categorize relations. An example of a relation network is the presentation network with the network role Balance Sheet that indicates that the concept PropertyPlantAndEquipment is part of that Balance Sheet and related to Assets.

Identifying XBRL Instance Parts

Compared to XBRL taxonomies, XBRL instances are simple and straightforward. XBRL instances are single physical files that contain the following pieces: references to DTS information, facts, contexts, units, and footnotes. All these components help you use that business information on your terms.

We encourage you to refer Chapter 3. We drill into the explanations of each of these parts later in this chapter in the section "Drilling into XBRL Instances." We devote all of Chapter 18 to explaining XBRL instances in even more detail.

Achieving Flexible Business Information Exchange

XBRL taxonomies and XBRL instances provide for business information exchanges, the fundamental objective of XBRL. Key relationships between the components in this chapter are critical to understanding XBRL. This understanding can make the difference between making XBRL meet your needs and fighting XBRL at every step along the way. This section explains these key ideas both logically and how they're physically implemented.

Defining concepts and organizing with taxonomy schemas

Concepts are defined in taxonomy schemas, which are really XML schemas. The XBRL concepts are XML Schema elements. Basically, XBRL leverages XML Schema as the means of defining XBRL concepts. XBRL adds a few attributes to XML Schema elements.

Taxonomy schemas can point to other taxonomy schemas already defined. XBRL uses the XML Schema mechanisms (import and include) to combine sets of concepts defined in separate physical files. XBRL also provides mechanisms (schemaRef and linkbaseRef) for combining DTS components. All these taxonomy schemas become part of the DTS. These mechanisms allow you to build modular taxonomy schemas. Another discovery mechanism for taxonomy schemas is any reference from a linkbase to a taxonomy schema.

Taxonomy schemas can also point to resource or relation networks that likewise become part of the DTS.

Using networks to separate and organize sets of resources

Resource networks are physically contained in XLink linkbases in the form of extended links with a specific role. A resource defined within these networks allows you to add information to the XBRL concepts defined in the taxonomy schema. XBRL provides two types of resource networks in the XBRL specification: labels and references. (See the section "Drilling into Resource Networks," later in this chapter, for more information.) The XBRL modules add other types of resources, such as formulas and formatting information (see Chapter 16). You can add your own types of resources using the Generic Linkbase specification (see Chapter 16). Taxonomy schemas or XBRL instances can connect a resource network to the DTS.

Separating and organizing sets of relations by using networks

XLink linkbases physically contain relation networks in the form of extended links with a specific role. Relation networks allow you to associate one concept with another concept in various ways for many purposes. XBRL provides three types of relation networks in the XBRL specification: presentation, calculation, and definition. (See the section "Drilling into Relation Networks" later in this chapter, for more information.) You can add your own types of relations using the Generic Linkbase specification; refer to Chapter 16. Taxonomy schemas or XBRL instances can connect a relations network to the DTS.

Exchanging facts with XBRL instances

XBRL instances contain the information that is being exchanged. That information is expressed in the form of facts. Each fact is associated with a concept from an XBRL taxonomy, which expresses the concept and either defines it or points to a definition of the concept external to the XBRL taxonomy by using one or more XBRL references. Concepts are associated with an XBRL instance by being part of the DTS. Other information in networks connected to the XBRL instance provides additional information that helps you understand and use the facts within an XBRL instance. Contextual information is also associated with facts to help further explain things like which entity and which period a fact relates to. Numeric information has additional contextual information called units. You can use XBRL footnotes (not to be confused with what an accountant calls a footnote) to communicate additional information, such as comments.

Gaining flexibility through extension

The ability to express concepts, resources, and relations is well and good, but if the XBRL taxonomy isn't exactly what you want, guess what? You can change it. This characteristic is why XBRL is called the Extensible Business Reporting Language. One of the most powerful features of XBRL is that it's dynamic when it needs to be. Although this extensibility is there if you need it, you don't have to use it.

XBRL's need for extensibility makes the physical syntax level seem somewhat confusing. All these separate components provide the required flexibility needed to make XBRL's extensibility work as needed. The good news is that XBRL processors hide much of this physical syntax from you. The logical view of XBRL is much easier to work with.

We get into the details of how extensibility works later in the section "Gaining Flexibility Through Extension"; for now, just realize that it exists. You never change someone else's taxonomy schema or linkbases, but you can create your own taxonomy schemas or linkbases, which add to or change things others have defined by becoming part of the DTS. You can even nullify what exists in someone else's taxonomy, rendering it unusable. As such, you can change the overall DTS, effectively virtually changing what you should never change physically. Further, the users of the XBRL instance information can clearly see the changes you've made because you communicated those changes in the form of an XBRL taxonomy that is part of the DTS.

Achieving interoperability through validation

Does all this stuff seem complex? Business reporting is complex; sometimes incredibly complex. The good news is that computers, not you, deal with this complexity. Software guides you through the process, makes sure that you follow the rules of XBRL, and otherwise helps you achieve your goals. Software verifies that everything is okay by checking to be sure that your code doesn't have any errors, a process known as validation. You can make a mistake in lots of different ways and places, so you can check for errors in many different ways. (Chapter 12 covers validation in detail.)

Demystifying the DTS

XBRL requires everything in an XBRL instance to be explicitly defined. An XBRL instance must directly or indirectly physically reference all those XBRL taxonomies whose concepts, resources, and relations have bearing on the XBRL instance's contents. The first thing an XBRL processor does when it encounters an XBRL instance is attempt to discover all its related XBRL taxonomies; if it can't, it goes no further!

Note

Many times, when people refer to an XBRL taxonomy, they really mean DTS.

Schema files in XML and XBRL taxonomies work differently. The XBRL taxonomies must exist and be discoverable. XML can provide hints about the schema or point to a schema, or it may not provide a schema at all. Not with XBRL. Those schemas that are XBRL taxonomies must exist because the XBRL taxonomies enable you to understand the information in the XBRL instance. Figure 4-1 shows how multiple taxonomy schemas and linkbases are brought together into a DTS.

In Figure 4-1, the XBRL instance is connected to a set of two XBRL taxonomies. Each XBRL taxonomy is comprised of one taxonomy schema and two linkbases. The DTS is the combined set of all taxonomy schemas and linkbases from both XBRL taxonomies.

Warning

Note that an XBRL instance is never part of the DTS, but it can contain references to taxonomy schemas, XML Schemas, and linkbases that are part of the DTS.

Grasping the functioning of networks

When we talk about networks in this book, we're not talking about computer networks, broadcasting networks, or any other form of communication. Although network is clearly not an accounting or business term, it's a way to describe something that does occur in business information.

A DTS.

Figure 4.1. A DTS.

Networks have two important states:

  • Unresolved or raw form: In XBRL jargon, this state is called the base set. A base set is the actual physical relations in what can best be described as an unresolved or raw state. For example, if a relation is expressed between two concepts, and then another relation is created to prohibit that relation, in the base set, two relations exist. These two relations are more the physical form of the actual relations. To better understand what we mean, contrast it to the resolved form.

  • Resolved form: In XBRL jargon, this state is called a network or a network of relations. A network is the resolved form of the set of relations. If you have two relations — one that defines a relation and a second that prohibits that relation — the resolved form of this set of relations is no relation. The resolved form of the set of relations is more the logical result of all the physical relations.

Here's an example of a network: Property, Plant and Equipment, Net is an accounting concept that would likely be designed in a calculation network in XBRL to denote their mathematical accounting relationship, shown in Figure 4-2.

Figure 4-2 shows that XBRL is saying that Property, Plant and Equipment, Net = Land + Buildings + Furniture and Fixtures + Other. To express relations in an XBRL taxonomy, you must have at least one network because all resources and relations exist within a network.

A depiction of a relationship expressed within a network describing Property, Plant and Equipment, Net and its subcomponents.

Figure 4.2. A depiction of a relationship expressed within a network describing Property, Plant and Equipment, Net and its subcomponents.

When to use networks

When you build an XBRL taxonomy, you express resources and relations within networks. Understanding why you'd use a network helps you understand what networks are. You separate relations into different networks for two general reasons:

  • Convenience: The taxonomy creator may want to create several smaller networks rather than one big network. For example, in the US GAAP taxonomy, the information contained in the taxonomy is broken up into multiple networks. Another way that the taxonomy may have been created is by combining all those networks into one single network. Sometimes working with several smaller pieces rather than one big piece is easier. Networks allow you to create pieces, if you want.

  • Out of necessity: Sometimes you have to create networks. Eliminating conflicts when one parent concept has two or more possible sets of child concepts is another reason to create a network. For example, it would be impossible to express these three different ways to arrive at the one value for Receivables, Net in one network:

    • Receivables, Net = Receivables, Gross minus Allowance for Bad Debts

    • Receivables, Net = Receivables, Net, Current plus Receivables, Net, Noncurrent

    • Receivables, Net = Trade Receivables, Net plus Financing Receivables, Net plus Other Receivables, Net, and so on

Tip

On the left side of Figure 4-3, nothing is physically separating the three ways to compute Receivables, Net. Humans can see this separation; we understand that they're distinct. But how would a computer know that they're separate? However, on the right side, see how networks physically separate the three different computations? Computers need to be told that the three computations are, in fact, separate. Otherwise, they'd collide. Networks provide that physical separation, communicating that separation to software applications.

Showing how networks help avoid conflicts.

Figure 4.3. Showing how networks help avoid conflicts.

Trying to express all three of these relations within one network would result in collisions in the relations. To get around this issue, you must use three different networks, one expressing each of the different calculation relations.

Other important aspects of networks

Here are some other important points about networks to keep in mind:

  • You shouldn't physically change networks others created, but you can create your own networks, hide original relationships to effectively nullify them, and redefine new relations. Networks exist within a set of physical files. You may not change someone else's physical file. Instead, relations you create take precedence over the existing relations that existed, in effect creating new relations. You create new relations by prohibiting someone else's relations, creating new relations, or both. This process, in effect, creates a new set of relations and also documents exactly how you've changed what previously existed.

  • Although you may not change someone else's taxonomy's set of physical files, you don't have to use the linkbase files that contain the relations. If you don't refer to the linkbase files, for all practical purposes, the relations don't exist in the context of the DTS because the file will never get discovered. (Chapters 17 and 18 discuss XBRL taxonomies and XBRL instance in more detail.)

  • You can't order networks within XBRL. For example, say that you have three networks: Balance Sheet, Income Statement, and Cash Flow Statement. Users of an XBRL instance may use them in the order of Income Statement, Balance Sheet, and Cash Flow Statement. Although XBRL has no means for prescribing a specific order, you can use proprietary approaches to prescribe the specific order of networks — but keep in mind that they're proprietary and shouldn't be relied on outside of any specific piece of software that supports that proprietary approach.

  • Users can fabricate a network to their liking without the creator of the XBRL instance being involved or otherwise consenting by using XBRL's extensibility. As a result, XBRL is sometimes called interactive data. Users can make use of the XBRL instance information as they see fit, without consideration for how the creator of the information may want it used. However, when information users do reorganize information, they take on the responsibility of getting the relations correct.

Drilling into Taxonomy Schemas

Taxonomy schemas are one of two parts of an XBRL taxonomy (linkbases being the other) for expressing the information model of XBRL instances. Taxonomy schemas have several pieces, each of which helps you express meaning relating to that information model. You don't have to use all the pieces, but you can, if you want.

The important pieces of a taxonomy schema are concepts and pointers to other concepts, resources, and relations. (We explain each piece of the taxonomy schema in the next sections.)

Note

XML namespace prefixes add readability to XML markup. Although these prefixes aren't required, they can be anything you want (clearly within the bounds of proper XML syntax). We use these namespace prefixes when we show you XML markup:

  • xs: XML Schema namespace

  • xbrli: XBRL Instance namespace

  • link: XBRL Linkbase namespace

  • basic: Taxonomy schema of our example

Concepts

Essentially, taxonomy schemas are all about concepts, modeling the pertinent aspects of a collection of business concepts (controlled vocabulary) related to some exchange of business information. XBRL instances use concepts from a taxonomy schema to express fact values for the purpose of exchanging this information.

Concepts have the following characteristics expressed as attributes of XML Schema xs:element elements:

  • Name: Every concept must have a name attribute. The name identifies the concept within a taxonomy schema.

  • ID: Every concept may have an id, attribute. If you're using linkbases, you need that id when you add resources or express relations because this id is how the resource or relation is connected to the concept. The id does two things. First, it uniquely identifies a concept across all taxonomy schemas. Second, relations and resources use id's (not names) as unique keys to create the connection between the relation or resource and the concept to which the relation or resource relates.

  • Type: Every concept must have a type attribute. You may know the term as data type from other technologies. Data types constrain content, such as string, integer, or date. XBRL has similar primitive types, but it also has a number of more specialized types common to the business world, such as monetary or shares. You can also define your own types.

  • Substitution Group: Every concept must have a substitutionGroup attribute, and the value of that attribute will most likely be xbrli:item, which means the element is an XBRL concept.

    Note

    Substitution groups can get pretty involved. Just realize that there is a lot to them and be careful how you use them. Ninety-nine percent of all the substitution groups you run across will be xbrli:item, which is straightforward.

  • Period Type: Every concept must have an xbrli:periodType attribute. The xbrli:periodType provides information about the kind of period the concept relates to. Two values are most commonly used: instant and duration. An instant xbrli:periodType denotes a point in time. Conversely, a duration xbrli:periodType denotes a span of time between two instants. For example, a balance sheet reflects information as of a specific point in time, say December 31, 2008, and thus has a xbrli:periodType value of instant. An income statement reflects information for a span of time, such as "For the Year Ended December 31, 2008," or a duration from January 1, 2008 to December 31, 2008, and thus has a periodType value of duration.

    Note

    Another possible value for periodType is xbrli:forever. Read the XBRL Specification for more information.

  • Balance: Concepts may have a xbrli:balance attribute, but aren't required to. If it does have a value, the value must be either debit or credit. If you're an accountant, you get debits and credits. If not, you probably don't have to deal with debits and credits, or you have an accountant helping you, so go ask them about debits and credits.

Here's what a concept looks like within a taxonomy schema expressed as an XML Schema element:

<xs:element
name="NetIncomeOrLoss"
id="basic_NetIncomeOrLoss"
type="xbrli:monetaryItemType"
substitutionGroup="xbrli:item"
xbrli:periodType="duration"
xbrli:balance="credit"
>

The preceding code fragment expresses the concept NetIncomeOrLoss in the form of an XML Schema xs:element element within a taxonomy schema. The element has a number of attributes. Many of these attributes are provided by XML Schema, including the name, id, type, and substitutionGroup. The xbrli:periodtype and xbrli:balance are attributes added to XML Schema by XBRL. The values for the attributes are rather straightforward; refer to the list before the code fragment.

Warning

Sometimes concepts are referred to as elements because they exist within the physical part of an XBRL taxonomy known as a taxonomy schema, which is an XML Schema. But not all XML Schema elements within a taxonomy are concepts. Single value XBRL facts always have a substitutionGroup value of xbrli:item, which is how you know they're XBRL concepts.

Pointers to other concepts, resources, or relations

Another piece of the taxonomy schema that you may find are references to other taxonomy schemas and linkbases. You can create references using the following elements:

  • Import: You can use an XML Schema xs:import element within a taxonomy schema file to refer to another taxonomy schema or XML schema file. Each imported XML Schema has a different namespace identifier.

  • Include: An XML Schema xs:include element does something similar to the xs:import element. The difference is that included files pull elements into the namespace of the file containing the include element, and included files don't contain a namespace identifier.

    Tip

    You will rarely use include. However, XBRL GL does make extensive use of the include element.

  • LinkbaseRef: A link:linkbaseRef element or linkbase reference points to a linkbase, which contains networks of either resources or relations.

These pointers allow you to use taxonomy schemas, XML schemas, or linkbases others have created; let you modularize your taxonomy so that you or others can use some parts of your XBRL taxonomy without being forced to use other parts; and otherwise physically separate the files that make up your XBRL taxonomy.

Drilling into Resource Networks

Resource networks let you express additional information for concepts. Labels and references are two types of resource networks that the XBRL standard provides. The XBRL Formulas specification provides a third type of resource. This list explains these different types of resource networks:

  • Label: Label resources, as the name suggests, allow the creator of an XBRL taxonomy to create labels for each concept in the taxonomy. Basically, they provide a more user-friendly label in place of the ugly XML element names. Another use for labels is to provide multilingual support and multidialect support. Labels also provide documentation for a concept, such as a human-readable definition of the concept.

  • Reference: Reference resources allow the creator of an XBRL taxonomy to express references to external sources (such as a paragraph in a manual) that explain or further define a concept in human terms. References are pointers to a reference, not the references themselves.

  • Formula: Not in the base XBRL Specification but added by the XBRL Formula Specification, formula resources allow the creator of an XBRL taxonomy to express various types of business rules. XBRL instances that make use of an XBRL taxonomy that contains these rules must comply with these rules. (See Chapter 16 for more information about XBRL Formula.)

You can express an infinite number of different types of resource networks. You can specify your own type of resource networks using the XBRL Generic Linkbase Specification (see Chapter 16).

Resources are connected to concepts in a taxonomy schema. Resources can have different resource roles, many of which XBRL predefines, but taxonomy creators can also define their own resource roles. These roles let taxonomy creators further categorize resources, if needed. (If you need to understand how to create resources, see Chapter 22.)

You can categorize resources by the preceding resource roles. This categorization helps when partitioning one type of resource from another. This resource role is different than the role of the network (extended link role), which contains the resources. Finally, remember that the resources are connected to the id element of a concept expressed within a taxonomy schema.

Tip

The documentation for each concept expressed in an XBRL taxonomy is commonly implemented as labels with a specific label role of www.xbrl.org/2003/role/documentation. XML Schema offers documentation in the form of an xs:appinfo element, but it's not standardized, not extensible, is generally ignored by most XBRL processors, can't be prohibited, and therefore is a bad idea to use.

Tip

Labels typically contain human-readable text, such as Assets. However, labels can contain XHTML markup that allow you to use labels to do all sorts of clever things. Whether these clever things are a good idea is another story. The best practices around the use of XHTML in labels have yet to be established. Be aware of this nifty feature, but be careful!

Drilling into Relation Networks

You can use the following types of standard relation networks to express relations between concepts:

  • Presentation: Presentation relations allow you to express a simple parent-child type of relationship, basically a hierarchy. Presentation relations are primarily intended to help organize the XBRL taxonomy. You can also use presentation-type relations to help generate human-readable renderings of an XBRL instance.

  • Calculation: Calculation relations allow you to express certain types of computations between concepts within an XBRL taxonomy. XBRL calculation relations handle only addition and subtraction, and concepts must be in the same XBRL context. This is many times helpful, but can also be somewhat limiting. Need more power in your computations? Then use XBRL Formulas (see Chapter 16).

  • Definition: You can use definition relations for many purposes. Definition relations basically let you express any type of relation. You can define any arc role, which explains what type of relation you've created. For example, the XBRL Dimensions Specification uses definition relations to express multidimensional type relations.

You can express an infinite number of different types of relation networks. You can specify your own type of relation networks using the XBRL Generic Linkbase Specification (see Chapter 16).

Relations and the concept in a taxonomy schema to which the relation relates are connected. XBRL processors understand this connection. Relations can have different arc roles, many of which XBRL predefines, but taxonomy creators can also define their own arc roles. Arc roles differentiate or categorize relations, should you have that need.

We don't show you an example of the XML within a linkbase here because the physical XML is far too complex, and explaining these details would be more distracting than helpful. Chapter 22 has an example.

Drilling into XBRL Instances

XBRL instances are the physical documents that contain business information that is published, transferred, or otherwise exchanged. Here are the parts of an XBRL instance:

  • Reference(s) to XBRL taxonomy(s)

  • Contexts

  • Units

  • Facts

  • XBRL Footnotes (that is, comments)

  • Other technical odds and ends

Figure 4-4 shows the components of an XBRL instance and the relation to XBRL taxonomies that support the instance. The figure shows the components of an XBRL instance and the relations between the components on the left, the connection between the XBRL instance and the XBRL taxonomy, the relations between the XBRL instance and the XBRL taxonomy, and the relations within the XBRL taxonomy on the right.

References to XBRL taxonomies

XBRL instances always refer to an XBRL taxonomy or a set of XBRL taxonomies, collectively known as the DTS. Because the XBRL taxonomies make up the DTS that determines the controlled vocabulary and the other semantic meaning expressed by the XBRL taxonomies, you'll want to know where to get those all those XBRL taxonomy pieces. The references to these physical files tell you where to get the XBRL taxonomy pieces that explain the controlled vocabulary the XBRL instance uses and all the other meaning expressed for the information model by the DTS.

Relations between XBRL instance components and XBRL taxonomy components.

Figure 4.4. Relations between XBRL instance components and XBRL taxonomy components.

An XBRL instance can refer to pieces of the DTS in two ways:

  • SchemaRef: A link:schemaRef element, or schema reference, points to a taxonomy schema file or an XML schema file. Those files can contain references to even more files. These physical files may be components others created or components created by you that express new concepts, relations, or resources used by your information model or that modify the information of other XBRL taxonomies you refer to. Your modifications are commonly referred to as an extension.

  • LinkbaseRef: A link:linkbaseRef element, or linkbase reference, points to a linkbase that contains relations or resources. The linkbases themselves generally reference the taxonomy schemas that contain the concepts associated with that linkbase.

Note

You can connect linkbases directly to XBRL instances with a linkbaseRef. Alternatively, you can use a schemaRef to connect linkbases to a taxonomy schema, which then references one or more linkbases.

An XBRL processor is responsible for grabbing all the referenced XBRL taxonomy pieces that make up the DTS, putting all the pieces together correctly, and communicating any issues relating to that process to the user of the XBRL instance.

Here is an example schemaRef:

<link:schemaRef xlink:type="simple" xlink:href="Example.xsd" />

The preceding code fragment shows a schema reference to the taxonomy schema with the name Example.xsd. A linkbase reference is similar, with the only difference being a different element name.

Tip

Software can add linkbases to a DTS dynamically by connecting the linkbase to the XBRL instance. For example, consider an XBRL instance that refers to an XBRL taxonomy that has only English labels in it. Suppose that someone else creates a linkbase that provides Spanish labels for that same XBRL taxonomy. Further, suppose that your native language is Spanish, and you'd prefer to use those Spanish labels, but the linkbase isn't physically connected to the XBRL instance. No problem! All you have to do is load the XBRL instance, which will automatically load the DTS that the XBRL instance points to. Then you use your software to point to the linkbase with the Spanish labels. Voilà! You can use the Spanish labels! Pretty slick, eh? That is why XBRL is sometimes referred to as interactive data.

Tip

You can use the same approach to reorganize the way you view XBRL instance information. If you don't like the way the creator of the XBRL instance or XBRL taxonomy organized the information, you can simply reorganize the instance information by creating your own XBRL taxonomy extension. You can then use your view, provided by your XBRL taxonomy, instead of the XBRL instance creator's view of the information it contains.

Giving facts context

Contextual information helps users of the information in the XBRL instance understand the context in which the information is being used. Context is provided using the xbrli:context element, which contains

  • ID: Every context within an XBRL instance has an id that uniquely identifies the context so that one or more fact values can refer to it. A context id attribute can look something like X10B72009. These IDs have no meaning, other than to uniquely identify the context. They're like an identification number. The meaning is expressed within the elements and attributes of the context.

  • Entity: The xbrli:entity element is part of the context and has two pieces; the first is required, and the second is optional. The required piece is the xbrli:identifier element. The scheme attribute of the xbrli:identifier element communicates which identification scheme is being used. The value of the xbrli:identifier is the actual identifier from that scheme. For example, the U.S. SEC has a numbering system called a CIK number. XBRL instances going to the SEC use a pointer to that scheme, which may be something like www.sec.gov/CIK. The identifier value is the actual CIK number, such as 0000066740.

    The second and optional piece of information is the entity xbrli:segment element. You can put any information you desire into the xbrli:segment element in order to provide information that helps users gain needed contextual information to understand the fact value. Note that the XBRL Dimensions specification is a way to express this type of contextual information, and the use of XBRL Dimensions information in the xbrli:segment element is emerging as a best practice. However, any valid XML is allowable, other than XBRL. (We discuss XBRL Dimensions in Chapter 16.) You can express an infinite number of elements within a segment.

  • Period: The xbrli:period element communicates contextual information about the period to which a fact value relates. The xbrli:periodType attribute is defined within a taxonomy schema. The xbrli:periodType on a concept within the taxonomy schema must match the period used within a context used on that concept. The two common xbrli:periodType values are

    • Instant: If the XBRL taxonomy concept defines the concept as an instant, the element used within the period will be xbrli:instant and will contain a single date — for example, <xbrli:instant>2009-12-31</xbrli:instant>.

    • Duration: If the taxonomy concept says duration, two elements will be within the xbrli:period, xbrli:startDate, and xbrli:endDate. Each one has a value to communicate the starting and ending dates of the duration (date range). The start date may look like <xbrli:startDate>2009-01-01</xbrli:startDate>, and the end date may look like <xbrli:endDate>2009-12-31</xbrli:endDate>.

    There is one other possibility for period, but its usage is rare. The value xbrli:forever means no date is provided, and that context is always applicable.

  • Scenario: The xbrli:scenario element works in a manner similar to the xbrli:segment element of the xbrli:entity context described earlier in this list. The xbrli:scenario element is optional. The xbrli:scenario element can contain any valid XML other than XBRL. One way of expressing this information is to use XBRL Dimensions, and it's becoming a best practice to use this approach. Literally, you can put any type of contextual information into the xbrli:scenario element, such as whether information is actual, budgeted, and so on. You can express an infinite number of elements within a scenario.

Putting these pieces together, here's an example of a xbrli:context element:

<xbrli:segment>
      >>>>>segment information would go here<<<<<
     </xbrli:segment>
</xbrli:entity>
<xbrli:period>
 <xbrli:startDate>2009-01-01</xbrli:startDate>
 <xbrli:endDate>2009-12-31</xbrli:endDate>
</xbrli:period>
 <xbrli:scenario>
   >>>>>scenario information would go here<<<<<
 </xbrli:scenario>
</xbrli:context>

The preceding code sample shows the components a xbrli:context element from an XBRL instance. The context has an id value of D-2009, which is the same value of the contextRef on one or more facts, which we discuss in the upcoming section "Expressing the values for facts." The entity xbrli:identifier element has a value of SAMP, which comes from the scheme http://www.Sample.com. The segment element in our example is empty (we just wanted to show you were it would be located) — see Chapter 22. The xbrli:period element has a duration (a period of time) value with a start date of 2009-01-01 and an end date of 2009-12-31. As with the xbrli:segment, the xbrli:scenario element values aren't shown, as we don't want to get into this topic at this time (see Chapter 22).

Units provide additional context for numeric facts

In order to provide the proper context for a numeric value, you need to know the units for the numeric values. For example, say that you have a value of 1,000. Is that some particular currency, and if so, is it U.S. dollars, euros, yen, or some other currency? Or, is it square feet, the number of employees, or something else?

An XBRL instance contains units whenever you have any numeric fact values. A xbrli:unit element contains the additional context:

  • ID: Every xbrli:unit element has an id attribute that uniquely identifies the unit so that numeric fact values can point to it. The id on the units works exactly the same way that a context id attribute works.

  • Measure: Units generally have one xbrli:measure element, but they can have any number of measures. The value of the xbrli:measure element is the actual units for the fact value — for example, iso4217:EUR, which is the ISO currency code for the euro. If the fact value has no units, such as a percentage, the measure would have a value of xbrli:pure, which indicates that it's a pure number with no real units.

Have a look at how you can express units within an XBRL instance:

<xbrli:unit id="U-Monetary">
 <xbrli:measure>iso4217:EUR</xbrli:measure>
</xbrli:unit>

The code sample of unit shows the unit element with an id attribute value of U-Monetary that would correspond to one or more fact unitRef attribute value, which ties the fact to this unit. The xbrli:unit element has a xbrli:measure element with the value of iso4217:EUR, which means that the ISO 4217 standard currency code value of EUR for euros is the unit of measure.

Expressing the values for facts

An XBRL instance's meat is the fact that the XBRL instance is communicating. What a fact looks like can be slightly different depending on whether it's numeric. Numeric facts need to indicate the units in which the numeric fact value is expressed and the decimal places of the numeric value.

These parts make up a fact in an XBRL instance:

  • Concept name: Every fact is data for a concept defined by one of the taxonomy schemas within the DTS of the XBRL instance. For example, a concept name may be something like gaap:CashAndCashEquivalents. The concept name is actually not exactly the name from the taxonomy, but rather the qualified name (sometimes called the QName), which is the name plus what is called the namespace prefix of the taxonomy schema from which the concept came. A namespace prefix is basically shorthand for referring to a namespace identifier. The namespace identifier basically identifies the taxonomy schema. We know, boring technical stuff. But the technical people dig this sort of thing and make all these connections behind the scenes for you.

  • ID: Facts can have an id attribute that uniquely identifies the fact, but it's optional. Generally, the id isn't really necessary on a fact.

  • Context reference: Every fact has a contextRef or context reference attribute. The contextRef attribute refers to one of the id attributes of a context element defined in your XBRL instance. The context element contains information that's necessary to understanding the context in which the fact value is being used.

  • Unit reference: Every fact with a numeric concept has a unitRef or unit reference attribute. The unitRef refers to one of the id attribute of one of the unit elements defined in your XBRL instance. Concepts like strings, dates, and a few other odds and ends don't need unit information, so you don't need to provide one for facts with those types. Your software can help you sort out whether units are needed on a fact.

  • Decimals: Every fact with a numeric concept must have either a decimals or possibly a precision attribute. Both the decimals and precision attributes provide virtually the same functionality, explaining the number of decimal places to which the fact value is accurate. Decimals are preferred because most people to understand them more easily. You can specify, say, 2 as the decimals value to indicate that a fact value is accurate to 2 decimal places, or −3 to indicate that a number is accurate to thousands. Software applications generally guide you to the appropriate choice.

  • Fact value: Facts have a value, which is referred to as the fact value. A fact value can be a number, such as 1000, a text, such as LIFO, or any other data type, including an entire narrative with several paragraphs of text. The taxonomy schema determines and enforces the data type.

Here is an example of a numeric fact:

<basic:NetIncomeOrLoss
  contextRef="D-2009"
  unitRef="U-Monetary"
  decimals="-3">5347000</basic:NetIncomeOrLoss>

The preceding XBRL instance fragment shows a fact with the value of 5347000. That fact expresses information for the concept basic:NetIncomeOrLoss. It points to a context with the contextRef of D-2009 and units information with the unitRef of U-Monetary. (Refer to the earlier sections "Giving facts context" and "Units provide additional context for numeric facts.") The numeric fact is accurate to −3 decimal places (in thousands), as you can see in the decimals attribute value of −3.

Commenting with XBRL footnotes

XBRL instances can also contain what are basically comments but are referred to in XBRL as footnotes. XBRL footnotes are used in the XBRL instance as comments or notations that refer to one or more fact values.

Note

XBRL footnotes are effectively a resource network physically contained within an XBRL instance. The footnote network is expressed as a linkbase and operates just like any other resource type linkbase.

Footnotes are good to know about and useful if you have a special case where you need them, but in the grand scheme of things, they really aren't that important. (For more on footnotes, see Chapter 22.)

Warning

Many people confuse XBRL footnotes with the term footnote as it applies to a financial statement. They're not the same thing. What XBRL footnotes actually provide in terms of functionality, how people use them, and how software vendors implement them are rather inconsistent, and you should avoid using footnotes, if possible. When a specific regulator or someone does specify what they should be used for and how they operate, however, you should follow the guidance of that regulator.

Gaining Flexibility through Extension

Many businesses need XBRL-required information models to be dynamic (flexible), and XBRL was created to fulfill that need. XBRL lets you modify XBRL taxonomies, but you don't have to if you don't need to.

Warning

We use the term modified in a special way here. These modifications don't change other people's physical files, but rather those creating extensions add new XBRL taxonomy components that can virtually change what others have created. It also articulates how you changed it.

Here are two terms you need to know to understand how extension works:

  • Base XBRL taxonomy: You can think of a base XBRL taxonomy as an XBRL taxonomy that another XBRL taxonomy is extending. Other terms sometimes used to refer to these taxonomies are standard taxonomies or anchor taxonomies. For example, a taxonomy mandated by a regulator may be a base taxonomy.

  • Extension XBRL taxonomy: You can think of an extension XBRL taxonomy as an XBRL taxonomy that extends some base XBRL taxonomy. Other terms sometimes used to refer to these taxonomies are custom taxonomy or company taxonomy. Extension XBRL taxonomies are generally customizations created of some base XBRL taxonomy for someone's specific use. For example, a company that files with a regulator who allows extension may create a company extension taxonomy that extends the base taxonomy created by the regulator.

Note

An XBRL taxonomy that is a base has no real physical difference from a taxonomy that is an extension. In fact, an XBRL taxonomy can be both a base and an extension. For example, an XBRL taxonomy may extend some other XBRL taxonomy, and then someone else can use those two XBRL taxonomies as the base for its extension XBRL taxonomy.

XBRL extensibility has two fundamental facets:

  • Extension: Adding to or altering, through extension, an existing DTS. Extension entails creating a new extending XBRL taxonomy that references (but doesn't directly impact or replace) the original, which is often referred to as the base XBRL taxonomy. The extending XBRL taxonomy adds concepts, resources, relations, or resource/relation networks.

  • Prohibition: Removing by nullifying relations or resources from an existing taxonomy, through extension XBRL taxonomy. The key point is that you're getting rid of something by adding something. Note that you can't prohibit concepts themselves. Prohibiting a relation or resource entails creating one or more new resources or relations in the new extending XBRL taxonomy that voids and nullifies a specific resource or relation in the referenced pre-existing base XBRL taxonomy.

Note

Neither type of extension has any impact on the pre-existing base XBRL taxonomy. Many organizations can concurrently extend the same base XBRL taxonomy in entirely different ways with zero impact on each other or the base XBRL taxonomy. But, extensions can impact the overall DTS.

Understanding extension

Suppose that someone created an XBRL taxonomy that included concepts, resources, and relations. An extension can

  • Add one or more new concepts.

  • Prohibit the use of existing resources, effectively nullifying them.

  • Prohibit the use of existing relations, effectively nullifying them.

  • Add one or more new resources or relations.

  • Add one or more new resource or relation network.

The user who wants to extend some base XBRL taxonomy creates a new XBRL taxonomy, pulls that base XBRL taxonomy into her extension XBRL taxonomy by referencing it, and thus modifies the DTS with the extension and/or prohibition information from the extension XBRL taxonomy she created. So basically what you're doing with either extension or prohibition is adding pieces (taxonomy schema or linkbase) to the set that comprises the DTS, thus modifying the overall DTS.

The exact opposite of an extension is a form. A form is static. The person completing the form can't change a form to meet his needs. (The creator, though, can update the form from year to year to add new things.) If your information is static like a form, the extensibility features of XBRL may not be that useful to you. But other XBRL features, such as the ability to express the semantics (meaning) of the form, might still be useful, such as form computations or other relations. The underlying point here is that forms are static and don't need extension, whereas many types of business information aren't forms; they are dynamic.

Here are two examples of static versus dynamic data:

  • Static: Most tax forms

  • Dynamic: Most financial statements of U.S. public companies

Reasons to extend

The three primary reasons why you may want to create an extension XBRL taxonomy are to

  • Tweak existing information models. If need be, you can totally redefine relations or create your own XBRL taxonomies, which is fine. However, if another XBRL taxonomy exists and it's close to what you need, rather than creating a new XBRL taxonomy, simply extend the existing one to get what you desire. An example is a form that you might like to tweak a little. You like 90 percent of what exists in that form, but you don't like the other 10 percent and want to add another 5 percent, rather than starting from scratch. So instead you simply create an XBRL extension. You're extending the form to create a new, modified form based on another form.

  • Express information your way. Often, organizations even in the same industry use different terminology — for example, different labels for the same concept or different ways to compute values. If need be, maybe you can tweak those models, if the system in which you operate allows it. Or, you may simply want to add labels in a different language than what someone else provided. How you tweaked the base XBRL taxonomy information model is articulated within your extension XBRL taxonomy information model, and those who use your XBRL instance information can see and understand the tweaks you made.

  • View information your way. You can totally reorganize someone's taxonomy and not change the meaning of the information expressed by taxonomy. For example, the US GAAP XBRL taxonomy is a consensus-based taxonomy created by accountants. Analysts have a different view of exactly the same information. Analysts could reorganize portions of the US GAAP XBRL taxonomy or totally reorganize the entire taxonomy if they see fit and not change the meaning of the information model at all.

Note

What is allowed with respect to XBRL taxonomy extension is typically based on the agreed practices of business partners or regulators for the system with which you interact.

One scenario in which extensibility is valuable is in the financial reporting of publically traded companies. Particularly in the United States, even companies in the same industry don't all report similar information in precisely the same way. In other words, financial statements aren't forms that must be filled in; they're more dynamic. Financial statements have a lot in common, but companies have flexibility in reporting their financial information, taking into consideration the unique aspects of their business. Flexibility, in this case, may mean including a concept that no other business uses, adding things up slightly differently, or putting things in one place rather than in another. XBRL was built to handle this flexibility.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset