Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-591

XPath position function does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.0.1
    • None
    • jackrabbit-core, query
    • None

    Description

      Expression with position function are supported in XPath but does not work.
      All rows are returned when equality operator is used.

      public void testXPathPosition() throws Exception {
      Node foo = testRootNode.addNode("name");
      Node bar = testRootNode.addNode("name");
      testRootNode.save();

      String xpath = "//name[position()=2]";
      Query q = superuser.getWorkspace().getQueryManager().createQuery(xpath, Query.XPATH);
      QueryResult result = q.execute();
      checkResult(result, 1);
      checkResult(result, new Node[]

      {bar}

      );
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            ppakulski Przemyslaw Pakulski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: