[PATCH] XML validity of kcfg files

Benjamin Meyer ben at meyerhome.net
Sat Nov 6 17:33:55 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 03 November 2004 1:19 am, Frans Englich wrote:
> On Wednesday 03 November 2004 02:22, Cornelius Schumacher wrote:
> > On Wednesday 03 November 2004 01:24, Frans Englich wrote:
> > > Anyway, attached is an XML Schema version for the KConfigXT format,
> > > most of it is written but could use some polishing, and tighter
> > > validation can also be done. If someone wants to do anything with it,
> > > or in the future will do fancy stuff, it is here in the archives(I'll
> > > not push it).
> >
> > Looks nice, but it failed to validate korganizer.kcfg for me. After
> > adding a default namespace declaration to the kcfg file xmllint fails
> > with an "Element kcfg content check failed" error. Is this due to the
> > ordering constraints? Is there a better tool for validating XML files
> > against XML schemas?
>
> We can't blame xmllint for barfing, but it sure is lousy at it :) It
> doesn't tell what was wrong, only a line number and the element(I filed a
> bug report on libxml2). It barfed because the kcfg files was better at
> following the format than the Schema :) This is now fixed, and a handful of
> random kcfg files validates(including korganizer.kcfg AFAICT), but it
> surely still has its quirks.

Just to close this thread the report now also uses the schema and has been run 
and all the results are here:

http://www.icefox.net/kde/tests/report.html

For those who wish to convert over simply change your kcfg file to have this:  

<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
      http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >

Now then, patches to fix broken kcfg files are welcome.

- -Benjamin Meyer

- -- 
aka icefox
Public Key: http://www.icefox.net/public_key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBjQsD1rZ3LTw38vIRAkJ8AKCYcfEJV/EKRjxqQa5sS0bAfXRTqACfaG6h
FYfKqcL9upmQT3C8/A/85/g=
=QuOJ
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list