Resolving a Relative Reference to a Part Name

If the URI reference obtained in §A.2 is a URI, it is resolved in the regular way, that is, with no package-specific considerations. Otherwise, if the URI reference is a relative reference, it is resolved (with reference to Arc [3-4] in Figure A–1) as follows:

  1. Percent-encode each open bracket ([) and close bracket (]).

  2. Percent-encode each percent (%) character that is not followed by a hexadecimal notation of an octet value.

  3. Un-percent-encode each percent-encoded unreserved character.

  4. Un-percent-encode each forward slash (/) and back slash (\).

  5. Convert all back slashes to forward slashes.

  6. If present in a segment containing non-dot (“.”) characters, remove trailing dot (“.”) characters from each segment.

  7. Replace each occurrence of multiple consecutive forward slashes (/) with a single forward slash.

  8. If a single trailing forward slash (/) is present, remove that trailing forward slash.

  9. Remove complete segments that consist of three or more dots.

  10. Resolve the relative reference against the base URI of the part holding the Unicode string, as it is defined in §5.2 of RFC 3986. The path component of the resulting absolute URI is the part name.