DocumentID: ECMA-376/Part2/8.3.3
Title: ECMA-376, Part2: 8.3.3 Relationship Markup
Extracted-From: ECMA-376 Office Open XML File Formats, 1st Edition / December 2006
Warning: Coverted to HTML format by a script known to have bugs

Navigation:

8.3.3 Relationship Markup

Relationships are represented using Relationship elements nested in a single Relationships element. These elements are defined in the Relationships namespace, as specified in Annex F, "Standard Namespaces and Content Types". The schema for relationships is described in Annex D, "Schemas - XML Schema".

The package implementer shall require that every Relationship element has an Id attribute, the value of which is unique within the Relationships part, and that the Id type is xsd:ID, the value of which conforms to the naming restrictions for xsd:ID as described in the W3C Recommendation "XML Schema Part 2: Datatypes." [M1.26]

The nature of a Relationship element is identified by the Type attribute. Relationship Type is defined in the same way that namespaces are defined for XML namespaces. By using types patterned after the Internet domain-name space, non-coordinating parties can safely create non-conflicting relationship types.

Relationship types can be compared to determine whether two Relationship elements are of the same type. This comparison is conducted in the same way as when comparing URIs that identify XML namespaces: the two URIs are treated as strings and considered identical if and only if the strings have the same sequence of characters. The comparison is case-sensitive and no escaping is done or undone.

The Target attribute of the Relationship element holds a URI that points to a target resource. Where the URI is expressed as a relative reference, it is resolved against the base URI of the Relationships source part. The xml:base attribute shall not be used to specify a base URI for relationship XML content.

8.3.3.1 Relationships Element

The structure of a Relationships element is shown in the following diagram:

diagram

image8

annotation

The root element of the Relationships part.

8.3.3.2 Relationship Element

The structure of a Relationship element is shown in the following diagram:

diagram

image9

attributes

Name

Type

Use

Default

Fixed

Annotation

TargetMode

ST_TargetMode

optional

The package implementer might allow a TargetMode to be provided by a producer. [O1.5]

The TargetMode indicates whether or not the target describes a resource inside the package or outside the package. The valid values are "Internal" and "External".

The default value is Internal. When set to Internal, the Target attribute shall be a relative reference and that reference is interpreted relative to the "parent" part. For package relationships, the package implementer shall resolve relative references in the Target attribute against the pack URI that identifies the entire package resource. [M1.29] For more information, see Annex B, "Pack URI."

When set to External, the Target attribute may be a relative reference or a URI. If the Target attribute is a relative reference, then that reference is interpreted relative to the location of the package.

Target

xsd:anyURI

required

The package implementer shall require the Target attribute to be a URI reference pointing to a target resource. The URI reference shall be a URI or a relative reference. [M1.28]

Target attribute values are dependent on the TargetMode attribute value.

Type

xsd:anyURI

required

The package implementer shall require the Type attribute to be a URI that defines the role of the relationship and the format designer shall specify such a Type. [M1.27]

Id

xsd:ID

required

The package implementer shall require a valid XML identifier. [M1.26] The Id type is xsd:ID and it shall conform to the naming restrictions for xsd:ID as specified in the W3C Recommendation "XML Schema Part 2: Datatypes." The value of the Id attribute shall be unique within the Relationships part.

annotation

Represents a single relationship.

A format designer might allow fragment identifiers in the value of the Target attribute of the Relationship element. [O1.6] If a fragment identifier is allowed in the Target attribute of the Relationship element, a package implementer shall not resolve the URI to a scope less than an entire part. [M1.32]


Converted to HTML format by ooxmlspec2html 0.1, a Perl script provided by OpenISO.org.