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

Explore replacing custom XPath engine with off-the-shelf library #17

Open
lognaturel opened this issue Mar 17, 2017 · 3 comments
Open

Comments

@lognaturel
Copy link
Member

Software versions

JavaRosa v2016-04-21

Problem description

getodk/xforms-spec#96 and getodk/xforms-spec#95 have been exploring including a more standard and complete XPath API in the ODK XForms spec (XQuery is a superset of XPath). There are some practical considerations to take into account -- for example, browsers support XPath 1.0 natively so sticking to XPath 1.0 makes it much easier to have browser-based implementations like Enketo.

JavaRosa currently implements its own XPath engine with lovely comments such as /* if you try to edit this code, you will likely break it */. There are several XPath engine implementations with Saxon appearing to be the most actively developed.

It would be good to understand

  • why an off-the-shelf library wasn't used in the first place
  • how invasive a change to a standard library would be
  • whether it's possible to do a replacement in a way that won't break existing forms
@yanokwa
Copy link
Member

yanokwa commented Mar 17, 2017

@ctsims @mrgriscom Bit of an archaeological question for you. Any idea why an off-the-shelf XPath library wasn't used in JR?

@ctsims
Copy link
Contributor

ctsims commented Mar 20, 2017 via email

@dcbriccetti
Copy link
Contributor

“Saxon-HE (home edition) ... provides implementations of ... XPath (2.0, 3.0, and 3.1)....”

Does the XPath library we use need to support XPath 1.0?

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

4 participants