[PATCH] XML validity of kcfg files

Zack Rusin zack at kde.org
Sun Oct 31 15:40:40 GMT 2004

On Sunday 31 October 2004 02:52, Christian Mueller wrote:
> Am Samstag, 30. Oktober 2004 23:59 schrieb Zack Rusin:
> > Question: why? What's the point of doing that?
> For example because validating the output of kcfgcreator can help you
> find bugs in the program?   I just tried the CVS HEAD version of
> kcfgcreator, and it doesn't seem to save the parameter's name
> attribute I entered (which is required in the DTD and thus reported
> as an error by xmllint). The parameter section doesn't appear
> in the correct place either (according to the DTD).
> If that is to be considered a bug is still to be decided.
> It's invalid XML though.

Yeah... Well, when I said "lets finish means of creating them" I did 
mean, fixing bugs in it and not taking revealing pictures on a sunny 
beach of it ;)

> > How many people validate
> > Qt ui files? Instead of spending time on doing that, lets improve
> > kcfgcreator and get people to use that application to create xml
> > files.
> I'm not an experienced Qt/KDE developer and have yet to see ui files
> first-hand so that may not count much, but my feeling is that they
> should be validated at some point in the tool chain, with informative
> error output.

I don't see the point... At all... Do you use pclint to validate all the 
C++ files that are in CVS? Unless you start doing that, then making 
other source files reside in CVS on special rules is silly. kcfg files 
are just source files. I really don't get the whole discussion. I mean 
checking the validitiy of the kconfig xt files is really very simply:
- compile the app 
   -> it compiles - the file format is correct as far as we're 
   -> it doesn't compile - the file format is not correct as far as 
we're concerned.
And there it is validated.

> Sure, kcfgcreator should be fixed before the old results are.
> But people *are* going to hand-edit those files.

How many people besides Ian and me have you ever seen editting Qt ui 
files by hand? And really non-compilation of an app is a rather good 
indication of the ui file non-conforming to the syntax.

> In the kcfg files that I've seen up to now there were
> missing type attributes, wrong type attributes and
> double appearances of <kcfgfile> tags.  This doesn't
> seem to produce errors in kconfig_compiler, but it
> may lead to strange behaviour (or confusion, if the developer
> happens to hand-edit the wrong one of those two <kcfgfile> tags
> and his change is ignored.  I'm speculating here, of course...).
> What about

Let me put it this way: I don't care. I'm not going to spent even a 
second on this. If you feel that validating XML is worthy of your time, 
knock yourself out. But if you're validating I'd suggest using pclint 
over all files in the CVS, this way you could actually fix a bug.


Stress is when you wake up screaming and you realize you haven't
fallen asleep yet. 

More information about the kde-core-devel mailing list