[Qt-interest] XML Schema validation and multiple schema violations

Konrad Rosenbaum konrad at silmor.de
Fri Feb 26 16:41:09 CET 2010


Hi,

the example code for XML Schema validation only returns the first schema
violation found in an XML file - even if it contains several. I didn't
find anything in the docu to change this behavior.

Is there some way to get ALL schema violations (even if they are redundant
or follow-up errors) from a single XML file?

So eg. if my schema demands that the document tag <a> contains only any
number of <b> with xs:boolean as type, then I'd like this document:

<a>
 <b>true</b>
 <b>yessir</b>
 <c/>
</a>

to produce two errors ("yessir" is not boolean, <c> is not expected)
instead of only the first one.


    Konrad




More information about the Qt-interest-old mailing list