A syntactically valid path is:
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 *)