On Wed, 2008-10-15 at 22:08 +0000, Scott Lawrence wrote: > On Wed, 2008-10-15 at 17:49 -0400, Dale Worley wrote: > > On Wed, 2008-10-15 at 21:30 +0000, Scott Lawrence wrote: > > > > Change <sequence> to <all> so configuration items can appear in any > > > > order. > > > > > > Why not make the generator match the schema rather than make the schema > > > looser? > > > > Because people will go insane if they have to hand-edit the config file, > > or hand-edit the generator, which they inevitably will. > > I'm extremely skeptical of justifications based on developer convenience > - and let's be clear: no one but developers should ever need to > hand-edit these files. > > If the software is not order-dependent, that's fine, but in many ways > it's harder to write it that way and ensure correctness.
Of course, this is a situation with a large number of configuration values, they have no intrinsic ordering, and all of them are optional. Three bits of code have to be kept consistent: the code that generates the XML, the schema, and the code that reads the XML. That's hard to do if there are ten or more elements and we require them to appear in a particular order. And of course, we will be changing the set of values over time. The alternative is to make the order flexible. This doesn't put much burden on the consumer, as all XML DOMs provide accessors for "the XYZ child of this node". Where it really saves trouble is that the generator can't output the values out-of-order. IIRC, in the present instance, the .vm file didn't match the schema in some cases -- an error which is hard to catch by eye. Dale _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
