summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns
diff options
context:
space:
mode:
authorTobias Koenig <tokoe@kde.org>2009-06-03 15:40:41 (GMT)
committerTobias Koenig <tokoe@kde.org>2009-06-03 15:40:41 (GMT)
commitf7741b78c90abcb272345810d55e446a7f390032 (patch)
tree7aa360dbd0d59bb2a6bd0205020693adb169bf93 /src/xmlpatterns
parent4785ed9b76104c272476f62780dde086e21b20ce (diff)
downloadQt-f7741b78c90abcb272345810d55e446a7f390032.zip
Qt-f7741b78c90abcb272345810d55e446a7f390032.tar.gz
Qt-f7741b78c90abcb272345810d55e446a7f390032.tar.bz2
Fixed typo in apidocs and extended example code
Diffstat (limited to 'src/xmlpatterns')
-rw-r--r--src/xmlpatterns/api/qxmlschema.cpp5
-rw-r--r--src/xmlpatterns/api/qxmlschemavalidator.cpp12
2 files changed, 14 insertions, 3 deletions
diff --git a/src/xmlpatterns/api/qxmlschema.cpp b/src/xmlpatterns/api/qxmlschema.cpp
index ec370ca..c6dc9b2 100644
--- a/src/xmlpatterns/api/qxmlschema.cpp
+++ b/src/xmlpatterns/api/qxmlschema.cpp
@@ -58,6 +58,11 @@
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
+
\sa QXmlSchemaValidator, {xmlpatterns/schema}{XML Schema Validation Example}
*/
diff --git a/src/xmlpatterns/api/qxmlschemavalidator.cpp b/src/xmlpatterns/api/qxmlschemavalidator.cpp
index dc8e55d..d5596c5 100644
--- a/src/xmlpatterns/api/qxmlschemavalidator.cpp
+++ b/src/xmlpatterns/api/qxmlschemavalidator.cpp
@@ -63,6 +63,12 @@
The QXmlSchemaValidator class loads, parses an XML instance document and validates it
against a W3C XML Schema that has been compiled with \l{QXmlSchema}.
+ The following example shows how to load a XML Schema from a local
+ file, check whether it is a valid schema document and use it for validation
+ of an XML instance document:
+
+ \snippet doc/src/snippets/qxmlschemavalidator/main.cpp 3
+
\sa QXmlSchema, {xmlpatterns/schema}{XML Schema Validation Example}
*/
@@ -110,7 +116,7 @@ void QXmlSchemaValidator::setSchema(const QXmlSchema &schema)
Validates the XML instance document read from \a data with the
given \a documentUri against the schema.
- Returns \c true if the XML instance document is valid according the
+ Returns \c true if the XML instance document is valid according to the
schema, \c false otherwise.
Example:
@@ -130,7 +136,7 @@ bool QXmlSchemaValidator::validate(const QByteArray &data, const QUrl &documentU
/*!
Validates the XML instance document read from \a source against the schema.
- Returns \c true if the XML instance document is valid according the
+ Returns \c true if the XML instance document is valid according to the
schema, \c false otherwise.
Example:
@@ -155,7 +161,7 @@ bool QXmlSchemaValidator::validate(const QUrl &source) const
Validates the XML instance document read from \a source with the
given \a documentUri against the schema.
- Returns \c true if the XML instance document is valid according the
+ Returns \c true if the XML instance document is valid according to the
schema, \c false otherwise.
Example: