[Interest] XML schema validation alternatives?

Elvis Stansvik elvstone at gmail.com
Tue May 12 08:39:37 CEST 2015


2015-05-11 21:49 GMT+02:00 Murphy, Sean <smurphy at walbro.com>:

> I was trying to use QXmlSchemaValidator to validate XML files vs. their
> associated schema and I'm encountering an infinite loop that eventually
> causes the application to crash. It's been reported (over 5 years ago) in
> https://bugreports.qt.io/browse/QTBUG-12534 It fails on pretty simple
> examples, when the schema contains an "xs:all", another bug reporting it
> that has a very simple schema/xml example is
> https://bugreports.qt.io/browse/QTBUG-35052 .
>
> Does anyone have a recommended alternative? Either a workaround to still
> use this class, or a third party library (preferable LGPL or similar
> licensing) that I could use for XML validation? One pretty hacky workaround
> is that changing the xs:all to an xs:sequence in the schema document fixes
> the issue, except that imposes an unwanted restriction in the corresponding
> XML files that the elements need to come in a specific order, which isn't
> really what we want.
>

No idea if there's a workaround (that's an old bug!). I've used libxml2 and
Xerces in the past.

Btw, Fredrik recently posted to the list about the issues with the
unmaintained QtXmlPatterns module [1]. You might want to let him know about
your use case.

Cheers,
Elvis

[1] http://lists.qt-project.org/pipermail/interest/2015-May/016714.html


>
> Sean
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150512/26c7a948/attachment.html>


More information about the Interest mailing list