summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/qtxmlpatterns.qdoc21
-rw-r--r--src/xmlpatterns/api/qxmlschemavalidator.cpp8
2 files changed, 28 insertions, 1 deletions
diff --git a/doc/src/qtxmlpatterns.qdoc b/doc/src/qtxmlpatterns.qdoc
index cb260fc..a48d713 100644
--- a/doc/src/qtxmlpatterns.qdoc
+++ b/doc/src/qtxmlpatterns.qdoc
@@ -839,6 +839,27 @@
with the \c fn:id() function. See
\l{http://www.w3.org/TR/xml-id/}{xml:id Version 1.0} for details.
+ \section2 XML Schema 1.0
+
+ The QtXmlPatterns implementation of XML Schema validation supports
+ the schema specification version 1.0 in large parts. Known problems
+ of the implementation and areas where conformancy may be questionable
+ are:
+
+ \list
+ \o Large \c minOccurs or \c maxOccurs values or deeply nested ones
+ require huge amount of memory which might cause the system to freeze.
+ Such a schema should be rewritten to use \c unbounded as value instead
+ of large numbers. This restriction will hopefully be fixed in a later release.
+ \o Comparison of really small or large floating point values might lead to
+ wrong results in some cases. However such numbers should not be relevant
+ for day-to-day usage.
+ \o Regular expression support is currently not conformant but follows
+ Qt's QRegExp standard syntax.
+ \o Identity constraint checks can not use the values of default or fixed
+ attribute definitions.
+ \endlist
+
\section2 Resource Loading
When QtXmlPatterns loads an XML resource, e.g., using the
diff --git a/src/xmlpatterns/api/qxmlschemavalidator.cpp b/src/xmlpatterns/api/qxmlschemavalidator.cpp
index b72b1ef..dc8e55d 100644
--- a/src/xmlpatterns/api/qxmlschemavalidator.cpp
+++ b/src/xmlpatterns/api/qxmlschemavalidator.cpp
@@ -69,7 +69,7 @@
/*!
Constructs a schema validator.
The schema used for validation must be referenced in the XML instance document
- via the xsi:schemaLocation attribute.
+ via the \c xsi:schemaLocation or \c xsi:noNamespaceSchemaLocation attribute.
*/
QXmlSchemaValidator::QXmlSchemaValidator()
: d(new QXmlSchemaValidatorPrivate(QXmlSchema()))
@@ -78,6 +78,9 @@ QXmlSchemaValidator::QXmlSchemaValidator()
/*!
Constructs a schema validator that will use \a schema for validation.
+ If an empty \l {QXmlSchema} schema is passed to the validator, the schema used
+ for validation must be referenced in the XML instance document
+ via the \c xsi:schemaLocation or \c xsi:noNamespaceSchemaLocation attribute.
*/
QXmlSchemaValidator::QXmlSchemaValidator(const QXmlSchema &schema)
: d(new QXmlSchemaValidatorPrivate(schema))
@@ -94,6 +97,9 @@ QXmlSchemaValidator::~QXmlSchemaValidator()
/*!
Sets the \a schema that shall be used for further validation.
+ If the schema is empty, the schema used for validation must be referenced
+ in the XML instance document via the \c xsi:schemaLocation or
+ \c xsi:noNamespaceSchemaLocation attribute.
*/
void QXmlSchemaValidator::setSchema(const QXmlSchema &schema)
{