getodk/validate

Matching nodes bug

getodk-bot opened this issue · 0 comments

Issue by mitchellsundt
Thursday Jul 09, 2015 at 19:03 GMT
Originally opened as getodk/getodk#692 (0 comment(s))


Originally reported on Google Code with ID 691

If you have instance like so..

<instance>
        <data id="no_matching_modes">
          <Interviewer/>
          <District/>
          <Cluster/>
        </data>
</instance>

And some binds like so...

      <bind nodeset="/cluster/Date" required="true()" type="date"/>
      <bind nodeset="/cluster/Interviewer" required="true()" type="string"/>
      <bind nodeset="/cluster/District" required="true()" type="string"/>

Currently, Validate (or Collect) do not throw up any errors. It is only at runtime
that you know something is wrong -- Collect crashes.

See the problem? There is no /cluster in the instance, only /data. The binds are referring
to nodes that don't exist. I believe earlier versions of Validate caught this matching
nodes problem.

Reported by yanokwa@nafundi.com on 2012-09-26 17:07:31


- _Attachment: [Matching nodes bug.xml](https://storage.googleapis.com/google-code-attachments/opendatakit/issue-691/comment-0/Matching nodes bug.xml)_