Subject: Re: power management and related concerns
To: Chris Jepeway <firstname.lastname@example.org>
From: Garrett D'Amore <email@example.com>
Date: 07/03/2006 21:51:02
Chris Jepeway wrote:
> On Jul 3, 2006, at 6:31 PM, Garrett D'Amore wrote:
>> A few ways to make editing XML more friendly:
> "From the wild O'Flaherties, O Lord, defend us"...
>> 1) provide a vixml wrapper which takes a DTD and checks for DTD
>> compliance before saving the file. (It would work with a temporary
>> file, and could do file locking ala "vipw")
> And an edxml. And an exxml. And an awkxml. And an emacsxml.
> And a jotxml. And a picoxml. And a sedxml. And a shxml. And
> a cshxml. And...ugh.
Hmph. Don't see sedpw, cshpw, etc.
> Please stay away from XML for system-level configs, particularly
> ones like powerd/sysmon/whosie-whatsis that can take my machine down
> from underneath me. I think XML pretty much rules out quick-n-dirty
> shell-fu saving the day in such cases, and I think that might be bad.
Do we really think that any of these config files are likely to grow to
the complexity _and_ the power where a simple edit by a human can't get
one to a sane state?
And, if necessary, we can provide some simple xml command line editing
tools for use in scripting. Possible example strawmen:
xml -get -d printcap -f /etc/passwd.xml "user=garrett" "gecos"
xml -set -d printcap -f /etc/printcap.xml "queue=lp" "device=/dev/lp0"
I've also written awk and sed code that can manipulate certain bits of
XML. Its not hard to do at all, but it does require a little more
effort and its "hard" if the format is not constrained to some
reasonable subset. But things like password files could easily be
constrained to a simple format that is a proper subset of XML, and then
you _could_ use your shell-fu to hack on them.
I'm not a huge fan of XML, but your objections here sound like FUD much
more than any complaint, and I've not heard any better suggestions for a
file format that can be easily extended or support a variety of uses.
Again, I'm not beholden to XML, but I _abhor_ the idea of creating
another one-off, non-extensible special purpose file format.
> Chris <firstname.lastname@example.org>.
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
Phone: 951 325-2134 Fax: 951 325-2191