diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-05-11 03:05:17 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-05-11 03:05:17 +0200 |
commit | 0cad1b4051a69c5a96be41e7aaa8da97302785f5 (patch) | |
tree | 1d795ebba9c9ee1001c2fa8dd574da8b05f85350 /src/xmlpatterns | |
parent | 9cfa05ed8beb0a9f323070060115e56064be9f3a (diff) | |
parent | 25a313cc7af41c2c63231499c49cc1f3e382e019 (diff) | |
download | qtxmlpatterns-0cad1b4051a69c5a96be41e7aaa8da97302785f5.tar.gz |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ifd4941a823c0d2cdcd1ec07ee6001b03ca18763b
Diffstat (limited to 'src/xmlpatterns')
-rw-r--r-- | src/xmlpatterns/schema/qxsdschemachecker.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/xmlpatterns/schema/qxsdschemachecker.cpp b/src/xmlpatterns/schema/qxsdschemachecker.cpp index 5e4302d..57ee3e6 100644 --- a/src/xmlpatterns/schema/qxsdschemachecker.cpp +++ b/src/xmlpatterns/schema/qxsdschemachecker.cpp @@ -414,8 +414,8 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() const XsdSimpleType::Ptr simpleItemType = itemType; const AnySimpleType::List memberTypes = simpleItemType->memberTypes(); for (int j = 0; j < memberTypes.count(); ++j) { - if (memberTypes.at(j)->category() != SchemaType::SimpleTypeAtomic) { - m_context->error(QtXmlPatterns::tr("Variety of member types of %1 must be atomic.").arg(formatType(m_namePool, simpleItemType)), XsdSchemaContext::XSDError, location); + if (memberTypes.at(j)->category() != SchemaType::SimpleTypeAtomic && memberTypes.at(j)->category() != SchemaType::SimpleTypeUnion) { + m_context->error(QtXmlPatterns::tr("Variety of member types of %1 must be atomic or union.").arg(formatType(m_namePool, simpleItemType)), XsdSchemaContext::XSDError, location); return; } } @@ -891,8 +891,9 @@ void XsdSchemaChecker::checkSimpleDerivationRestrictions() const XsdSimpleType::Ptr simpleItemType = itemType; const AnySimpleType::List memberTypes = simpleItemType->memberTypes(); for (int j = 0; j < memberTypes.count(); ++j) { - if (memberTypes.at(j)->category() != SchemaType::SimpleTypeAtomic) { - m_context->error(QtXmlPatterns::tr("Variety of member types of %1 must be atomic.").arg(formatType(m_namePool, simpleItemType)), XsdSchemaContext::XSDError, location); + if (memberTypes.at(j)->category() != SchemaType::SimpleTypeAtomic && memberTypes.at(j)->category() != SchemaType::SimpleTypeUnion) { + m_context->error(QtXmlPatterns::tr("Variety of member types of %1 must be atomic or union.").arg(formatType(m_namePool, simpleItemType)), + XsdSchemaContext::XSDError, location); return; } } |