You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Paco Avila <pa...@git.es> on 2006/11/26 17:14:16 UTC

question about XPath

The question is about the "element()" sintax:

If I want to search all nodes which type is "okm:document" the query is:

	//element(*, okm:document)

And if I want to search all nodes which type is "okm:document" and the
node name is "prueba fe.txt":

	//element(prueba&#32;fe.txt, okm:document)

But this throw an error:

	Lexical error at line 1, column 27.  Encountered: "&" (38), after : ""

So, I don't know how can I code the space ' ' in the node name.
-- 
Paco Avila <pa...@git.es>


Re: question about XPath

Posted by Paco Avila <pa...@git.es>.
El lun, 27-11-2006 a las 11:42 +0100, Marcel Reutegger escribió:
> you need to escape the name according to section 6.4.3 'Escaping of Names':
> 
> //element(prueba_x0020_fe.txt, okm:document)
> 
> regards
>   marcel
> 
> btw. this is rather a question for the jackrabbit user list...

Sorry, I always forget the other mailing list :/
-- 
Paco Avila <pa...@git.es>


Re: question about XPath

Posted by Marcel Reutegger <ma...@gmx.net>.
you need to escape the name according to section 6.4.3 'Escaping of Names':

//element(prueba_x0020_fe.txt, okm:document)

regards
  marcel

btw. this is rather a question for the jackrabbit user list...

Paco Avila wrote:
> The question is about the "element()" sintax:
> 
> If I want to search all nodes which type is "okm:document" the query is:
> 
> 	//element(*, okm:document)
> 
> And if I want to search all nodes which type is "okm:document" and the
> node name is "prueba fe.txt":
> 
> 	//element(prueba&#32;fe.txt, okm:document)
> 
> But this throw an error:
> 
> 	Lexical error at line 1, column 27.  Encountered: "&" (38), after : ""
> 
> So, I don't know how can I code the space ' ' in the node name.