It is good practice to order all the various definitions, for the benefit of human readers. However, the XML standard, to which parsers should conform, requires that data loaded to a DOM from and XML file preserves the parent-child-sibling relationships but not necessarily the order of data in the source XML file (although most parsers seem to preserve order, it should not be relied on).
The ordering is not normally a problem for variableDefs, but it may be problematic for Functions, since they can be inter-dependent. Depending on how many passes through the dataset you are prepared to do while first loading the DOM, it may be necessary to require functions to be defined in an order of increasing inter-dependence. Regards, Dan Newman on 25/11/06 05:34 Giovanni A. Cignoni said the following: > Hi there, > > thank for the new versions of the files. > > Now we are facing another problem regarding the order of definitions > and uses of variables. The reference manual of DAVE-ML states that > "variableDefs should appear in calculation order" (page 9 of v. 1.9b2). > > That "should" is a requirement or just a good practice suggestion? > > In the F16 dml there are two cases of variables used before they are > defined (details by G. Mirri are in the following). > > I suppose that, at this point in the development of DAVE-ML, the true > requirement is that definitions and uses may appear not in order, but an > ordering must be possible: > - writing them in order is just a good practice for the readability of > the XML; > - if an ordering is not possible (there is a cycle) the DAVE-ML is not > valid. > > Is this right? > > Thanks in advance, > Giovanni A. Cignoni. > > > ------------------------------------------------------------------------------- > > > F16_aero.dml Revision: 108 > > - line 372: definition of variable "cl1" refers to variable "clt" in > the calculation block (at line 379), but variable "clt" is not yet > defined > (it will be defined later at line 488); > > - line 395: definition of variable "cn1" refers to variable "cnt" in > the calculation block (at line 402), but variable "cnt" is not yet > defined > (it will be defined later at line 519). > >