[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Configuration management, revision 3



On Thursday, July 30, 1998 12:46 PM, Antti-Juhani Kaijanaho 
[SMTP:antkaij@rolle.cc.jyu.fi] wrote:
> On Thu, Jul 30, 1998 at 10:05:53AM +0100, Martin Oldfield wrote:
> > Rather than writing yet another language why don't we just use an
> > existing one ? Whilst it's true that you don't want to force a user to
> > learn say perl just so that he can write his software, it's surely
> > better that he learns the little bit of perl than some other language
> > which he can't use elsewhere ?
>
> In principle I agree.  The problem is that I know no existing
> languages we could use.

How about XML ? It's rather easy to parse, to extend etc. Just define a bunch 
of tags and attributes, and le voila. Done.
It could even be used to automatically generate documentation. The advantage of 
XML is that it's easily embedded in HTML. It has the added advantage that 
instead of non-descript brackets such as in LISP, we have a clue as to what 
opening and closing brackets actually do.

Attributes can be described by specially defined tags, while conditionals can 
be implemented by adding an attribute; this can also be used for multi-language 
configurations, like this:

<CONFIG>
<NAME>MailErrorRecipient</NAME>
<TYPE>Email</TYPE>
<DEFAULT>postmaster@[[FQDN]]</DEFAULT>
</CONFIG>

The bracketsyntax could be used to indicate a program [[program:hostname]] to 
be run for information, or have special keywords for general information 
([[ARCH]]), for example.

A more elaborate example:

<CONFIG>
<NAME>WeatherType</NAME>
<TYPE>Choice</TYPE>
<VALUE>Lots of Thunderstorms</VALUE>
<VALUE>Always Sunny</VALUE>
<VALUE>Lots of Rain</VALUE>
<QUESTION>
<UK> What kind of weather is it outside right now ?</UK>
<NL> Wat voor weer is het buiten ?</NL>
</QUESTION>
<HELP>
<UK> The package needs to know the kind of weather conditions your PC is 
subject to, in order to be able to adequately respond to the likelihood of 
power failures.</UK>
<NL> Dit programma moet weten onder wat voor weersomstandigheden uw PC dient te 
werken, zodat het adequaat kan reageren op stroomuitval. </NL>
</HELP>
</CONFIG>

<CONFIG WeatherType="==:Lots of Rain">
<-- conditional, only asked when WeatherType equals "Lots of Rain">
</CONFIG>

Does this make sense to anyone ? Should I formalize this ?

Ronald van Loon


--  
To UNSUBSCRIBE, email to debian-policy-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: