PythonQt.QtXmlPatterns.QXmlSchema · declarations 001
Back to PythonQt.QtXmlPatterns.QXmlSchema
documentUri
documentUri() -> Any
X.documentUri() -> PythonQt.QtCore.QUrl
Supplemental documentation: Qt 5 reference:
QUrl QXmlSchema::documentUri() const
Returns the document URI of the schema or an empty URI if no schema has been set.
Upstream PySide2 reference signatures (binding differences may apply):
documentUri(self) -> PySide2.QtCore.QUrl
Source: https://doc.qt.io/archives/qt-5.15/qxmlschema.html#documentUri
isValid
isValid() -> bool
X.isValid() -> bool
Supplemental documentation: Qt 5 reference:
bool QXmlSchema::isValid() const
Returns true if this schema is valid. Examples of invalid schemas are ones that contain syntax errors or that do not conform the W3C XML Schema specification.
Upstream PySide2 reference signatures (binding differences may apply):
isValid(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qxmlschema.html#isValid
load
load(source: Any, documentUri: Any) -> bool
X.load(source, documentUri) -> bool
Supplemental documentation: Qt 5 reference:
bool QXmlSchema::load(const QUrl \&source)
Sets this QXmlSchema to a schema loaded from the source URI.
If the schema is invalid,
false is returned and the behavior is undefined.
Example:
QUrl url("http://www.schema-example.org/myschema.xsd");
QXmlSchema schema;
if (schema.load(url) == true)
qDebug() << "schema is valid";
else
qDebug() << "schema is invalid";
See also isValid().
bool QXmlSchema::load(QIODevice *source, const QUrl \&documentUri \= QUrl())
Sets this QXmlSchema to a schema read from the source device. The device must have been opened with at least QIODevice::ReadOnly.
documentUri represents the schema obtained from the source device. It is the base URI of the schema, that is used internally to resolve relative URIs that appear in the schema, and for message reporting.
If source is null or not readable, or if documentUri is not a valid URI, behavior
is undefined.
If the schema is invalid,
false is returned and the behavior is undefined.
Example:
QFile file("myschema.xsd");
file.open(QIODevice::ReadOnly);
QXmlSchema schema;
schema.load(&file, QUrl::fromLocalFile(file.fileName()));
if (schema.isValid())
qDebug() << "schema is valid";
else
qDebug() << "schema is invalid";
See also isValid().
bool QXmlSchema::load(const QByteArray \&data, const QUrl \&documentUri \= QUrl())
Sets this QXmlSchema to a schema read from the data
documentUri represents the schema obtained from the data. It is the base URI of the schema, that is used internally to resolve relative URIs that appear in the schema, and for message reporting.
If documentUri is not a valid URI, behavior is undefined.
If the schema is invalid,
false is returned and the behavior is undefined.
Example:
QByteArray data( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<xsd:schema"
" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""
" xmlns=\"http://www.qt-project.org/xmlschematest\""
" targetNamespace=\"http://www.qt-project.org/xmlschematest\""
" version=\"1.0\""
" elementFormDefault=\"qualified\">"
"</xsd:schema>" );
QXmlSchema schema;
schema.load(data);
if (schema.isValid())
qDebug() << "schema is valid";
else
qDebug() << "schema is invalid";
See also isValid() and isValid().
Upstream PySide2 reference signatures (binding differences may apply):
load(self, data: PySide2.QtCore.QByteArray, documentUri: PySide2.QtCore.QUrl=...) -> bool
load(self, source: PySide2.QtCore.QIODevice, documentUri: PySide2.QtCore.QUrl=...) -> bool
load(self, source: PySide2.QtCore.QUrl) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qxmlschema.html#load
messageHandler
messageHandler() -> Any
X.messageHandler() -> PythonQt.QtXmlPatterns.QAbstractMessageHandler
Supplemental documentation: Qt 5 reference:
QAbstractMessageHandler *QXmlSchema::messageHandler() const
Returns the message handler that handles compile and validation messages for this QXmlSchema.
See also setMessageHandler().
Upstream PySide2 reference signatures (binding differences may apply):
messageHandler(self) -> PySide2.QtXmlPatterns.QAbstractMessageHandler
Source: https://doc.qt.io/archives/qt-5.15/qxmlschema.html#messageHandler
namePool
namePool() -> Any
X.namePool() -> PythonQt.QtXmlPatterns.QXmlNamePool
Supplemental documentation: Qt 5 reference:
QXmlNamePool QXmlSchema::namePool() const
Returns the name pool used by this QXmlSchema for constructing names. There is no setter for the name pool, because mixing name pools causes errors due to name confusion.
Upstream PySide2 reference signatures (binding differences may apply):
namePool(self) -> PySide2.QtXmlPatterns.QXmlNamePool
Source: https://doc.qt.io/archives/qt-5.15/qxmlschema.html#namePool
networkAccessManager
networkAccessManager() -> Any
X.networkAccessManager() -> PythonQt.QtNetwork.QNetworkAccessManager
Supplemental documentation: Qt 5 reference:
QNetworkAccessManager *QXmlSchema::networkAccessManager() const
Returns the network manager, or 0 if it has not been set.
See also setNetworkAccessManager().
Source: https://doc.qt.io/archives/qt-5.15/qxmlschema.html#networkAccessManager
operator_assign
operator_assign(other: Any) -> Any
X.operator_assign(other) -> PythonQt.QtXmlPatterns.QXmlSchema
setMessageHandler
setMessageHandler(handler: Any) -> None
X.setMessageHandler(handler)
Supplemental documentation: Qt 5 reference:
void QXmlSchema::setMessageHandler(QAbstractMessageHandler *handler)
Changes the message handler for this QXmlSchema to handler. The schema sends all compile and validation messages to this message handler. QXmlSchema does not take ownership of handler.
Normally, the default message handler is sufficient. It writes compile and validation messages to stderr. The default message handler includes color codes if stderr can render colors.
When QXmlSchema calls QAbstractMessageHandler::message(), the arguments are as follows:
| message() argument | Semantics |
|---|---|
| QtMsgType type | Only QtWarningMsg and QtFatalMsg are used. The former identifies a warning, while the latter identifies an error. |
| const QString \& description | An XHTML document which is the actual message. It is translated into the current language. |
| const QUrl \&identifier | Identifies the error with a URI, where the fragment is the error code, and the rest of the URI is the error namespace. |
| const QSourceLocation \& sourceLocation | Identifies where the error occurred. |
See also messageHandler().
Upstream PySide2 reference signatures (binding differences may apply):
setMessageHandler(self, handler: PySide2.QtXmlPatterns.QAbstractMessageHandler) -> None
Source: https://doc.qt.io/archives/qt-5.15/qxmlschema.html#setMessageHandler
setNetworkAccessManager
setNetworkAccessManager(networkmanager: Any) -> Any
X.setNetworkAccessManager(networkmanager)
Supplemental documentation: Qt 5 reference:
void QXmlSchema::setNetworkAccessManager(QNetworkAccessManager *manager)
Sets the network manager to manager. QXmlSchema does not take ownership of manager.
See also networkAccessManager().
Source: https://doc.qt.io/archives/qt-5.15/qxmlschema.html#setNetworkAccessManager
setUriResolver
setUriResolver(resolver: Any) -> None
X.setUriResolver(resolver)
Supplemental documentation: Qt 5 reference:
void QXmlSchema::setUriResolver(const QAbstractUriResolver *resolver)
Sets the URI resolver to resolver. QXmlSchema does not take ownership of resolver.
See also uriResolver().
Upstream PySide2 reference signatures (binding differences may apply):
setUriResolver(self, resolver: PySide2.QtXmlPatterns.QAbstractUriResolver) -> None
Source: https://doc.qt.io/archives/qt-5.15/qxmlschema.html#setUriResolver
uriResolver
uriResolver() -> Any
X.uriResolver() -> PythonQt.QtXmlPatterns.QAbstractUriResolver
Supplemental documentation: Qt 5 reference:
const QAbstractUriResolver *QXmlSchema::uriResolver() const
Returns the schema's URI resolver. If no URI resolver has been set, Qt XML Patterns will use the URIs in schemas as they are.
The URI resolver provides a level of abstraction, or polymorphic URIs. A resolver can rewrite logical URIs to physical ones, or it can translate obsolete or invalid URIs to valid ones.
When Qt XML Patterns calls QAbstractUriResolver::resolve() the absolute URI is the URI mandated by the schema specification, and the relative URI is the URI specified by the user.
See also setUriResolver().
Upstream PySide2 reference signatures (binding differences may apply):
uriResolver(self) -> PySide2.QtXmlPatterns.QAbstractUriResolver
Source: https://doc.qt.io/archives/qt-5.15/qxmlschema.html#uriResolver