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:16:23 GMT
Hi,

On 3/22/07, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> 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:

Nit3: The given rules are actually for JCR local names, that can be
prefixed with a valid XML prefix with a colon as the separator.

The JCR name parser class in [1] can validate a string as a JCR name
with just a single pass over all the characters in the string. Note
that this name parser still implements the original JCR 1.0 rule that
names consist of any Unicode characters instead of just the valid XML
character subset.

BR,

Jukka Zitting

[1] http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/name/ParsingNameResolver.java
Mime
View raw message