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

XPath predicates - cannot contain forward slashes? #3

Open
GoogleCodeExporter opened this issue Mar 25, 2015 · 2 comments
Open

XPath predicates - cannot contain forward slashes? #3

GoogleCodeExporter opened this issue Mar 25, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

For the attached XML, the XPath expression with the following predicate works:
  //link:presentationLink[@xlink:role="funny"]

However, if the predicate contains a string with forward slashes, a syntax 
error occurs:
//link:presentationLink[@xlink:role="www.google.com/testing]

Is there any chance that this might get fixed?

<?xml version="1.0" encoding="UTF-8"?>
<link:linkbase xmlns:link="linking_namespace" xmlns:xlink="xlinking_namespace">
  <link:presentationLink xlink:role="fancy">
    <link:loc xlink:label="part1"/>
    <link:loc xlink:label="part2"/>
    <link:loc xlink:label="part3"/>
  </link:presentationLink>
  <link:presentationLink xlink:role="www.google.com/testing">
    <link:loc xlink:label="part1"/>
    <link:loc xlink:label="part2"/>
    <link:loc xlink:label="part3"/>
  </link:presentationLink>
  <link:presentationLink xlink:role="funny">
    <link:loc xlink:label="part1"/>
    <link:loc xlink:label="part2"/>
    <link:loc xlink:label="part3"/>
  </link:presentationLink>
</link:linkbase>

Original issue reported on code.google.com by [email protected] on 25 Jul 2013 at 10:09

@GoogleCodeExporter
Copy link
Author

> role="www.google.com/testing]


there is no ending quote

Original comment by [email protected] on 9 Dec 2014 at 3:48

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Fails even with the ending quote.

Simpler Test Case XML:

<root><a>hello</a><a r="/e">bye</a></root>

XPath expression

//a[@r="/e"]

Should select the second a element, but instead fails with EXMLXPath: Invalid 
syntax at position 14

Original comment by [email protected] on 19 Mar 2015 at 2:36

  • Added labels: ****
  • Removed labels: ****

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

No branches or pull requests

1 participant