summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp
diff options
context:
space:
mode:
authorTobias Koenig <tokoe@kde.org>2009-05-16 10:30:25 (GMT)
committerTobias Koenig <tokoe@kde.org>2009-05-16 10:30:25 (GMT)
commit456463169c6d00b9938f0d975dbd7f398edea39d (patch)
tree13c1b245cffa15828ef1b12ac24c271c301221f2 /src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp
parent135a028d9dc9a28a0a072665a7dc43b7e9e187be (diff)
downloadQt-456463169c6d00b9938f0d975dbd7f398edea39d.zip
Qt-456463169c6d00b9938f0d975dbd7f398edea39d.tar.gz
Qt-456463169c6d00b9938f0d975dbd7f398edea39d.tar.bz2
Various api, documentation and code cleanups
Diffstat (limited to 'src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp')
-rw-r--r--src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp b/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp
index 12fc477..8cb34d4 100644
--- a/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp
+++ b/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp
@@ -15,6 +15,7 @@
#include "qacceltreeresourceloader_p.h"
#include "qbase64binary_p.h"
#include "qboolean_p.h"
+#include "qcommonnamespaces_p.h"
#include "qderivedinteger_p.h"
#include "qduration_p.h"
#include "qgenericstaticcontext_p.h"
@@ -64,14 +65,14 @@ namespace QPatternist
}
}
-XsdValidatingInstanceReader::XsdValidatingInstanceReader(const XsdValidatedXmlNodeModel *model, const QUrl &documentUri, const XsdSchemaContext::Ptr &context)
+XsdValidatingInstanceReader::XsdValidatingInstanceReader(XsdValidatedXmlNodeModel *model, const QUrl &documentUri, const XsdSchemaContext::Ptr &context)
: XsdInstanceReader(model, context)
- , m_model(const_cast<XsdValidatedXmlNodeModel*>(model))
+ , m_model(model)
, m_namePool(m_context->namePool())
- , m_xsiNilName(m_namePool->allocateQName(QLatin1String("http://www.w3.org/2001/XMLSchema-instance"), QLatin1String("nil")))
- , m_xsiTypeName(m_namePool->allocateQName(QLatin1String("http://www.w3.org/2001/XMLSchema-instance"), QLatin1String("type")))
- , m_xsiSchemaLocationName(m_namePool->allocateQName(QLatin1String("http://www.w3.org/2001/XMLSchema-instance"), QLatin1String("schemaLocation")))
- , m_xsiNoNamespaceSchemaLocationName(m_namePool->allocateQName(QLatin1String("http://www.w3.org/2001/XMLSchema-instance"), QLatin1String("noNamespaceSchemaLocation")))
+ , m_xsiNilName(m_namePool->allocateQName(CommonNamespaces::XSI, QLatin1String("nil")))
+ , m_xsiTypeName(m_namePool->allocateQName(CommonNamespaces::XSI, QLatin1String("type")))
+ , m_xsiSchemaLocationName(m_namePool->allocateQName(CommonNamespaces::XSI, QLatin1String("schemaLocation")))
+ , m_xsiNoNamespaceSchemaLocationName(m_namePool->allocateQName(CommonNamespaces::XSI, QLatin1String("noNamespaceSchemaLocation")))
, m_documentUri(documentUri)
{
m_idRefsType = m_context->schemaTypeFactory()->createSchemaType(m_namePool->allocateQName(CommonNamespaces::WXS, QLatin1String("IDREFS")));
@@ -152,7 +153,7 @@ bool XsdValidatingInstanceReader::read()
void XsdValidatingInstanceReader::error(const QString &msg) const
{
- const_cast<XsdSchemaContext*>(m_context.data())->error(msg, XsdSchemaContext::XSDError, sourceLocation());
+ m_context.data()->error(msg, XsdSchemaContext::XSDError, sourceLocation());
}
bool XsdValidatingInstanceReader::loadSchema(const QString &targetNamespace, const QUrl &location)