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

Add method to get XPath path in primary instance with index predicate only for nodes bound to repeats #472

Open
lognaturel opened this issue Jul 31, 2019 · 0 comments

Comments

@lognaturel
Copy link
Member

lognaturel commented Jul 31, 2019

TreeReference.toString essentially returns an XPath path. However, that path includes index predicates for every node, even if no disambiguation is ever needed.

In the case of the primary instance, index predicates are only ever needed for repeats.

This functionality is probably best provided by FormIndex which represents the position of a node in the primary instance. It has both the raw path of the node and information to know which node in the path corresponds to a repeat.

More context at getodk/collect#3126. https://github.com/opendatakit/collect/pull/3231/files#diff-b25f62214ddaa8161b77f62ab938dcaeR288 is probably the implementation needed, it just needs a good name.

@lognaturel lognaturel self-assigned this Jul 31, 2019
@lognaturel lognaturel removed their assignment Jul 31, 2019
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