diff options
author | Peter Hartmann <peter.hartmann@nokia.com> | 2010-02-24 15:45:30 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@nokia.com> | 2010-03-08 17:31:35 (GMT) |
commit | db20aff5bf81a6a935fbb89bf103351dc7a9215d (patch) | |
tree | 0d70484af653ae0efaeda3cf445891399aa69b1e /tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp | |
parent | d62f8e1e593acbb69b22ed4f941f2bebbb82dd14 (diff) | |
download | Qt-db20aff5bf81a6a935fbb89bf103351dc7a9215d.zip Qt-db20aff5bf81a6a935fbb89bf103351dc7a9215d.tar.gz Qt-db20aff5bf81a6a935fbb89bf103351dc7a9215d.tar.bz2 |
QXmlSchema internals: include/import/redefine schemas only once
According to the Schema standard, loading a schema needs only be done
once for each schema location. Currently, there was a problem with
indirect includes (and imports/redefines):
a In this scenario, schema a would only remember to have loaded
/ \ b, but not d, which resulted in an error when c was loading d
b c again and the types in d were redefined.
| |
d d
Reviewed-by: Tobias Koenig <tokoe@kde.org>
Task-number: QTBUG-8394
Diffstat (limited to 'tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp')
-rw-r--r-- | tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp index 6d4ed69..7aab47f 100644 --- a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp +++ b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp @@ -196,6 +196,21 @@ void tst_XmlPatternsValidator::xsdSupport_data() const << 1 << (QStringList() << QLatin1String("files/instance.xml")) << QString(); + + QTest::newRow("A schema with an indirectly included type") + << 0 + << (QStringList() << QLatin1String("files/indirect-include-a.xsd")) + << QString(); + + QTest::newRow("A schema with an indirectly imported type") + << 0 + << (QStringList() << QLatin1String("files/indirect-import-a.xsd")) + << QString(); + + QTest::newRow("A schema with an indirectly redefined type") + << 0 + << (QStringList() << QLatin1String("files/indirect-redefine-a.xsd")) + << QString(); } QTEST_MAIN(tst_XmlPatternsValidator) |