[PATCH] XML validity of kcfg files

Benjamin Meyer ben at meyerhome.net
Sat Nov 20 17:31:09 GMT 2004


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

On Saturday 20 November 2004 9:04 am, Frans Englich wrote:
> On Saturday 20 November 2004 01:15, Benjamin Meyer wrote:
> > 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:
>
> <snip>
>
> > So what is the proper way to validate the xml files?
>
> These lines:
>
>       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"
>
> says "the prefix xsi refers to the XML application XMLSchema-instance" by
> identifying it with the 'http://www.w3.org/2001/XMLSchema-instance'
> namespace, and then it binds a WXS(W3C XML Schema) to that namespace with
> schemaLocation, such that the validator can figure out the schema for a
> certain namespace. It's possible to specify multiple schemas by putting
> pairs of namespaces+WXS in schemaLocation. The validator may choose to
> ignore what schemaLocation says, and fetch the Schema from some other
> place.
>
> But. libxml2 does not yet support XMLSchema-instance. In other words, it
> can't figure out the Schema from the document instance, so it must be
> explicitly specified from the outside. Typically, like this:
>
> xmllint --noout --schema http://www.kde.org/standards/kcfg/1.0/kcfg.xsd
> foo.kcfg
>
> (And the kcfg file must have a proper declaration, as the docs in kcfg.xsd
> explains, and HEAD:kdepim/korganizer/korganizer.kcfg exemplifies.)
>
> There's a bug report for Schema Instance support in xmllint, and there's
> preliminary support for it, so I wouldn't be surprised if it turned up in
> the next release.
>
> That you get a complain about missing DTD is probably because you passed
> --valid(and that's for XML validness as opposed to Schema validness).

Bingo!  no more error message.  Thanks.

- -Benjamin Meyer

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

iD8DBQFBn39d1rZ3LTw38vIRAiW/AKCAUFUaKUJ3BazEIKlBH27af+0Z+ACfYs7R
Ae4XtOr5KChK7y6bc1KXqgQ=
=k6GV
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list