jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Node name starting with number problem
Date Fri, 01 Dec 2006 12:19:35 GMT
Hi,

On 12/1/06, Jan Ku┼║niak <jan.kuzniak@cognifide.com> wrote:
> I have just encountered new problem: When I start node name with number,
> I get exception from XPathQueryBuilder when performing XPathQuery. Is it
> a bug, or just my assumption that this should work is wrong? Should I
> create a JIRA issue?

It's a feature, not a bug. JCR names are a superset of XML names, and
thus you can have a node name starting with a number even though it
wouldn't be a valid XML element name. Since XPath is based on XML, it
also considers such names invalid. To work around that issue the JCR
spec notes that the XPath queries are interpreted as if they were
executed against the document view XML mapping of the repository.
Thus, you need to use the _xNNNN_ encoding format for any JCR names
that are not valid XML names.

BR,

Jukka Zitting
Mime
View raw message