Relationship Element

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

diagram

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]