jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peeter Piegaze <peeter.pieg...@gmail.com>
Subject Re: encoding jcr names
Date Wed, 18 May 2005 09:24:24 GMT
On 5/18/05, Roy T. Fielding <fielding@gbiv.com> wrote:
> On May 17, 2005, at 1:04 PM, Brian Moseley wrote:
> > section of the jcr spec (0.16.3) disallows several characters
> > in jcr names. my webdav server needs to be able to support nodes with
> > names containing at least one of these characters ("'"). what's the
> > best strategy for handling this requirement?
> That changed in the final versions of the spec.  IIRC, replace the
> character "'" with "_x0027_" (i.e., underscore x UTF-16-hex underscore).
> That's from memory, but I'm sure Peeter will correct me if I forgot
> something.  The convention is from some obscure XML NAMES standard.

Its not so much that anything changed in this department since 0.16.3.
The syntax of names and paths is the same.

The escaping mechanism Roy mentioned describes how JCR names which are
not valid XML names are mangled upon export to XML.

Brian, in your case you are going from a some webdavish resource name
and trying to produce a valid JCR name. The ugliness of the above
escaping mechanism stems from the limitations of XML. Since JCR names
do not suffer from these limitations your options for converting your
resource name to JCR are more open. Off the top of my head I don't
think URL encoding will conflict with the export to XML...or maybe you
have an example in mind?


View raw message