jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Fofbidden characters in node names
Date Thu, 22 Mar 2007 18:05:12 GMT
Hi,

On 3/22/07, Julian Reschke <julian.reschke@gmx.de> wrote:
> Paco Avila schrieb:
> > El jue, 22-03-2007 a las 05:58 -0700, Michal Hybler escribió:
> >> Could someone tell me all characters which are forbidden in node names ....
> >> as " : etc.
> >
> > public static String escape(String name) {
>
> Nit: I wouldn't call this method "escape", because it really doesn't
> escape. Better to avoid confusion here :-)

Nit2: It doesn't actually produce valid JCR names in all cases.

The rules for JCR names are essentially:

0) The name must have at least one character

1) The name must only contain valid XML characters, i.e. many control
and other special Unicode characters are excluded (note that JCR 1.0
allows all Unicode characters, but in practice and in JCR 1.0.1 only
XML characters are allowed)

2) The only allowed whitespace character is the space (#20)

3) The name must not start or end with a space

4) The name must not contain any of the following characters: /:[]*'"|

5) The name must not be "." or ".."

BR,

Jukka Zitting
Mime
View raw message