The cross reference and inventory features are conveniences provided by the MPEG REL. Using these features greatly reduces the redundancy of a license by assigning identifiers to commonly-used elements and then simply referencing the elements by those identifiers elsewhere in the license.
The cross reference and inventory features can be used with any elements that are license parts (that is, elements that can substitute for the abstract licensePart element). Many common elements are license parts, including principal, right, resource, condition, grant, grantGroup, and forAll.
With cross references, an element that appears in its entirety in one location license can be assigned an identifier. Then, that identifier can simply be referenced elsewhere in the license wherever that same element is needed. The following figure illustrates how cross referencing works at a conceptual level:

As you can see, this license contains two grants, both of which identify Alice as the person to whom rights are granted. In this example, Alice is defined using a keyHolder element, which is an extension of the principal element and represents the principal as the holder of a particular key. The first grant contains this element in its entirety and assigns an identifier to it. The second grant references the earlier keyHolder element by identifier.
To enable assignment and referencing of identifiers, all license parts have two attributes:
|
Assigns an identifier to a license part. |
|
|
licensePartIdRef |
References an assigned identifier. |
In a license, an element can have one of these two attributes, but not both.
The following example illustrates how the principal called Alice is assigned a licensePartId in the first grant in this example license.
The following example illustrates how the keyHolder with the licensePartId of Alice is referenced from within the second grant in this license.
Note that elements that use licensePartIdRef attributes reference an element of the same type. For example, a keyHolder element uses a licensePartIdRef attribute to reference another keyHolder element.
The following example shows how the license whose structure is pictured in the figure above is expressed using the MPEG REL. In this and all following examples, the prefix mx: indicates that the play right is defined in the MPEG REL multimedia extension schema namespace.
When this license is interpreted, the content of the keyHolder that defines the licensePartId "Alice" is placed into the keyHolder element that references this licensePartId.
To make licenses that use cross referencing easier to read, the MPEG REL provides the inventory feature. The inventory element is simply a container for license parts. The inventory element appears at the beginning of a license and provides a convenient place in which to assign identifiers to elements. An element's inclusion within the inventory does not convey any meaning; it is simply a matter of convenience. Using the inventory feature makes it easier for people reading the license to look up referenced elements by grouping the definitions of those elements all in one place. The following figure illustrates how the inventory works at a conceptual level:

In this example, a keyHolder called Alice is defined in the inventory. Then, the two grants in the license simply reference Alice as their principal element. The following example illustrates how the principal called Alice is defined in the inventory.
Once a license part is defined in the inventory, you can use it from any appropriate location in the rest of the license by referencing its identifier. For example, the keyHolder Alice may be referenced anywhere in this license where a principal may appear. The following example license illustrates the license whose structure is pictured in the figure above. In this example, the keyHolder Alice is defined in the inventory and referenced from within two grants.
When a license is interpreted, cross references are resolved before other license processing steps, such as evaluating variables or testing for equality. For example, the following figure illustrate a license that defines a grant in the inventory that uses variable references as its principal and resource.

This license is an offer containing two grants that enable consumers to obtain licenses:
In either case, the principal obtains the same consumer grant, which allows that principal to play an eBook. Since the grant that the principals may obtain is always the same, it is defined in the inventory and referenced in each grant containing the obtain right.
This example uses a variable, Anyone, to represents the principal in all grants.
When a principal obtains a license, this offer is processed as follows:
The following example shows how this offer is represented in the MPEG REL:
Copyright © 2002, 2004 ContentGuard Holdings, Inc. ContentGuard is a registered trademark of ContentGuard Holdings, Inc.