Subject: Re: proplib changes
To: None <tech-kern@netbsd.org>
From: matthew sporleder <msporleder@gmail.com>
List: tech-kern
Date: 06/26/2007 12:53:53
On 6/26/07, Valeriy E. Ushakov <uwe@stderr.spb.ru> wrote:
> On Tue, Jun 26, 2007 at 09:03:09 -0700, Jason Thorpe wrote:
>
> > comments are just that -- comments.  They are semantically
> > meaningless, and so, while the parser can handle normal XML comments,
> > the comments do not appear in the resulting dictionary.  Since they're
> > not in the dictionary, when the dictionary is once again externalized,
> > there obviously won't be any comments.
> >
> > Not that this matters much -- generally, the keys used in a dictionary
> > should be chosen so as to be descriptive, and nothing is a substitute
> > for good documentation on the schema used by any given application.
>
> Descriptive key names don't help when you want to add a comment as to
> *why* such and such key is set to such and such value.  Like, e.g.:
>
> <!-- Normally 5 is ok, but we use 30 here, b/c otherwise machine hangs -->
> <integer>30</integer>

I'm not sure why this comment would be lost unless you manually
initiated a dump of the running config from the application and
over-wrote the file you used (this one, apparently) to write the
changes in.

If you're using tools to write the changes in and then dump them out,
which is a use-case I can see occurring, I would think that the
persistent files could be kept up-to-date without much problem.
(this, of course, demonstrates one of the strengths of xml as a format
by parsing/editing with things like SAX and/or DOM)