Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 2396 invoked by uid 6000); 12 Oct 1999 20:03:42 -0000 Received: (qmail 2338 invoked from network); 12 Oct 1999 20:03:35 -0000 Received: from eastwood.aldigital.algroup.co.uk (194.128.162.193) by taz.hyperreal.org with SMTP; 12 Oct 1999 20:03:35 -0000 Received: from freeby.ben.algroup.co.uk (freeby.ben.algroup.co.uk [193.133.15.6]) by eastwood.aldigital.algroup.co.uk (8.8.8/8.6.12) with ESMTP id UAA11405; Tue, 12 Oct 1999 20:01:39 GMT Received: from algroup.co.uk (naughty.ben.algroup.co.uk [193.133.15.107]) by freeby.ben.algroup.co.uk (8.6.12/8.6.12) with ESMTP id VAA04944; Tue, 12 Oct 1999 21:02:03 +0100 Message-ID: <380393A3.BB34025E@algroup.co.uk> Date: Tue, 12 Oct 1999 21:01:39 +0100 From: Ben Laurie Organization: A.L. Group plc X-Mailer: Mozilla 4.7 [en] (WinNT; I) MIME-Version: 1.0 To: new-httpd@apache.org CC: Tomcat Development Subject: Re: XML configuration revisited References: <3801D8DD.F6C88C1C@db.com> <3801EA44.C7F97663@algroup.co.uk> <005901bf1416$a7558920$1609fea9@paris> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org James Davidson wrote: > > > The major issue I see is that Apache's configuration is extensible, but > > DTDs are not (at least, as far as I understand them). So, some kind of > > XDTD (to coin an acronym) is needed. I believe such things do exist, but > > I don't know much about them. However, the fact that they are plural > > worries me :-) > > XML is extensible even if the DTD can be rigid. For example, in Ant (a > little build tool that we are using over in Tomcat land), the first two > levels of the config file are set, but the next level down is dynamically > mapped to wherever it needs to go.. Let me give an example: > > The build.xml file is structured like: > > > > <[taskname] [taskattribute=value]/> > > > > The taskname is resolved to a class, and instance of that class is created > and the attributes of the task are reflected into that class via beans > setter methods to configure it. > > This lets us do the following: > > > > > > > > > So at runtime, I've created extensibility on the fly using this. In ant, the > definition of what the task tags can look like is driven by a set of > defaults and added to by in xml taskdefs -- in some other application such > as configuration -- the configuration could be read in a central location > and only the various components interested in particular parts of the config > file need ask for what they want. > > I'm sure that people who think that everything should have a DTD are going > to choke over this approach, but it gives Ant amazing on the fly flexibility > to deal with things, lets people writing the config files use a well defined > easy to read common syntax, and lets the progam itself use standard XML > libraries to do business. I kinda like the approach but ... a) How do you use it if you aren't writing Java? b) Where does it tell me about att1/att2 in the example above? Cheers, Ben. -- http://www.apache-ssl.org/ben.html "My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there." - Indira Gandhi