6.2.5.3 Path

A PATH property is an ordered list of path elements. A path element is a NAME plus an with optional index. When read, the fully qualified NAMEs within the path are mapped to their current prefix and the result is returned as a string. A path may be absolute or relative. For example, given the namespace mapping

myapp -> http://mycorp.com/myapp

a PATH property value with fully qualified form

/{http://mycorp.com/myapp}document[1]/
{http://mycorp.com/myapp}paragraph[3]

would be returned as the string

/myapp:document/myapp:paragraph[3]

If the namespace were later remapped to

yourapp -> http://mycorp.com/myapp

then the value returned would be the string

/yourapp:document/yourapp:paragraph[3]

Note however, that how the PATH value is stored internally is up to the implementation, as long as dynamic remapping is supported.

A common use for PATH properties is likely to be the storage of paths to other items in the workspace. However the repository does not enforce referential integrity (unlike in the case of REFERENCE properties, see 6.2.5.4 Reference); a PATH property may specify a location where no item exists.

Upon save, a PATH property is validated according to two criteria:

path ::= properpath ['/']


properpath ::= abspath | relpath


abspath ::= '/' relpath


relpath ::= pathelement | relpath '/' pathelement


pathelement ::= name | name '[' number ']' | '..' | '.'


number ::= /* An integer > 0 */


name ::= simplename | prefixedname


simplename ::= onecharsimplename |

twocharsimplename |

threeormorecharname


prefixedname ::= prefix ':' localname


localname ::= onecharlocalname |

twocharlocalname |

threeormorecharname


onecharsimplename ::= (* Any Unicode character except:
'.', '/', ':', '[', ']', '*',
''', '"', '|' or any whitespace

character *)


twocharsimplename ::= '.' onecharsimplename |

onecharsimplename '.' |

onecharsimplename onecharsimplename


onecharlocalname ::= nonspace


twocharlocalname ::= nonspace nonspace


threeormorecharname ::= nonspace string nonspace


prefix ::= (* Any valid XML Name *)


string ::= char | string char


char ::= nonspace | ' '


nonspace ::= (* Any Unicode character except:
'/', ':', '[', ']', '*',
''', '"', '|' or any whitespace

character *)


Note that the method Property.getNode() which resolves a REFERENCE property and returns the referenced node does not work with PATH properties (see 6.2.5.4 Reference). PATH properties may point to properties (not just referenceable nodes) or to nothing at all. In order to use a PATH to retrieve an item, the PATH's value must be retrieved and then used in a regular getItem, getNode or getProperty call.