QXmlSchemaPrivate::QXmlSchemaPrivate(const QPatternist::XsdSchemaContext::Ptr &schemaContext) : m_namePool(QXmlNamePool(schemaContext->namePool().data())) , m_userMessageHandler(0) , m_uriResolver(0) , m_userNetworkAccessManager(0) , m_schemaContext(schemaContext) , m_schemaParserContext(new QPatternist::XsdSchemaParserContext(m_namePool.d, m_schemaContext)) , m_schemaIsValid(false) { m_networkAccessManager = new QPatternist::ReferenceCountedValue<QNetworkAccessManager>(new QNetworkAccessManager()); m_messageHandler = new QPatternist::ReferenceCountedValue<QAbstractMessageHandler>(new QPatternist::ColoringMessageHandler()); }
QT_BEGIN_NAMESPACE /*! \class QXmlSchema \brief The QXmlSchema class provides loading and validation of a W3C XML Schema. \reentrant \since 4.6 \ingroup xml-tools The QXmlSchema class loads, compiles and validates W3C XML Schema files that can be used further for validation of XML instance documents via \l{QXmlSchemaValidator}. The following example shows how to load a XML Schema file from the network and test whether it is a valid schema document: \snippet doc/src/snippets/qxmlschema/main.cpp 0 \section1 XML Schema Version This class is used to represent schemas that conform to the \l{XML Schema} 1.0 specification. \sa QXmlSchemaValidator, {xmlpatterns/schema}{XML Schema Validation Example} */ /*! Constructs an invalid, empty schema that cannot be used until load() is called. */ QXmlSchema::QXmlSchema() : d(new QXmlSchemaPrivate(QXmlNamePool())) { }