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 10:54:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!194.8.194.95!news.netcologne.de!RRZ.Uni-Koeln.DE!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Use of XML for config files Date: Thu, 13 Jun 2002 17:54:02 +0000 (UTC) Organization: GMUGHDU Message-ID: 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> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1023990842 13680 134.91.4.34 (13 Jun 2002 17:54:02 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Thu, 13 Jun 2002 17:54:02 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:25896 Date: 2002-06-13T17:54:02+00:00 List-Id: Darren New wrote: :> Incidentally, comments aren't lost in XML and each comment :> belongs to an element. Namely, the element in which it appears. : : OK, here's the problem with that. Agreed. It wasn't my intention to be an advocate of convention driven comment-thing association. In particular when semantics isn't captured anywhere but in the natural language of the comment, this becomes rather difficult for computer languages, yes. Insertion of commented items will have the potential of destroying essential order and thus sense. Bad Thing. That leaves the ends of lists, right? Of course if information _is_ bound to some item, that could be made explicit. Somewhat like coments in Lisp or python functions. : Gobal config file: : Local config file: : Now, in my API, I add the key "pock" to foo, with the value "A winner!", and : I want to put a comment before it. Please show what that call looks like, : and explain how the library decides to keep the local comments and/or the : global config file comments, when I save the local config file back out. 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? : 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. Are there no ordering implications with two config files and a pook in ; comment kv ... :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. : and so you have to decide how to merge : two XML files and output a new one with the same semantics. Indeed. : Difficult to do, in the case of comments. Independent of whether pairs are stored linearly ordered in INI file format, or in XML, no? -- Georg