On 14-05-14 11:49, Thomas Beale wrote: I would recommend a 2 or 3 pass validator. It's tempting to try to do everything in one pass, and it may be more efficient, but it's much harder to get the logic right.
I have a one-phase validator, and because an archetype is strictly hierarchical, it is easy going from the top down to the leafnodes, and at every CAttribute or CObject, validate the constraints. I have no problem with this, except for some things, like the one we are discussing, which I solved by using a recursion-counter, which starts counting as soon an CComplexObject has no attributes in the AOM (then it is wildcarded) But that is an arbitrary-solution. It works, but it gives an unpleasant feeling because, in fact, it is breaking in the logic. So, just for learning. To get rid of that unpleasant feeling, which phases would you distinguish in validating a dataset? -- *This e-mail message is intended exclusively for the addressee(s). Please inform us immediately if you are not the addressee.* -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20140515/767a2680/attachment.html>

