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

Allow an XPath expression to contain a placeholder #1

Open
sylvainhalle opened this issue Aug 12, 2016 · 1 comment
Open

Allow an XPath expression to contain a placeholder #1

sylvainhalle opened this issue Aug 12, 2016 · 1 comment

Comments

@sylvainhalle
Copy link
Contributor

...such as /blah[foo=$x]. Here $x is a placeholder. When evaluating an expression on a document, one could pass an (optional) argument (a Map<String,Object>), and occurrences of placeholders could be dynamically replaced by what the map says.

This would help in BeepBeep 3, where currently occurrences of variables are evaluated by performing a string replacement, and then parsing the resulting string into an XPath expression, every time.

@sylvainhalle
Copy link
Contributor Author

BeepBeep currently supports this, but in an inelegant way (find/replace on the query string before it is parsed).

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