Partial (relative) form

Within a object whose URL is well defined, the URI of another object may be given in abbreviated form, where parts of the two URIs are the same. This allows objects within a group to refer to each other without requiring the space for a complete reference, and it incidentally allows the group of objects to be moved without changing any references. This is not discussed in detail here, it is only mentioned so that the characters required by the technique be reserved for that purpose. It must be emphasised that when a reference is passed in anything other than a well controlled context, the full form must always be used.

In the World-Wide Web applications, the context URI of the document or object containing a reference. In this case partial URIs can be generated by virtual objects and stored in real objects, without the need for dramatic change if the higher-order parts of a hierarchical naming system are modified. Apart from terseness, this gives greater robustness to practical systems, by enabling information hiding between system components.

The partial form relies on a property of the URI syntax that certain characters ("/") and certain path elements ("..", ".") have a significance reserved for representing a hierarchical space, and must be recognised as such by both clients and servers.

A partial form can be distinguished from a full form in that a full form must have a colon and that colon must occur before any slash characters. Systems not requiring partial forms should not use any unencoded slashes in their naming schemes.

The rules for the use of a partial name relative to the URI of the context are:

Note: If a path of the context locator ends in slash, partial URIs will be treated differently to their treatment with respect to the same path without a slash. The trailing slash indicates a void segment of the path.

Examples

IIn the context of URI
			magic://a/b/c//d/e/f

the partial URIs would expand as follows:
g
magic://a/b/c//d/e/g
/g
magic://a/g
//g
magic://g
../g
magic://a/b/c//d/g
g:a
g:a
In the context of the URI
			magic://a/b/c//d/e/

the resutls would be exactly the same.