Part Names

Each part has a name. Part names refer to parts within a package.
example: The part name “/hello/world/doc.xml” contains three segments: “hello”, “world”, and “doc.xml”. The first two segments in the sample represent levels in the logical hierarchy and serve to organize the parts of the package, whereas the third contains actual content. Note that segments are not explicitly represented as folders in the package model, and no directory of folders exists in the package model.

Part Name Syntax

The part name grammar is defined as follows:

part_name = 1*( "/" segment )
segment   = 1*( pchar )

pchar is defined in RFC 3986.

The part name grammar implies the following constraints. The package implementer shall neither create any part that violates these constraints nor retrieve any data from a package as a part if the purported part name violates these constraints.

  • A part name shall not be empty. [M1.1]

  • A part name shall not have empty segments. [M1.3]

  • A part name shall start with a forward slash (“/”) character. [M1.4]

  • A part name shall not have a forward slash as the last character. [M1.5]

  • A segment shall not hold any characters other than pchar characters. [M1.6]

Part segments have the following additional constraints. The package implementer shall neither create any part with a part name comprised of a segment that violates these constraints nor retrieve any data from a package as a part if the purported part name contains a segment that violates these constraints.

  • A segment shall not contain percent-encoded forward slash (“/”), or backward slash (“\”) characters. [M1.7]

  • A segment shall not contain percent-encoded unreserved characters. [M1.8]

  • A segment shall not end with a dot (“.”) character. [M1.9]

  • A segment shall include at least one non-dot character. [M1.10]

example:

Example 8–1. A part name

/a/%D1%86.xml
/xml/item1.xml

Example 8–2. An invalid part name

//xml/.