I think you are confusing optional value instances , with mandatory definitions of some types being optionally used. This is a definition recursion, so that DV_INTERVAL is defined as being composed by some DV_ORDERED values, but DV_ORDERED is composed by some DV_INTERVAL values, so neither is defined. If neither are defined, you can't optionally use them.
Recursion only stops if you have an alternate possibility that is not recursive , but the definitions of DV_ORDERED and DV_INTERVAL only make sense if the components defined as each other are mandatory and present. To be specific, you would expect that lower and upper values of DV_INTERVAL to be present in order to define "a interval", and DV_ORDERED would be expected to have a mandatory presence of normal_range, and even if it didn't , at least one reference range is present to have it mean anything, and reference range is also defined as having a range value which is also DV_INTERVAL type ( without it, a DV_ORDERED would have a "reference range", which had a single value of "meaning" which is text , without giving a value for "range" , which is meaningless). This is easier to see if you have recently worked through writing a simple calculator program , as through the second chapter of Aho's Compiler , or read the first part of chapter 4 of this book about syntax analysis. You would also recognize that openehr seems almost a pale apparation of a subject taught to all second year computer science undergrads ( but not to poor old Grad Dips, sniff). However, the main contribution of openehr, is that it tries to apply what it recognizes as computer science greatness (but not necessarily understands) , to the mundane but real world problem of electronic health record structure. On Wed, 2006-11-22 at 12:30 +1100, Andrew Patterson wrote: > > It seems obvious they did not run their xml translation > > through a verifier, which should have been easy. > > Syan, computer people have been using mutually > recursive data types for many years. I'm not sure what > the problem is here? You are correct that if the > mutual type reference elements were compulsory, then it > would be impossible to construct a serialized > instance - but the references are all optional and > hence the recursion stops when we have no more > data to fill in... > > attached is an (meaningless) instance that validates against > this xsd using xerces > > Andrew > _______________________________________________ > Gpcg_talk mailing list > [email protected] > http://ozdocit.org/cgi-bin/mailman/listinfo/gpcg_talk _______________________________________________ Gpcg_talk mailing list [email protected] http://ozdocit.org/cgi-bin/mailman/listinfo/gpcg_talk
