You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Nicolas Modrzyk <ni...@macnica.com> on 2007/06/28 10:17:33 UTC

xpath question (bug, specs, ask for help)

Hi All,

Say I have the following two queries:
short_query_1 = "//ja/PressRelease/avs222"
short_query_2 = "//ja/PressRelease/2005report1"

The first one returns a result. (or not depending if nodes are  
present ...)

The second throws the followingexception:
  : Encountered "return" at line 1, column 40.
Was expecting one of:
     <IntegerLiteral> ...
     <DecimalLiteral> ...
     <DoubleLiteral> ...

The path containing a name within the path starting with an integer  
is causing troubles. I can reproduce this reliably.

Did I miss something in the XPath specs that said I should have path  
names with the problematic pattern ?
Or is this a bug ? (My side, jackrabbit side, configuration ...)

Thank you in advance for any pointers,

Nicolas,


Re: xpath question (bug, specs, ask for help)

Posted by Christoph Kiehl <ch...@sulu3000.de>.
Jukka Zitting wrote:

>> There are a few topics like that which come up frequently on this 
>> list. I think
>> we should at such items to the FAQ. What do the others think? Jukka?
> 
> Having an up to date FAQ would be great. I've been thinking about
> dropping the badly outdated FAQ on the official Jackrabbit web site
> and just linking to a wiki page where people can more easily add and
> update stuff.

Sounds great! This way everyone can participate.

+1

Cheers,
Christoph


RE: xpath question (bug, specs, ask for help)

Posted by Frédéric Esnault <fe...@legisway.com>.
This would be a great idea, and I would participate.
Clear informations about jackrabbit implementation of xpath, the limitations and so on would be veeery useful ;)

Frédéric Esnault
 
-----Message d'origine-----
De : Jukka Zitting [mailto:jukka.zitting@gmail.com] 
Envoyé : vendredi 29 juin 2007 11:46
À : users@jackrabbit.apache.org
Objet : Re: xpath question (bug, specs, ask for help)

Hi,

On 6/29/07, Christoph Kiehl <ch...@sulu3000.de> wrote:
> Nicolas Modrzyk wrote:
> > As Jan Kuźniak noted last december, it would be really great if this was
> > transparent.
>
> There are a few topics like that which come up frequently on this list. I think
> we should at such items to the FAQ. What do the others think? Jukka?

Having an up to date FAQ would be great. I've been thinking about
dropping the badly outdated FAQ on the official Jackrabbit web site
and just linking to a wiki page where people can more easily add and
update stuff.

BR,

Jukka Zitting

Re: xpath question (bug, specs, ask for help)

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 6/29/07, Christoph Kiehl <ch...@sulu3000.de> wrote:
> Nicolas Modrzyk wrote:
> > As Jan Kuźniak noted last december, it would be really great if this was
> > transparent.
>
> There are a few topics like that which come up frequently on this list. I think
> we should at such items to the FAQ. What do the others think? Jukka?

Having an up to date FAQ would be great. I've been thinking about
dropping the badly outdated FAQ on the official Jackrabbit web site
and just linking to a wiki page where people can more easily add and
update stuff.

BR,

Jukka Zitting

Re: xpath question (bug, specs, ask for help)

Posted by Christoph Kiehl <ch...@sulu3000.de>.
Nicolas Modrzyk wrote:

> As Jan Kuźniak noted last december, it would be really great if this was 
> transparent.

There are a few topics like that which come up frequently on this list. I think 
we should at such items to the FAQ. What do the others think? Jukka?

Cheers,
Christoph


Re: xpath question (bug, specs, ask for help)

Posted by Nicolas Modrzyk <ni...@macnica.com>.
Hi Christoph, and list,

Thank you for your quick reference.

Just as a follow up on this, for other people, a path like:

/ja/2005report1

would really need just the first character of 2005report1 to be  
encoded to be properly searched. So that would give us and xpath  
query like:

//ja/PressRelease/_x0032_005report1

Note also that the hexa decimal needs to be on four digits.

One last note, encoding the whole name in hexa doesn't work. Each  
hexa character would need to be surrounded by the "_x" and "_"  
characters.

So in our example, the xpath would be the following:
//ja/PressRelease/_x0032__x0030_05report1

Hope that this can help someone in the future.

As Jan Kuźniak noted last december, it would be really great if this  
was transparent.

Thanks again,

Nicolas,

On Jun 28, 2007, at 5:23 PM, Christoph Kiehl wrote:

> Nicolas Modrzyk wrote:
>
>> The path containing a name within the path starting with an  
>> integer is causing troubles. I can reproduce this reliably.
>
> See http://www.nabble.com/Re%3A-Node-name-starting-with-number- 
> problem-p7639960.html
>
> BR,
> Christoph


Re: xpath question (bug, specs, ask for help)

Posted by Christoph Kiehl <ch...@sulu3000.de>.
Nicolas Modrzyk wrote:

> The path containing a name within the path starting with an integer is 
> causing troubles. I can reproduce this reliably.

See http://www.nabble.com/Re%3A-Node-name-starting-with-number-problem-p7639960.html

BR,
Christoph