Hi Helio,

I've written a small test, but was unable to reproduce your issue:

    public void testQuery() throws RepositoryException {
        Node x = testRootNode.addNode("_pX");
        Node y = x.addNode("Y");
        String uuid;
        while (Character.isLetter(
                (uuid = UUID.randomUUID().toString()).charAt(0))) {
        }
        Node u = y.addNode(uuid);
        u.setProperty("prop", 3);
        testRootNode.save();
        String stmt = "/jcr:root/" + testPath +
                "[_pX/Y/" + ISO9075.encode(uuid) + "/@prop >= 1]";
        System.out.println(stmt);
        executeXPathQuery(stmt, new Node[]{testRootNode});
    }

can you please check again that your query statement is correct?

regards
 marcel

hsp_ wrote:
Hi;
Sorry by put a message in jira, without have sure that was a bug....
Well, my problem remains almost the same.
Like you wrote:
"You need to escape the initial digit of the uuid. Digits are not valid
start characters for XML names.
/jcr:root/A/B//element(*,my:type)[X/Y/_x0033_ca3f395-7ae9-4553-b0d2-401b3bdff3d2/@prop:number
= 1]
...
"
I did it (and don't get it), but in the repository I have a node in this
path: _pX/Y/0033_ca3f395-7ae9-4553-b0d2-401b3bdff3d2;
when I do the following search there is no result (and there is the value 3
in property @prop:number) :
/jcr:root/A/B//element(*,my:type)[_pX/Y/_x0033_ca3f395-7ae9-4553-b0d2-401b3bdff3d2/@prop:number>=1].

Is the path "_pX" invalid eigther in XML???

In other hands, if I do the
search:/jcr:root/A/B//element(*,my:type)[_pX/Y/*/@prop:number>=1];
it returns a result but whatever the value in property @prop:number (long).

So, this way I have in trouble in my use case, both ways to build a
expression has a extrange behavior that I could get your explanation for.
Thanks.
Helio

Reply via email to