[PATCH] XML validity of kcfg files

Ingo Klöcker kloecker at kde.org
Sat Oct 30 19:59:33 BST 2004


On Saturday 30 October 2004 19:52, Christian Mueller wrote:
> Am Samstag, 30. Oktober 2004 19:18 schrieb Aaron J. Seigo:
> > On Saturday 30 October 2004 10:38, Thiago Macieira wrote:
> > > Aaron J. Seigo wrote:
> > > >except for the Stringlist -> StringList change, they all seem to
> > > > just be reordering of the tags, e.g. max after default instead
> > > > of before. does re-ording the tags really make any difference?
> > > > sounds to me like the script is reporting a lot of false
> > > > positives?
> > >
> > > The reordering could be mandated by the DTD.
> >
> > yes, but it isn't.
>
> Sorry, but it is:
>
> For example, take this line from the DTD:
>
>  <!ELEMENT entry
> (parameter?,label?,whatsthis?,choices?,code?,default*,min?,max?)>
>
> That means that the subelements must appear in exactly that order
> (if they are present, "?" and "*" allow elements to appear "zero
> times").

Is there a valid reason for making this order mandatory, i.e. does 
changing the order change the semantics? If not, then the DTD is IMO 
too strict.

> Everything else is invalid XML.  What's the point of defining a DTD
> if you're never validating your documents against it?   The
> kconfig_compiler does not seem to care (maybe it should also
> validate?) but still a wrong order is invalid XML.

If kconfig_compiler really doesn't care then the DTD is clearly too 
strict. When I write kcfg files then I really don't want to worry about 
the order of the tags, especially if the only reason for obeying the 
order is an overly strict DTD.

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20041030/9ddd46d3/attachment.sig>


More information about the kde-core-devel mailing list