Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare values in XPath Expression with „<” or „>” does not work #180

Open
rainman110 opened this issue Apr 30, 2021 · 1 comment

Comments

@rainman110
Copy link
Collaborator

TEST_F(TxUtilsTest, test_tixiXpath_by_attribute_relations) {
  TixiDocumentHandle h = -1;
  ASSERT_EQ(SUCCESS, tixiCreateDocument("root", &h));
  ASSERT_EQ(SUCCESS, tixiCreateElement(h, "/root", "child"));
  ASSERT_EQ(SUCCESS, tixiCreateElement(h, "/root", "child"));
  ASSERT_EQ(SUCCESS, tixiCreateElement(h, "/root", "child"));
  ASSERT_EQ(SUCCESS, tixiCreateElement(h, "/root", "child"));
  ASSERT_EQ(SUCCESS, tixiAddTextAttribute(h, "/root/child[1]", "attr", "a"));
  ASSERT_EQ(SUCCESS, tixiAddTextAttribute(h, "/root/child[2]", "attr", "b"));
  ASSERT_EQ(SUCCESS, tixiAddTextAttribute(h, "/root/child[3]", "attr", "c"));
  ASSERT_EQ(SUCCESS, tixiAddTextAttribute(h, "/root/child[4]", "attr", "d"));

  char *xPath;
  // This doesn't work with Tixi 3.1.1
  ASSERT_EQ(SUCCESS,
            tixiXPathExpressionGetXPath(h, "//child[@attr>\"b\"]", 1, &xPath));
}
@ArneBachmannDLR
Copy link

Did you try &gt; instead of >?

Also, are you sure that greater than is defined for arbitrary strings in XPath?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants