WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. | Zuble QML Types | Zuble C++ Classes | Zuble Overview |
Zuble
0.1
Zuble Framework C++/QML extension API
|
This class wraps the QXmlSchemaValidator and QXmlSchema classes. More...
#include <ZSchemaValidator.h>
Public Slots | |
bool | validate () |
Validates the current XML document against the currently loaded XML schema. More... | |
Signals | |
void | statusMessage (QVariant message) |
Public Member Functions | |
ZSchemaValidator (QObject *parent=0) | |
QString | getSchemaUrl () |
Obtain the schema URI. More... | |
void | setSchemaUrl (const QString &schemaUrl) |
Sets the URI of the XML schema to use for validating XML documents and loads the schema into memory. Use the isOK() method to determine if XML schema was loaded successfully. More... | |
QString | getXmlDocUrl () |
Obtain the XML instance document URI. More... | |
void | setXmlDocUrl (const QString &xmlDocUrl) |
Sets the URI of the XML instance Document to be validated against the XML schema. More... | |
Q_INVOKABLE bool | isOk () |
Determines the status of the most recent operation. More... | |
Static Public Member Functions | |
static int | registerType () |
Registers this object with the QML type system. More... | |
Protected Member Functions | |
virtual ZBL_DECLARE_LOGGED_OBJECT void | zMessage (QVariant message) |
Protected Attributes | |
QUrl | m_schemaUrl |
The URI to the schema against which the instance document will be validated. More... | |
QXmlSchema | m_schema |
The encapsulated QXmlSchema object. More... | |
QUrl | m_XmlDocUrl |
The URI to the XML instance document that will be valudated against an XML schema. More... | |
ZxMessageHandler | m_msgHandler |
QXmlQuery. More... | |
bool | m_status |
Most recent status. true = OK, false = failed. More... | |
Properties | |
QString | schemaUrl |
QString | xmlDocUrl |
Additional Inherited Members |
This class wraps the QXmlSchemaValidator and QXmlSchema classes.
It allows javascript programs to validate XML instance documents against an XML schema document.
Definition at line 44 of file ZSchemaValidator.h.
|
explicit |
Definition at line 34 of file ZSchemaValidator.cpp.
QString Zbl::ZSchemaValidator::getSchemaUrl | ( | ) |
Obtain the schema URI.
Definition at line 57 of file ZSchemaValidator.cpp.
QString Zbl::ZSchemaValidator::getXmlDocUrl | ( | ) |
Obtain the XML instance document URI.
Definition at line 96 of file ZSchemaValidator.cpp.
bool Zbl::ZSchemaValidator::isOk | ( | ) |
Determines the status of the most recent operation.
Definition at line 106 of file ZSchemaValidator.cpp.
|
static |
Registers this object with the QML type system.
Definition at line 45 of file ZSchemaValidator.cpp.
Referenced by Zbl::Zblcore::registerTypes().
void Zbl::ZSchemaValidator::setSchemaUrl | ( | const QString & | schemaUrl | ) |
Sets the URI of the XML schema to use for validating XML documents and loads the schema into memory. Use the isOK() method to determine if XML schema was loaded successfully.
schemaUrl | A URI that references an XML schema. |
Definition at line 62 of file ZSchemaValidator.cpp.
void Zbl::ZSchemaValidator::setXmlDocUrl | ( | const QString & | xmlDocUrl | ) |
Sets the URI of the XML instance Document to be validated against the XML schema.
xmlDocUrl | A URI that references an XML Document. |
Definition at line 101 of file ZSchemaValidator.cpp.
|
signal |
Referenced by zMessage().
|
slot |
Validates the current XML document against the currently loaded XML schema.
Definition at line 70 of file ZSchemaValidator.cpp.
|
protectedvirtual |
Implements Zbl::ZxMessageListener.
Definition at line 40 of file ZSchemaValidator.cpp.
|
protected |
|
protected |
The encapsulated QXmlSchema object.
Definition at line 145 of file ZSchemaValidator.h.
Referenced by setSchemaUrl(), and validate().
|
protected |
The URI to the schema against which the instance document will be validated.
Definition at line 139 of file ZSchemaValidator.h.
Referenced by getSchemaUrl(), and setSchemaUrl().
|
protected |
Most recent status. true = OK, false = failed.
Definition at line 164 of file ZSchemaValidator.h.
Referenced by isOk(), setSchemaUrl(), and validate().
|
protected |
The URI to the XML instance document that will be valudated against an XML schema.
Definition at line 152 of file ZSchemaValidator.h.
Referenced by getXmlDocUrl(), setXmlDocUrl(), and validate().
|
readwrite |
Set and get the schema URI
Definition at line 54 of file ZSchemaValidator.h.
|
readwrite |
Set and get the XML Document URI
Definition at line 60 of file ZSchemaValidator.h.
Zuble documentation copyright © 2019 Bob Dinitto. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Zuble is a derivative work of Qt version 5. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.