jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Vanberg <b...@soundstrue.com>
Subject Re: Apostrophe in path generates error
Date Mon, 23 Feb 2009 22:30:30 GMT
Yes. This is an invalid character for a JCR path. I have seen this
documented in the JCR spec (jsr170-1.0.pdf).

Quote, Section 6.2.5.2 Name:
 
nonspace ::= (* Any Unicode character except: '/', ':', '[', ']', '*', ''',
'"', '|' or any whitespace
character *)

So basically an ' is an invalid character for a path along with /:[]*"|. I
used a regex to strip these from our path names.

Ben.

On 2/23/09 3:24 PM, "Chris" <shef31@yahoo.com> wrote:

> When I call session.getItem(path) and the path has an apostrophe in a
> filename, it generates a "javax.jcr.RepositoryException: invalid path:"
> error.
> 
> Does anyone know why?
> 
> Do I need to escape apostrophes? What other characters need to be
> escaped? Is this documented anywhere?
> 


Mime
View raw message