jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Kuźniak <jan.kuzn...@cognifide.com>
Subject Re: Node name starting with number problem
Date Fri, 01 Dec 2006 12:55:56 GMT
Jukka Zitting napisał(a):
> 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
Thanks a lot, that explains it. However it seems to be a little 
inconsistency. Maybe it would be nice to implement this translation in 
jackrabbit itself?

--
Regards,
 Jan

Mime
View raw message