-
Notifications
You must be signed in to change notification settings - Fork 106
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
bind
calculates do not work for nodesets with prefixed nodes for cached FormDef
#695
Comments
We need to more things before looking at a fix:
|
It looked a bit strange to me but I think it's just because I can't quickly find a part of the spec that explains namespaces in queries but https://www.ibm.com/support/pages/how-use-xpath-namespaces-rit shows related examples. |
These docs seem to suggest to me that our current thinking is incorrect and that XPath does not support paths with namespaces:
This would suggest to me that the |
It looks like the article linked by @lognaturel is misleading. This article shows an example of XPath queries with prefixes: https://learn.microsoft.com/en-us/dotnet/standard/data/xml/xpath-queries-and-namespaces. |
Software versions
JavaRosa v4.0.0-SNAPSHOT
Problem description
Form entry when using a "cached" (serialized then deserialized)
FormDef
won't result in calculates being populated if their target nodeset contains a node with a prefix (like/data/namespace:field
).Steps to reproduce the problem
Using the below form...
XFormParser
FormDef
usingwriteExternal
/readExternal
FormDef
for form entry (withFormEntryController
), filling out the single question with an answer and then finalizing and serializing the instance (withfinalizeForm
andXFormSerializingVisitor
)The serialized instance will contain
<example:calculate />
rather than<example:calculate>...</example:calculate>
with your answer. The calculate node is correctly populated when using aFormDef
that comes from the parser directly.Expected behavior
The node should be populated for a deserialized
FormDef
.Other information
Discovered using Collect, so there is some risk that the bug might actually be there. My understanding is that calculates are handled in JavaRosa. It would be good to write a failing test to confirm the problem in JavaRosa.
The text was updated successfully, but these errors were encountered: