Relative References

A relative reference is expressed so that the address of the referenced part is determined relative to the part containing the reference.

Relative references from a part are interpreted relative to the base URI of that part. By default, the base URI of a part is derived from the name of the part, as defined in §B.3.

If the format designer permits it, parts can contain Unicode strings representing references to other parts. If allowed by the format designer, format producers can create such parts and format consumers shall consume them. [O1.4] In particular, XML markup might contain Unicode strings referencing other parts as values of the xsd:anyURI data type. Format consumers shall convert these Unicode strings to URIs, as defined in Annex A, “Resolving Unicode Strings to Part Names,” before resolving them relative to the base URI of the part containing the Unicode string. [M1.23]

Some types of content provide a way to override the default base URI by specifying a different base in the content.
example: : XML Base or HTML . In the presence of one of these overrides, format consumers shall use the specified base URI instead of the default. [M1.24]
example:

Example 8–3. Part names and relative references

A package includes parts with the following names:

  • /markup/page.xml

  • /images/picture.jpg

  • /images/other_picture.jpg

If /markup/page.xml contains a reference to ../images/picture.jpg, then this reference is interpreted as referring to the part name /images/picture.jpg.