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 09:39:50 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.socal.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3D08CAF0.846AA176@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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 13 Jun 2002 16:39:49 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1023986389 66.75.151.160 (Thu, 13 Jun 2002 09:39:49 PDT) NNTP-Posting-Date: Thu, 13 Jun 2002 09:39:49 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:25886 Date: 2002-06-13T16:39:49+00:00 List-Id: Ted Dennison wrote: > Ewwww. I'd forgotten about that issue. Do we (assming XML use) > actually intend to enforce this bit of nastyness to maintain > theoretical XML compliance, or do we bend the rules to make it a bit > easier to use for people who aren't XML experts? The minute you bend the rules, you might as well throw out the pre-written XML parsers and all the XML tools. The moment you don't escape < in a PCDATA, you're screwed. Georg Bauhaus wrote: > Isn't the goal to get useful information for configuring our software? > Or about maximization of easiness of configuration file parsing? I think the goal is to get a useful configuration facility that allows hand-editing of configuration files by non-programmers without the need for a specialized editor. > Understanding starts at understanding the contents and the structure, > not the syntax. That's essential. No, it starts at the syntax, because if you can't read it, you can't even learn the contents and structure. As proof, consider a configuration file that's a dump of a stream. Lots of structure, all the contents you need, opaque syntax. Take a look and tell me what's in it. > How does one capture dependencies of settings in kv pairs? In documentation, just like you would in XML. If you think XML can show the relationship between keys and values, such that key1+key2+key3 must add up to less than 80, and filename must be of the length that equals key1+key2+key3, then maybe you should teach us how to do that in an XML file that couldn't be done in a text file. Of course, a simple example would suffice. > 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. Gobal config file: value from global config file Local config file: overriding bar value new local baz value 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. Then reconsider, when the "Comment for foo" actually says "bar is a parameter that means blah blah blah", and the "Local comment" says "Darren's local directory". It sounds like by using XML, you're introducing all kinds of ordering dependencies in the file, treating the database as an XML structure rather than something closer to a hashtable, and so you have to decide how to merge two XML files and output a new one with the same semantics. Difficult to do, in the case of comments. -- 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.