On 2002.02.18 01:06 Vladimir Dergachev wrote:
> 
> On Sun, 17 Feb 2002, Keith Packard wrote:
> 
> > Around 10 o'clock on Feb 17, Andrew C Aitchison wrote:
> >
> > <moving a discussion from devel to xpert about XML configuration files>
> >
> > > Can I at least ask that changing to an XML format config file
> > > requires a major version increment, to version 5.0 if it happens now
> ?
> >
> > Sure, any change to the configuration file syntax will need to be well
> > advertised and planned far in advance.  A transition strategy will be
> > needed.
> >
> > Having just experienced the real horror of a non-standard configuration
> > file format, I will argue strongly that XML is a better solution than
> any
> > custom configuration file format.  Even for people editing the file
> with
> > emacs.
> >
> > ...
> 
> I am very strongly against XML configuration files.. XML is really rather
> poor for hand editing so it is best written by another program. If you
> are
> going to have another program write the file anyway you can just as well
> use the current syntax, it is no worse.

Most people write XHTML, DocBook XML and other XML DTDs by hand without 
any difficulties.
XML can be a little too verbose, but in a configuration file, that's 
hardly noticed.

> 
> ...
> >
> > It's not that the current syntax is bad, it's just different from
> > everything else, as any custom configuration file sytax is.  Moving to
> XML
> > solves this problem -- the syntax is now regularized so questions about
> > quoting and such won't occur.
> 
> And plenty of other questions will occur.

XML is a widely used standard. It's much more likely that one has seen an 
XML before on its life than an XF86Config file. This mean is easier to 
learn by repetition.

> 
> >
> > Automated tools are another problem; with the current syntax, comments
> > inserted by the user will probably be lost when the file is read and
> > rewritten by an external configuration tool.  This means that you can
> 
> I say that's a poorly written configuration program, I do not see it as
> too hard to retain the comments.
> 

It's poorly written allright, but why spend time reinventing the weel, 
coding data structures for holding the comments, sections, options, 
unknown options, etc.?

> > either edit the file only by hand, or only with a GUI tool.  Libxml
> > preserves comments and formatting so that reading/writing the
> > configuration file won't make it impossible to edit the file in the
> future
> > with a text editor.
> >
> > Finally, using XML means that external tools needn't worry about
> additions
> > to the configuration file syntax or contents -- the file is always
> > parsable, and the configuration tool can simply ignore portions it
> doesn't
> > understand without any question of whether the remaining portions of
> the
> > file will be misunderstood.
> 
> Do you really want a tool that does not understand complete syntax of the
> configuration file (let alone semantics) messing with Xserver
> configuration ?
> 

The are lot of scenarios were one would want that. Why should a tool for 
configurating the desktop size and depth worry about the Z axis mapping of 
the mouse?

> ...
> 
> If there _is_ a need for extending configuration file (despite the fact
> that the trend was to reduce its size and contents) may I humbly suggest
> something line based ? And if you really want to make a monster of it,
> why
> not tie XFree86 into Tcl and make XF86Config a Tcl script ? This would
> allow for a number of fancy things like, for example, autodetecting
> configuration at startup without mess of C code.
> 
>                                  Vladimir Dergachev
> 

Instead of making the XF86config a monster every configuration tool would 
had to be a even bigger monster.. Anyway, due to XML easy syntax there are 
very tiny XML parsers available, so this is not even an issue.

For what is worth, I just want to say that IMHO the advantages of using 
XML heavily outweight its disadvantages.

Regards,

José Fonseca

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to