6.2.5.2 Name

A NAME is a pairing of a namespace and a local name. It must be handled internally in such a way that when read through the API the namespace is mapped to the current prefix. For example, if at the time of reading the current prefix to URI mapping is:

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

then a NAME with fully qualified form

{http://mycorp.com/myapp}myItem

would be returned as the string:

myapp:myItem

If the namespace were later remapped to

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

then the value returned would be the string

yourapp:myItem

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

NAME properties are used for recording values such as node type names (see 6.7.5 Special Properties jcr:primaryType and jcr:mixinTypes) that must respect namespace mappings.

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

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 *)