-
Notifications
You must be signed in to change notification settings - Fork 2
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
Selecting element using attribute not working #4
Comments
This is quite mysterious. Thank you. Will figure this out! |
Thank you! |
The XPath evaluator was not 'bound' correctly to the XMLDoc. |
Martijn - Thanks for fixing the issue. The previously reported test is working now. However, a more complex expression like the one below doesn't seem to be working correctly against the attached ODM file. It seems like the tool doesn't like mixed-case attribute names. Expression: "/ODM/ClinicalData/SubjectData/StudyEventData[@StudyEventOID='SE_BASELINE']/FormData[@Formoid='F_DEMOGRAPHICS']/ItemGroupData[@ItemGroupOID='IG_DEMOG_GROUP2']/ItemData[@ItemOID='I_DEMOG_DIAGNOSED']/@value" |
Probably something to do with XML parsing. No, it's not. The JSDOM built-in XPath evaluator has this problem: jsdom/jsdom#2530. However, we're not using that one. So this may still be an issue with how the new evaluator overwrites the 'native' one.
|
Any custom ODK and OC functions are no longer working. So it's reverting to the JSDOM xpath evaluator, and not Enketo's. |
|
Trying to do this in a minimal nodeJS environment (without running in a headless browser) is a little trickier than I thought. It's fixed now. Hopefully, that was the last such issue... Thankfully, the fix actually made the app simpler. |
When I try to select an xml element using an attribute, I get a blank string as result.
To reproduce:
Evaluate the expression: "/data/a[@id='1']" against the attached test.xml file.
test.xml.zip
The text was updated successfully, but these errors were encountered: