Requirements and pre-analysis for a cross desktop configuration infrastructure
Joerg Barfurth
jub at sun.com
Mon Mar 21 23:29:49 EET 2005
Hi,
Avery Pennarun wrote:
> I agree that an .ini-style file isn't perfect for this. XML wouldn't be
> much good either. What you really want is a file designed specifically for
> version control; the best way would be something like this:
>
> /full/path/to/key = value
>
If raw key-value pairs are all there is to it. I think we need
additional meta data for keys, values and cascaded layers. For this
purpose a format like XML that supports annotating elements with
attributes is superior. When you try to represent this enriched data in
a simple key value format, you end up with something that is no less
complex than real XML and lacks several of its benefits and
understandability.
> Where each key is entirely self-contained on one line, and all keys are (at
> least when the file is auto-generated) sorted alphabetically. That way
> CVS/etc will have no trouble doing merges between versions.
>
If you normalize the formatting, then XML can be maintained perfectly
well in cvs. And of course a more modern RCS should really support XML
directly.
> <record mode="broken">UniConf can already save/load your gconf and other
> settings in a format like this.</record>
>
You can create a tool that can do this rather easily for any sane
configuration API.
Ciao, Joerg
More information about the xdg
mailing list