50 #include <QtCore/QBuffer> 51 #include <QtCore/QIODevice> 52 #include <QtCore/QUrl> 143 return validate(&buffer, documentUri);
184 qWarning(
"A null QIODevice pointer cannot be passed.");
189 qWarning(
"The device must be readable.");
206 item = loader.openDocument(source, normalizedUri,
d->
m_context);
207 }
catch (QPatternist::Exception exception) {
221 }
catch (QPatternist::Exception exception) {
void addSchema(const XsdSchema::Ptr &schema, const QUrl &url)
QXmlNamePool namePool() const
Returns the name pool used by this QXmlSchemaValidator for constructing QXmlName {names}.
#define QT_END_NAMESPACE
This macro expands to.
bool isReadable() const
Returns true if data can be read from the device; otherwise returns false.
Handles requests for documents, and instantiates them as AccelTree instances.
QAbstractMessageHandler * m_userMessageHandler
QPatternist::XsdSchema::Ptr m_schema
bool open(OpenMode openMode)
Reimplemented Function
A smart pointer very similar to std::auto_ptr.
QNetworkAccessManager * m_userNetworkAccessManager
QPatternist::ReferenceCountedValue< QNetworkAccessManager >::Ptr m_networkAccessManager
The QByteArray class provides an array of bytes.
void setUriResolver(const QAbstractUriResolver *resolver)
Sets the URI resolver to resolver.
Builds an AccelTree from a stream of XML/Item events received through the NodeBuilder interface...
The QBuffer class provides a QIODevice interface for a QByteArray.
The QUrl class provides a convenient interface for working with URLs.
The QXmlSchema class provides loading and validation of a W3C XML Schema.
const QAbstractUriResolver * uriResolver() const
Returns the schema's URI resolver.
The QXmlNamePool class is a table of shared strings referenced by instances of QXmlName.
void setMessageHandler(QAbstractMessageHandler *handler)
Changes the QAbstractMessageHandler{message handler} for this QXmlSchemaValidator to handler...
QPatternist::XsdSchemaContext::Ptr m_context
The QAbstractUriResolver class is a callback interface for resolving Uniform Resource Identifiers...
#define QT_BEGIN_NAMESPACE
This macro expands to.
QNetworkAccessManager * networkAccessManager() const
Returns the network manager, or 0 if it has not been set.
The QAbstractXmlNodeModel class is an abstract base class for modeling non-XML data to look like XML ...
The resource loader will report no error and return an empty QNetworkReply.
void setSchema(const QXmlSchema &schema)
Sets the schema that shall be used for further validation.
Q_CORE_EXPORT void qWarning(const char *,...)
static const char * data(const QByteArray &arr)
QXmlSchemaValidator()
Constructs a schema validator.
The QNetworkAccessManager class allows the application to send network requests and receive replies...
QXmlSchema schema() const
Returns the schema that is used for validation.
static QNetworkReply * load(const QUrl &uri, QNetworkAccessManager *const networkManager, const ReportContext::Ptr &context, ErrorHandling handling=FailOnError)
Helper function that do NetworkAccessDelegator::get(), but does it blocked.
Represents an item in the XPath 2.0 Data Model.
The QAbstractMessageHandler class provides a callback interface for handling messages.
A delegate class that wraps around a QAbstractXmlNodeModel and provides additional validation specifi...
~QXmlSchemaValidator()
Destroys this QXmlSchemaValidator.
QAbstractMessageHandler * messageHandler() const
Returns the message handler that handles parsing and validation messages for this QXmlSchemaValidator...
const QAbstractUriResolver * m_uriResolver
QXmlSchema m_originalSchema
bool validate(const QUrl &source) const
Validates the XML instance document read from source against the schema.
The validating schema instance reader.
void setNetworkAccessManager(QNetworkAccessManager *networkmanager)
Sets the network manager to manager.
A value based class that hands out QNetworkAccessManager appropriately for variable bindings...
QImageIOHandler * handler
QPatternist::ReferenceCountedValue< QAbstractMessageHandler >::Ptr m_messageHandler
The QIODevice class is the base interface class of all I/O devices in Qt.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
static QUrl normalizeQueryURI(const QUrl &uri)
QXmlSchemaValidatorPrivate *const d
void setSchema(const QXmlSchema &schema)