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-10 08:52:38 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: <3D04CB5F.D3E00A2@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: <3D040402.96CCD66@san.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 10 Jun 2002 15:52:37 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1023724357 66.75.151.160 (Mon, 10 Jun 2002 08:52:37 PDT) NNTP-Posting-Date: Mon, 10 Jun 2002 08:52:37 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:25682 Date: 2002-06-10T15:52:37+00:00 List-Id: Stephen Leake wrote: > > Darren New writes: > > > Stephen Leake wrote: > > > I am an XML beginner. I gather the value style is > > > more amenable to definition via DTD or schema? What other virtues does > > > it have? > > > > On the other hand, it says less. So you cannot, for example, say "the foo > > package must configure a bar and a baz." You could do that if the format was > > > > My stuff > > Your stuff > > > > Do you mean "in the DTD, you cannot say .."? Are you implying that > each app should have its own DTD? I guess that makes sense. I'm saying that if each app has its own DTD, that DTD can say that a foo includes a bar and a baz. If the style of value is used, then the DTD for all config files will be the same. In the former case, you get extra checking, extra specification, and more readable config files, at the expense of having different DTDs for each config file. In the latter case, you have the advantage of having a fixed number of keys to look at, but the application has more work to do to check the correctness. In the former case, you could also have things like My Work.doc Nancy.jpg http://www.adapower.com Altho you could probably do that with the syntax, it wouldn't be nearly as clear, I expect. INI files, of course, use recent.1, recent.2, recent.3 and so on. > In this case, I'm guessing that we could have one DTD for all config > files. But you are right, it would not say much, so maybe that is not > useful. Right. It's basically the same as a INI file, semantically speaking. That is, all the checking that everything needed is there the right number of times is left up to the application, rather than the config file definition. -- 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.