From: Zach Forrest <diatribe@shaw.ca>
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] USE database?
Date: Thu, 06 Dec 2001 14:33:21 -0800 [thread overview]
Message-ID: <3C0FF231.3020308@shaw.ca> (raw)
In-Reply-To: 1007671131.3031.8.camel@zoidberg
>
> The problem is that writing things in XML will be even harder than the
> pretty clean syntax you proposed.
>
Maybe a little more laborious, but not really that hard. Take this for
example:
use_var={"name":"esd",
"description":"Enable enlightenment sound daemon support.",
"priority":"OPTIONAL",
"depends":"media-sound/esound"}
To write this in XML it would look like this:
<usedatabase>
<useflag name=esd>
<description>Enable enlightenment sound daemon support</description>
<priority>OPTIONAL</priority>
<depends>media-sound/esound</depends>
</useflag>
</usedatabase>
(OK, not quite as _pretty_, but I've seen worse. The syntax, though, is
clean.)
Also, I don't think it would be too painful because it's not like
someone would have to spend all day editing/adding entries. It would be
pretty easy to write a script to prompt for the name/desc/etc. and
generate the XML.
Benefits of using XML also include:
- Rules, such as declaring "priority" flags, can be created in and
enforced by a schema.
- Validation in general.
- Consistent formatting would also be easy with XML.
- Flexibility.
(Not to sound like a commercial.)
Mikael Hallendal wrote:
> tor 2001-12-06 klockan 19.12 skrev Zach Forrest:
>
>>Before using python as an example, I had actually played with the idea
>>of using XML. Any thoughts on this? I know that compared to a plain text
>>file both of these notions seem somewhat cumbersome, but there are a
>>couple of arguments for using a more structured approach. One,
>>programatically handling the data is easier. Using either python or XML
>>(and a parser) allows named access rather positional access to the
>>fields. It also makes the definition of "records" more clear and easier
>>to understand for new developers (i.e. me). It wouldn't be too difficult
>>to parse XML (even into a dictionary).
>>
>
> Yes, I thought about using XML too, as you say, for parsing the file
> it'll be better since we don't narrow it down to python. Any language
> that can parse XML (most) can be used for tools and such.
>
> The problem is that writing things in XML will be even harder than the
> pretty clean syntax you proposed.
>
>>As far as GConf is concerned, I think that the base system should have
>>as few dependencies as possible. Python is already required, and, in my
>>opinion, with its XML capabilities (or just using dictionaries) I
>>believe a solution along these lines would be preferable.
>>
>
> Yes, GConf is IMHO not an option today, perhaps in the future when it:
> 1) is more stable/tested for these kind of things.
> 2) has nice tools for editing the contents.
>
> Regards,
> Mikael Hallendal
>
>
next prev parent reply other threads:[~2001-12-06 22:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-03 1:06 [gentoo-dev] USE database? Zach Forrest
2001-12-03 7:41 ` AW: " Sebastian Werner
2001-12-03 9:13 ` Geert Bevin
2001-12-03 10:02 ` AW: " Sebastian Werner
2001-12-03 10:12 ` Geert Bevin
2001-12-03 11:05 ` AW: " Sebastian Werner
2001-12-03 11:05 ` Geert Bevin
2001-12-03 11:26 ` AW: " Sebastian Werner
2001-12-03 11:32 ` [gentoo-dev] New ideas, USE database, sandbox & more Vitaly Kushneriuk
2001-12-03 11:48 ` Geert Bevin
2001-12-03 12:55 ` Vitaly Kushneriuk
2001-12-03 14:01 ` Joshua Pierre
2001-12-03 16:06 ` Vitaly Kushneriuk
2001-12-03 16:28 ` Daniel Robbins
2001-12-03 18:00 ` Vitaly Kushneriuk
2001-12-03 16:48 ` [gentoo-dev] USE database? Daniel Robbins
2001-12-06 6:01 ` Mikael Hallendal
2001-12-06 18:12 ` Zach Forrest
2001-12-06 20:38 ` Mikael Hallendal
2001-12-06 22:33 ` Zach Forrest [this message]
2001-12-06 23:40 ` Daniel Robbins
2001-12-06 23:52 ` Zach Forrest
2001-12-07 19:28 ` Sebastian Werner
2001-12-07 21:39 ` Daniel Robbins
2001-12-07 21:43 ` Geert Bevin
2001-12-08 1:44 ` Mikael Hallendal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C0FF231.3020308@shaw.ca \
--to=diatribe@shaw.ca \
--cc=gentoo-dev@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox