From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a26758eec3c2e1ad X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-13 11:32:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!west.cox.net!cox.net!news-east.rr.com!cyclone.kc.rr.com!news.kc.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3D08E539.343A42BF@san.rr.com> From: Darren New X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Use of XML for config files References: <3CFC5DB2.A21DCF61@cs.tu-berlin.de> <4519e058.0206041129.5b250124@posting.google.com> <4519e058.0206100702.5a4b431a@posting.google.com> <3D0769F7.68F5BD9C@san.rr.com> <4519e058.0206130553.3ee195f1@posting.google.com> <3D08CAF0.846AA176@san.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 13 Jun 2002 18:31:58 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1023993118 66.75.151.160 (Thu, 13 Jun 2002 11:31:58 PDT) NNTP-Posting-Date: Thu, 13 Jun 2002 11:31:58 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:25899 Date: 2002-06-13T18:31:58+00:00 List-Id: Georg Bauhaus wrote: > Uhm, you have named the things to consider for a policy. Have I missed > something? Merging, overriding, combining, how should that appear in > an API independent of any file format? Well, that's the question. I think it's something much easier to answer for INI files than XML files. > : It sounds like by using XML, you're introducing all kinds of ordering > : dependencies in the file, > > No that is introduced by using comments as data and has nothing to > do with XML. Uh, sure it does. The order of tags in XML is quite explicitly important. > :treating the database as an XML structure rather > : than something closer to a hashtable, > > Yes. That is what I would like to see. Something that is different > from but including lookup tables. Well, propose something. :-) > : Difficult to do, in the case of comments. > > Independent of whether pairs are stored linearly ordered in INI file > format, or in XML, no? Difficult to do if you use XML, because XML has a particular semantics for comments. Easy to do for INI because you get to make up yourself what those semantics are. In an INI format, I could say "the comment always attaches to whatever non-comment object comes next." So you'd have # This section is for colors [Colors] # The background color bg=23 # The forground color fg=87 Here, if I used the API to delete "fg" and wrote it back out, it's obvious what happens to the comment. In XML, I could wind up with comments most anywhere, including multiple comments attached to the same object, interspersed with "real" tags, where you'd expect the comment to be about the tag. Unless you're proposing that the above would translate to 23 87 I guess that's not too bad, but it does seem like overkill. And of course, then you wind up with the possibilities of something like round airbrush green I'm just saying that I think the semantics of the kind of thing an INI file would have to deal with in the API are pretty darn straightforward. The kinds of things an XML-based file would have to deal with are far more complicated. XML is tremendous overkill for an INI-like API. I think many people arguing against XML don't understand how it would particularly help an INI-like API. Perhaps offering an idea of the API you're envisioning would help it move forward. -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. ** http://home.san.rr.com/dnew/DNResume.html ** ** http://images.fbrtech.com/dnew/ ** My brain needs a "back" button so I can remember where I left my coffee mug.