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-14 10:03:50 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.vmunix.org!newsfeed01.sul.t-online.de!t-online.de!eusc.inter.net!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Use of XML for config files Date: Fri, 14 Jun 2002 17:03:49 +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> <3D08E539.343A42BF@san.rr.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1024074229 25859 134.91.4.34 (14 Jun 2002 17:03:49 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Fri, 14 Jun 2002 17:03:49 +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:25959 Date: 2002-06-14T17:03:49+00:00 List-Id: Darren New wrote: : the order of tags in XML is quite explicitly important. Unless the DTD says it doesn't matter (in repeated alternatives). (Otherwise it would be impossible to have mixed content, like for example emphasized text before or after a code sample in an HTML paragraph). SGML is more convenient in this respect, since it has not only comma and bar for sequence and alternative, but also ampersand (and) for "all in any order" in content models. : Difficult to do if you use XML, because XML has a particular semantics for : comments. None that I know of. You can put pretty much anything in a comment other than --. : "the comment always attaches to : whatever non-comment object comes next." Why shouldn't that be possible with XML? parent / / \ \ child1 comment2a comment2b child2 ... : [...] : I guess that's not too bad, but it does seem like overkill. XML _is_ verbose, and I've come to like some verbosity :-) : XML is tremendous overkill for an INI-like API. It sure is. But... : I think many : people arguing against XML don't understand how it would particularly help : an INI-like API. This isn't what I would want it to do, it should (if necessary) help overcome the limitations of sectioned key-value settings. : Perhaps offering an idea of the API you're envisioning : would help it move forward. Suppose an INI-like API would cover sections and key-value settings in a section, using any syntax. Then in your example you might have [tools] brush=round airbrush green ... (Maybe you would do it differently?) This leaves some room for parsing, in that you would have to specify 1st is shape, 2nd is type, 3rd is color. whereas ... makes this unnecessary. Much like named parameters in Ada. In addition, as you can see in the example, I am thinking of an application which (perhaps unlike other applications) might profit from tags that do not just mimic INI-style "key" and "value". This makes the configuration look like application specific, but why not? The software for fiddling with the configuration data doesn't have to be, except for the necessary parameterizations of subprograms, say (for example if you want the attribute list of the current tool, which is a String = Name_Of(Brush)). Of course, building the software for access paths in configuration trees might not look as straightforward if all the XML handling has to be invented. But a lot of effort has already gone into building XML software, we only need to reuse it :-) I like TED's idea of child packages, but have to think about this some more.