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-12 04:25:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.vmunix.org!newsfeed.hanau.net!news-fra1.dfn.de!news-koe1.dfn.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: Wed, 12 Jun 2002 11:25:24 +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> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1023881124 23433 134.91.4.34 (12 Jun 2002 11:25:24 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Wed, 12 Jun 2002 11:25:24 +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:25786 Date: 2002-06-12T11:25:24+00:00 List-Id: Ted Dennison wrote: : What's wrong is: : : 1) It could be *far* smaller than that, if we were parsing a simpler : syntax. far by what amount? value string of some average length the_key:=value string of some average length 2/3. : ... all the time, if *everything* is an item, : and key is the only attribute we ever use? If this is so, well... You mention real time systems, but I wonder whether a configuration for an AWS application will get anything but messy if it has to be configured with key value pairs only. Ada equivalent: put everything in one big package. I don't understand this verbosity and design aversion in an Ada context :-) : I will cost us, in that it will make the file much harder for humans : to read. Depends. (On the design of the (implicit or explicit) DTD. Of course, with XML being for computers, SGML with all its tag omission features etc. being for humans, this is to be expected, at least if there isn't a decent design.) : I'm particuarly thinking of the site maintanence engineers who could use _any_ XML enabled editing tool to write valid configuration files (where valid refers to XML validation). : as its easy to forget an end tag or : transpose a letter somewhere. the idea behind XML is that you don't have to write tags yourself. That would be the province of the XML application (e.g. editor) or of full SGML, where, e.g. an HTML like list can look like
  • bla <>the <>foo
instead of XML's
  • bla
  • the
  • foo
Admittedly, it is _really_ sad that so many XML data floating around make a bad impression by not making use of valuable XML features. Builtin cross referencing, element _types_ with _constraint_ checking, etc. : You really whould have trouble doing that if your only syntax is "=". True, but how does this brevity stop you from making typing errors? How do you check the correctness of the configuration? Where are the namespaces? You would have to search back to the latest section heading or namespace.key=value manespace.kez=valeur -- 3 typos, not easily noted! : if we are getting something back that we can't get out of : a more simple configuration file format. An annotated typed tree is different from a flat anything-list. I think it depends on the application whether a list of a few settings like in environment variables is sufficient or not. Should the decision between very simple Key(i) = value(i) and a grammar driven externally checked configuration be frozen in the API? -- georg