summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/api/qxmlschemavalidator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlpatterns/api/qxmlschemavalidator.cpp')
-rw-r--r--src/xmlpatterns/api/qxmlschemavalidator.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/xmlpatterns/api/qxmlschemavalidator.cpp b/src/xmlpatterns/api/qxmlschemavalidator.cpp
index f4a25df..112d780 100644
--- a/src/xmlpatterns/api/qxmlschemavalidator.cpp
+++ b/src/xmlpatterns/api/qxmlschemavalidator.cpp
@@ -154,13 +154,14 @@ bool QXmlSchemaValidator::validate(const QUrl &source) const
d->m_context->setMessageHandler(messageHandler());
d->m_context->setUriResolver(uriResolver());
d->m_context->setNetworkAccessManager(networkAccessManager());
+ const QUrl resolved = QPatternist::XPathHelper::normalizeQueryURI(source);
- const QPatternist::AutoPtr<QNetworkReply> reply(QPatternist::AccelTreeResourceLoader::load(source, d->m_context->networkAccessManager(),
- d->m_context, QPatternist::AccelTreeResourceLoader::ContinueOnError));
- if (reply)
- return validate(reply.data(), source);
- else
- return false;
+ const QPatternist::AutoPtr<QNetworkReply> reply(
+ QPatternist::AccelTreeResourceLoader::load(
+ resolved, d->m_context->networkAccessManager(),
+ d->m_context, QPatternist::AccelTreeResourceLoader::ContinueOnError));
+
+ return reply && validate(reply.data(), source);
}
/*!