diff options
author | ninerider <qt-info@nokia.com> | 2009-10-01 11:11:56 (GMT) |
---|---|---|
committer | ninerider <qt-info@nokia.com> | 2009-10-01 11:11:56 (GMT) |
commit | c443a37d638be253fbda33e33ad2798951e04248 (patch) | |
tree | 89a9d221ead07d029f0bbddcaeaf7432b8c6d4af /src/xmlpatterns | |
parent | c7689f394df5fa5526e51017bf132048d3a4aa96 (diff) | |
parent | 3b37aff1e6c641290c155a6aa14d83167725556b (diff) | |
download | Qt-c443a37d638be253fbda33e33ad2798951e04248.zip Qt-c443a37d638be253fbda33e33ad2798951e04248.tar.gz Qt-c443a37d638be253fbda33e33ad2798951e04248.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/xmlpatterns')
-rw-r--r-- | src/xmlpatterns/functions/qsequencefns_p.h | 4 | ||||
-rw-r--r-- | src/xmlpatterns/schema/qxsdparticlechecker.cpp | 28 | ||||
-rw-r--r-- | src/xmlpatterns/schema/qxsdschemachecker.cpp | 206 | ||||
-rw-r--r-- | src/xmlpatterns/schema/qxsdschemahelper.cpp | 26 | ||||
-rw-r--r-- | src/xmlpatterns/schema/qxsdschemaparser.cpp | 148 | ||||
-rw-r--r-- | src/xmlpatterns/schema/qxsdschemaresolver.cpp | 72 | ||||
-rw-r--r-- | src/xmlpatterns/schema/qxsdtypechecker.cpp | 118 | ||||
-rw-r--r-- | src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp | 100 | ||||
-rw-r--r-- | src/xmlpatterns/type/qanytype.cpp | 2 |
9 files changed, 352 insertions, 352 deletions
diff --git a/src/xmlpatterns/functions/qsequencefns_p.h b/src/xmlpatterns/functions/qsequencefns_p.h index a9a1765..e406b95 100644 --- a/src/xmlpatterns/functions/qsequencefns_p.h +++ b/src/xmlpatterns/functions/qsequencefns_p.h @@ -148,8 +148,8 @@ namespace QPatternist { // RVCT doesn't like using template parameter in trinary operator when the trinary operator result is // passed directly into another constructor. - bool tempAssert = (Id == IDExistsFN || Id == IDEmptyFN); - Q_ASSERT(tempAssert); + Q_ASSERT(Id == IDExistsFN || Id == IDEmptyFN); + const Expression::Ptr me(FunctionCall::compress(context)); diff --git a/src/xmlpatterns/schema/qxsdparticlechecker.cpp b/src/xmlpatterns/schema/qxsdparticlechecker.cpp index 64e995e..3fdfb33 100644 --- a/src/xmlpatterns/schema/qxsdparticlechecker.cpp +++ b/src/xmlpatterns/schema/qxsdparticlechecker.cpp @@ -162,7 +162,7 @@ static bool derivedTermValid(const XsdTerm::Ptr &baseTerm, const XsdTerm::Ptr &d // check that an empty particle can not be derived from a non-empty particle if (derivedParticle && baseParticle) { if (XsdSchemaHelper::isParticleEmptiable(derivedParticle) && !XsdSchemaHelper::isParticleEmptiable(baseParticle)) { - errorMsg = QtXmlPatterns::tr("empty particle cannot be derived from non-empty particle"); + errorMsg = QtXmlPatterns::tr("Empty particle cannot be derived from non-empty particle."); return false; } } @@ -177,33 +177,33 @@ static bool derivedTermValid(const XsdTerm::Ptr &baseTerm, const XsdTerm::Ptr &d // check names are equal if (element->name(namePool) != derivedElement->name(namePool)) { - errorMsg = QtXmlPatterns::tr("derived particle is missing element %1").arg(formatKeyword(element->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Derived particle is missing element %1.").arg(formatKeyword(element->displayName(namePool))); return false; } // check value constraints are equal (if available) if (element->valueConstraint() && element->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) { if (!derivedElement->valueConstraint()) { - errorMsg = QtXmlPatterns::tr("derived element %1 is missing value constraint as defined in base particle").arg(formatKeyword(derivedElement->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Derived element %1 is missing value constraint as defined in base particle.").arg(formatKeyword(derivedElement->displayName(namePool))); return false; } if (derivedElement->valueConstraint()->variety() != XsdElement::ValueConstraint::Fixed) { - errorMsg = QtXmlPatterns::tr("derived element %1 has weaker value constraint than base particle").arg(formatKeyword(derivedElement->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Derived element %1 has weaker value constraint than base particle.").arg(formatKeyword(derivedElement->displayName(namePool))); return false; } const QSourceLocation dummyLocation(QUrl(QLatin1String("http://dummy.org")), 1, 1); const XsdTypeChecker checker(context, QVector<QXmlName>(), dummyLocation); if (!checker.valuesAreEqual(element->valueConstraint()->value(), derivedElement->valueConstraint()->value(), derivedElement->type())) { - errorMsg = QtXmlPatterns::tr("fixed value constraint of element %1 differs from value constraint in base particle").arg(formatKeyword(derivedElement->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Fixed value constraint of element %1 differs from value constraint in base particle.").arg(formatKeyword(derivedElement->displayName(namePool))); return false; } } // check that a derived element can not be nillable if the base element is not nillable if (!element->isNillable() && derivedElement->isNillable()) { - errorMsg = QtXmlPatterns::tr("derived element %1 cannot be nillable as base element is not nillable").arg(formatKeyword(derivedElement->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Derived element %1 cannot be nillable as base element is not nillable.").arg(formatKeyword(derivedElement->displayName(namePool))); return false; } @@ -213,7 +213,7 @@ static bool derivedTermValid(const XsdTerm::Ptr &baseTerm, const XsdTerm::Ptr &d if (((baseConstraints & XsdElement::RestrictionConstraint) && !(derivedConstraints & XsdElement::RestrictionConstraint)) || ((baseConstraints & XsdElement::ExtensionConstraint) && !(derivedConstraints & XsdElement::ExtensionConstraint)) || ((baseConstraints & XsdElement::SubstitutionConstraint) && !(derivedConstraints & XsdElement::SubstitutionConstraint))) { - errorMsg = QtXmlPatterns::tr("block constraints of derived element %1 must not be more weaker than in the base element").arg(formatKeyword(derivedElement->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Block constraints of derived element %1 must not be more weaker than in the base element.").arg(formatKeyword(derivedElement->displayName(namePool))); return false; } @@ -224,12 +224,12 @@ static bool derivedTermValid(const XsdTerm::Ptr &baseTerm, const XsdTerm::Ptr &d // check that the type of the derived element can validly derived from the type of the base element if (derivedElement->type()->isSimpleType()) { if (!XsdSchemaHelper::isSimpleDerivationOk(derivedElement->type(), element->type(), SchemaType::DerivationConstraints())) { - errorMsg = QtXmlPatterns::tr("simple type of derived element %1 cannot be validly derived from base element").arg(formatKeyword(derivedElement->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Simple type of derived element %1 cannot be validly derived from base element.").arg(formatKeyword(derivedElement->displayName(namePool))); return false; } } else if (derivedElement->type()->isComplexType()) { if (!XsdSchemaHelper::isComplexDerivationOk(derivedElement->type(), element->type(), SchemaType::DerivationConstraints())) { - errorMsg = QtXmlPatterns::tr("complex type of derived element %1 cannot be validly derived from base element").arg(formatKeyword(derivedElement->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Complex type of derived element %1 cannot be validly derived from base element.").arg(formatKeyword(derivedElement->displayName(namePool))); return false; } } @@ -253,7 +253,7 @@ static bool derivedTermValid(const XsdTerm::Ptr &baseTerm, const XsdTerm::Ptr &d return true; } else if (derivedTerm->isWildcard()) { // derive a wildcard from an element is not allowed - errorMsg = QtXmlPatterns::tr("element %1 is missing in derived particle").arg(formatKeyword(element->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Element %1 is missing in derived particle.").arg(formatKeyword(element->displayName(namePool))); return false; } } else if (baseTerm->isWildcard()) { @@ -271,7 +271,7 @@ static bool derivedTermValid(const XsdTerm::Ptr &baseTerm, const XsdTerm::Ptr &d // check that name of the element is allowed by the wildcards namespace constraint if (!XsdSchemaHelper::wildcardAllowsExpandedName(name, wildcard, namePool)) { - errorMsg = QtXmlPatterns::tr("element %1 does not match namespace constraint of wildcard in base particle").arg(formatKeyword(derivedElement->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Element %1 does not match namespace constraint of wildcard in base particle.").arg(formatKeyword(derivedElement->displayName(namePool))); return false; } @@ -282,12 +282,12 @@ static bool derivedTermValid(const XsdTerm::Ptr &baseTerm, const XsdTerm::Ptr &d // check that the derived wildcard is a valid subset of the base wildcard if (!XsdSchemaHelper::isWildcardSubset(derivedWildcard, wildcard)) { - errorMsg = QtXmlPatterns::tr("wildcard in derived particle is not a valid subset of wildcard in base particle"); + errorMsg = QtXmlPatterns::tr("Wildcard in derived particle is not a valid subset of wildcard in base particle."); return false; } if (!XsdSchemaHelper::checkWildcardProcessContents(wildcard, derivedWildcard)) { - errorMsg = QtXmlPatterns::tr("processContent of wildcard in derived particle is weaker than wildcard in base particle"); + errorMsg = QtXmlPatterns::tr("processContent of wildcard in derived particle is weaker than wildcard in base particle."); return false; } } @@ -527,7 +527,7 @@ bool XsdParticleChecker::subsumes(const XsdParticle::Ptr &particle, const XsdPar if (processedSet.at(i).second == it.key() && (baseStates.value(processedSet.at(i).first) != XsdStateMachine<XsdTerm::Ptr>::EndState && baseStates.value(processedSet.at(i).first) != XsdStateMachine<XsdTerm::Ptr>::StartEndState)) { - errorMsg = QtXmlPatterns::tr("derived particle allows content that is not allowed in the base particle"); + errorMsg = QtXmlPatterns::tr("Derived particle allows content that is not allowed in the base particle."); return false; } } diff --git a/src/xmlpatterns/schema/qxsdschemachecker.cpp b/src/xmlpatterns/schema/qxsdschemachecker.cpp index fc62ebb..dde72f5 100644 --- a/src/xmlpatterns/schema/qxsdschemachecker.cpp +++ b/src/xmlpatterns/schema/qxsdschemachecker.cpp @@ -224,12 +224,12 @@ void XsdSchemaChecker::checkBasicCircularInheritances() if (wxsTypeMatches(type, type->wxsSuperType(), visitedTypes, conflictingType)) { if (conflictingType) - m_context->error(QtXmlPatterns::tr("%1 has inheritance loop in its base type %2") + m_context->error(QtXmlPatterns::tr("%1 has inheritance loop in its base type %2.") .arg(formatType(m_namePool, type)) .arg(formatType(m_namePool, conflictingType)), XsdSchemaContext::XSDError, location); else - m_context->error(QtXmlPatterns::tr("circular inheritance of base type %1").arg(formatType(m_namePool, type)), XsdSchemaContext::XSDError, location); + m_context->error(QtXmlPatterns::tr("Circular inheritance of base type %1.").arg(formatType(m_namePool, type)), XsdSchemaContext::XSDError, location); return; } @@ -253,7 +253,7 @@ void XsdSchemaChecker::checkCircularInheritances() // check normal base type inheritance QSet<SchemaType::Ptr> visitedTypes; if (matchesType(type, type->wxsSuperType(), visitedTypes)) { - m_context->error(QtXmlPatterns::tr("circular inheritance of base type %1").arg(formatType(m_namePool, type)), XsdSchemaContext::XSDError, location); + m_context->error(QtXmlPatterns::tr("Circular inheritance of base type %1.").arg(formatType(m_namePool, type)), XsdSchemaContext::XSDError, location); return; } @@ -264,7 +264,7 @@ void XsdSchemaChecker::checkCircularInheritances() const XsdSimpleType::List memberTypes = simpleType->memberTypes(); for (int j = 0; j < memberTypes.count(); ++j) { if (hasCircularUnionInheritance(simpleType, memberTypes.at(j), m_namePool)) { - m_context->error(QtXmlPatterns::tr("circular inheritance of union %1").arg(formatType(m_namePool, type)), XsdSchemaContext::XSDError, location); + m_context->error(QtXmlPatterns::tr("Circular inheritance of union %1.").arg(formatType(m_namePool, type)), XsdSchemaContext::XSDError, location); return; } } @@ -289,12 +289,12 @@ void XsdSchemaChecker::checkInheritanceRestrictions() const SchemaType::Ptr baseType = type->wxsSuperType(); if (baseType->isDefinedBySchema()) { if ((type->derivationMethod() == SchemaType::DerivationRestriction) && (baseType->derivationConstraints() & SchemaType::RestrictionConstraint)) { - m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by restriction as the latter defines it as final") + m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by restriction as the latter defines it as final.") .arg(formatType(m_namePool, type)) .arg(formatType(m_namePool, baseType)), XsdSchemaContext::XSDError, location); return; } else if ((type->derivationMethod() == SchemaType::DerivationExtension) && (baseType->derivationConstraints() & SchemaType::ExtensionConstraint)) { - m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by extension as the latter defines it as final") + m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by extension as the latter defines it as final.") .arg(formatType(m_namePool, type)) .arg(formatType(m_namePool, baseType)), XsdSchemaContext::XSDError, location); return; @@ -325,7 +325,7 @@ void XsdSchemaChecker::checkBasicSimpleTypeConstraints() const SchemaType::Ptr baseType = simpleType->wxsSuperType(); if (baseType->isComplexType() && (simpleType->name(m_namePool) != BuiltinTypes::xsAnySimpleType->name(m_namePool))) { - m_context->error(QtXmlPatterns::tr("base type of simple type %1 cannot be complex type %2") + m_context->error(QtXmlPatterns::tr("Base type of simple type %1 cannot be complex type %2.") .arg(formatType(m_namePool, simpleType)) .arg(formatType(m_namePool, baseType)), XsdSchemaContext::XSDError, location); @@ -334,7 +334,7 @@ void XsdSchemaChecker::checkBasicSimpleTypeConstraints() if (baseType == BuiltinTypes::xsAnyType) { if (type->name(m_namePool) != BuiltinTypes::xsAnySimpleType->name(m_namePool)) { - m_context->error(QtXmlPatterns::tr("simple type %1 cannot have direct base type %2") + m_context->error(QtXmlPatterns::tr("Simple type %1 cannot have direct base type %2.") .arg(formatType(m_namePool, simpleType)) .arg(formatType(m_namePool, BuiltinTypes::xsAnyType)), XsdSchemaContext::XSDError, location); @@ -367,7 +367,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() // check that no user defined type has xs:AnySimpleType as base type (except xs:AnyAtomicType) if (simpleType->wxsSuperType()->name(m_namePool) == BuiltinTypes::xsAnySimpleType->name(m_namePool)) { if (simpleType->name(m_namePool) != BuiltinTypes::xsAnyAtomicType->name(m_namePool)) { - m_context->error(QtXmlPatterns::tr("simple type %1 is not allowed to have base type %2") + m_context->error(QtXmlPatterns::tr("Simple type %1 is not allowed to have base type %2.") .arg(formatType(m_namePool, simpleType)) .arg(formatType(m_namePool, simpleType->wxsSuperType())), XsdSchemaContext::XSDError, location); @@ -376,7 +376,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() } // check that no user defined type has xs:AnyAtomicType as base type if (simpleType->wxsSuperType()->name(m_namePool) == BuiltinTypes::xsAnyAtomicType->name(m_namePool)) { - m_context->error(QtXmlPatterns::tr("simple type %1 is not allowed to have base type %2") + m_context->error(QtXmlPatterns::tr("Simple type %1 is not allowed to have base type %2.") .arg(formatType(m_namePool, simpleType)) .arg(formatType(m_namePool, simpleType->wxsSuperType())), XsdSchemaContext::XSDError, location); @@ -388,13 +388,13 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() if (simpleType->category() == XsdSimpleType::SimpleTypeAtomic) { // 1.1 if ((simpleType->wxsSuperType()->category() != XsdSimpleType::SimpleTypeAtomic) && (simpleType->name(m_namePool) != BuiltinTypes::xsAnyAtomicType->name(m_namePool))) { - m_context->error(QtXmlPatterns::tr("simple type %1 can only have simple atomic type as base type") + m_context->error(QtXmlPatterns::tr("Simple type %1 can only have simple atomic type as base type.") .arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); } // 1.2 if (simpleType->wxsSuperType()->derivationConstraints() & SchemaType::RestrictionConstraint) { - m_context->error(QtXmlPatterns::tr("simple type %1 cannot derive from %2 as the latter defines restriction as final") + m_context->error(QtXmlPatterns::tr("Simple type %1 cannot derive from %2 as the latter defines restriction as final.") .arg(formatType(m_namePool, simpleType->wxsSuperType())) .arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); @@ -407,7 +407,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() // 2.1 or @see http://www.w3.org/TR/xmlschema-2/#cos-list-of-atomic if (itemType->category() != SchemaType::SimpleTypeAtomic && itemType->category() != SchemaType::SimpleTypeUnion) { - m_context->error(QtXmlPatterns::tr("variety of item type of %1 must be either atomic or union").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); + m_context->error(QtXmlPatterns::tr("Variety of item type of %1 must be either atomic or union.").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); return; } @@ -417,7 +417,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() 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); + m_context->error(QtXmlPatterns::tr("Variety of member types of %1 must be atomic.").arg(formatType(m_namePool, simpleItemType)), XsdSchemaContext::XSDError, location); return; } } @@ -430,7 +430,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() // 2.2.1.1 if (simpleItemType->derivationConstraints() & XsdSimpleType::ListConstraint) { - m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by list as the latter defines it as final") + m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by list as the latter defines it as final.") .arg(formatType(m_namePool, simpleType)) .arg(formatType(m_namePool, simpleItemType)), XsdSchemaContext::XSDError, location); return; @@ -450,7 +450,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() } if (invalidFacetFound) { - m_context->error(QtXmlPatterns::tr("simple type %1 is only allowed to have %2 facet") + m_context->error(QtXmlPatterns::tr("Simple type %1 is only allowed to have %2 facet.") .arg(formatType(m_namePool, simpleType)) .arg(formatKeyword("whiteSpace")), XsdSchemaContext::XSDError, location); @@ -460,19 +460,19 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() } else { // 2.2.2 // 2.2.2.1 if (simpleType->wxsSuperType()->category() != XsdSimpleType::SimpleTypeList) { - m_context->error(QtXmlPatterns::tr("base type of simple type %1 must have variety of type list").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); + m_context->error(QtXmlPatterns::tr("Base type of simple type %1 must have variety of type list.").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); return; } // 2.2.2.2 if (simpleType->wxsSuperType()->derivationConstraints() & SchemaType::RestrictionConstraint) { - m_context->error(QtXmlPatterns::tr("base type of simple type %1 has defined derivation by restriction as final").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); + m_context->error(QtXmlPatterns::tr("Base type of simple type %1 has defined derivation by restriction as final.").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); return; } // 2.2.2.3 if (!XsdSchemaHelper::isSimpleDerivationOk(itemType, XsdSimpleType::Ptr(simpleType->wxsSuperType())->itemType(), SchemaType::DerivationConstraints())) { - m_context->error(QtXmlPatterns::tr("item type of base type does not match item type of %1").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); + m_context->error(QtXmlPatterns::tr("Item type of base type does not match item type of %1.").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); return; } @@ -498,7 +498,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() } if (invalidFacetFound) { - m_context->error(QtXmlPatterns::tr("simple type %1 contains not allowed facet type %2") + m_context->error(QtXmlPatterns::tr("Simple type %1 contains not allowed facet type %2.") .arg(formatType(m_namePool, simpleType)) .arg(formatKeyword(XsdFacet::typeName(invalidFacetType))), XsdSchemaContext::XSDError, location); @@ -519,7 +519,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() const AnySimpleType::Ptr memberType = memberTypes.at(i); if (memberType->derivationConstraints() & XsdSimpleType::UnionConstraint) { - m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by union as the latter defines it as final") + m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by union as the latter defines it as final.") .arg(formatType(m_namePool, simpleType)) .arg(formatType(m_namePool, memberType)), XsdSchemaContext::XSDError, location); return; @@ -528,7 +528,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() // 3.3.1.2 if (!simpleType->facets().isEmpty()) { - m_context->error(QtXmlPatterns::tr("%1 is not allowed to have any facets") + m_context->error(QtXmlPatterns::tr("%1 is not allowed to have any facets.") .arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); return; @@ -536,7 +536,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() } else { // 3.1.2.1 if (simpleType->wxsSuperType()->category() != SchemaType::SimpleTypeUnion) { - m_context->error(QtXmlPatterns::tr("base type %1 of simple type %2 must have variety of union") + m_context->error(QtXmlPatterns::tr("Base type %1 of simple type %2 must have variety of union.") .arg(formatType(m_namePool, simpleType->wxsSuperType())) .arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); @@ -545,7 +545,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() // 3.1.2.2 if (simpleType->wxsSuperType()->derivationConstraints() & SchemaType::DerivationRestriction) { - m_context->error(QtXmlPatterns::tr("base type %1 of simple type %2 is not allowed to have restriction in %3 attribute") + m_context->error(QtXmlPatterns::tr("Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute.") .arg(formatType(m_namePool, simpleType->wxsSuperType())) .arg(formatType(m_namePool, simpleType)) .arg(formatAttribute("final")), @@ -563,7 +563,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() const AnySimpleType::Ptr baseMemberType = baseMemberTypes.at(i); if (!XsdSchemaHelper::isSimpleDerivationOk(memberType, baseMemberType, SchemaType::DerivationConstraints())) { - m_context->error(QtXmlPatterns::tr("member type %1 cannot be derived from member type %2 of %3's base type %4") + m_context->error(QtXmlPatterns::tr("Member type %1 cannot be derived from member type %2 of %3's base type %4.") .arg(formatType(m_namePool, memberType)) .arg(formatType(m_namePool, baseMemberType)) .arg(formatType(m_namePool, simpleType)) @@ -591,7 +591,7 @@ void XsdSchemaChecker::checkSimpleTypeConstraints() } if (invalidFacetFound) { - m_context->error(QtXmlPatterns::tr("simple type %1 contains not allowed facet type %2") + m_context->error(QtXmlPatterns::tr("Simple type %1 contains not allowed facet type %2.") .arg(formatType(m_namePool, simpleType)) .arg(formatKeyword(XsdFacet::typeName(invalidFacetType))), XsdSchemaContext::XSDError, location); @@ -628,7 +628,7 @@ void XsdSchemaChecker::checkBasicComplexTypeConstraints() // @see http://www.w3.org/TR/xmlschema11-1/#ct-props-correct 2) if (baseType->isSimpleType() && (complexType->derivationMethod() != XsdComplexType::DerivationExtension)) { - m_context->error(QtXmlPatterns::tr("derivation method of %1 must be extension because the base type %2 is a simple type") + m_context->error(QtXmlPatterns::tr("Derivation method of %1 must be extension because the base type %2 is a simple type.") .arg(formatType(m_namePool, complexType)) .arg(formatType(m_namePool, baseType)), XsdSchemaContext::XSDError, location); @@ -658,7 +658,7 @@ void XsdSchemaChecker::checkComplexTypeConstraints() if (complexType->contentType()->particle()) { XsdElement::Ptr duplicatedElement; if (XsdParticleChecker::hasDuplicatedElements(complexType->contentType()->particle(), m_namePool, duplicatedElement)) { - m_context->error(QtXmlPatterns::tr("complex type %1 has duplicated element %2 in its content model") + m_context->error(QtXmlPatterns::tr("Complex type %1 has duplicated element %2 in its content model.") .arg(formatType(m_namePool, complexType)) .arg(formatKeyword(duplicatedElement->displayName(m_namePool))), XsdSchemaContext::XSDError, location); @@ -666,7 +666,7 @@ void XsdSchemaChecker::checkComplexTypeConstraints() } if (!XsdParticleChecker::isUPAConform(complexType->contentType()->particle(), m_namePool)) { - m_context->error(QtXmlPatterns::tr("complex type %1 has non-deterministic content") + m_context->error(QtXmlPatterns::tr("Complex type %1 has non-deterministic content.") .arg(formatType(m_namePool, complexType)), XsdSchemaContext::XSDError, location); return; @@ -687,7 +687,7 @@ void XsdSchemaChecker::checkComplexTypeConstraints() QString errorMsg; if (!XsdSchemaHelper::isValidAttributeUsesExtension(complexType->attributeUses(), complexBaseType->attributeUses(), complexType->attributeWildcard(), complexBaseType->attributeWildcard(), m_context, errorMsg)) { - m_context->error(QtXmlPatterns::tr("attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3") + m_context->error(QtXmlPatterns::tr("Attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3.") .arg(formatType(m_namePool, complexType)) .arg(formatType(m_namePool, baseType)) .arg(errorMsg), @@ -724,7 +724,7 @@ void XsdSchemaChecker::checkComplexTypeConstraints() // 1.5 WTF?!? if (!validContentType) { - m_context->error(QtXmlPatterns::tr("content model of complex type %1 is not a valid extension of content model of %2") + m_context->error(QtXmlPatterns::tr("Content model of complex type %1 is not a valid extension of content model of %2.") .arg(formatType(m_namePool, complexType)) .arg(formatType(m_namePool, complexBaseType)), XsdSchemaContext::XSDError, location); @@ -734,14 +734,14 @@ void XsdSchemaChecker::checkComplexTypeConstraints() } else if (baseType->isSimpleType()) { // 2.1 if (complexType->contentType()->variety() != XsdComplexType::ContentType::Simple) { - m_context->error(QtXmlPatterns::tr("complex type %1 must have simple content") + m_context->error(QtXmlPatterns::tr("Complex type %1 must have simple content.") .arg(formatType(m_namePool, complexType)), XsdSchemaContext::XSDError, location); return; } if (complexType->contentType()->simpleType() != baseType) { - m_context->error(QtXmlPatterns::tr("complex type %1 must have the same simple type as its base class %2") + m_context->error(QtXmlPatterns::tr("Complex type %1 must have the same simple type as its base class %2.") .arg(formatType(m_namePool, complexType)) .arg(formatType(m_namePool, baseType)), XsdSchemaContext::XSDError, location); @@ -808,7 +808,7 @@ void XsdSchemaChecker::checkComplexTypeConstraints() } if (!derivationOk) { - m_context->error(QtXmlPatterns::tr("complex type %1 cannot be derived from base type %2%3") + m_context->error(QtXmlPatterns::tr("Complex type %1 cannot be derived from base type %2%3.") .arg(formatType(m_namePool, complexType)) .arg(formatType(m_namePool, baseType)) .arg(errorMsg.isEmpty() ? QString() : QLatin1String(": ") + errorMsg), @@ -822,7 +822,7 @@ void XsdSchemaChecker::checkComplexTypeConstraints() QString errorMsg; if (!XsdSchemaHelper::isValidAttributeUsesRestriction(complexType->attributeUses(), complexBaseType->attributeUses(), complexType->attributeWildcard(), complexBaseType->attributeWildcard(), m_context, errorMsg)) { - m_context->error(QtXmlPatterns::tr("attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3") + m_context->error(QtXmlPatterns::tr("Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3.") .arg(formatType(m_namePool, complexType)) .arg(formatType(m_namePool, baseType)) .arg(errorMsg), @@ -836,7 +836,7 @@ void XsdSchemaChecker::checkComplexTypeConstraints() // built in complex type xs:AnyType if (complexType->contentType()->variety() == XsdComplexType::ContentType::Simple) { if (baseType->name(m_namePool) == BuiltinTypes::xsAnyType->name(m_namePool)) { - m_context->error(QtXmlPatterns::tr("complex type %1 with simple content cannot be derived from complex base type %2") + m_context->error(QtXmlPatterns::tr("Complex type %1 with simple content cannot be derived from complex base type %2.") .arg(formatType(m_namePool, complexType)) .arg(formatType(m_namePool, baseType)), XsdSchemaContext::XSDError, location); @@ -871,7 +871,7 @@ void XsdSchemaChecker::checkSimpleDerivationRestrictions() const AnySimpleType::Ptr itemType = simpleType->itemType(); if (itemType->isComplexType()) { - m_context->error(QtXmlPatterns::tr("item type of simple type %1 cannot be a complex type") + m_context->error(QtXmlPatterns::tr("Item type of simple type %1 cannot be a complex type.") .arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); return; @@ -881,7 +881,7 @@ void XsdSchemaChecker::checkSimpleDerivationRestrictions() if (itemType->isSimpleType() && itemType->isDefinedBySchema()) { const XsdSimpleType::Ptr simpleItemType = itemType; if (simpleItemType->derivationConstraints() & XsdSimpleType::ListConstraint) { - m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by list as the latter defines it as final") + m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by list as the latter defines it as final.") .arg(formatType(m_namePool, simpleType)) .arg(formatType(m_namePool, simpleItemType)), XsdSchemaContext::XSDError, location); @@ -891,7 +891,7 @@ void XsdSchemaChecker::checkSimpleDerivationRestrictions() // @see http://www.w3.org/TR/xmlschema-2/#cos-list-of-atomic if (itemType->category() != SchemaType::SimpleTypeAtomic && itemType->category() != SchemaType::SimpleTypeUnion) { - m_context->error(QtXmlPatterns::tr("variety of item type of %1 must be either atomic or union").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); + m_context->error(QtXmlPatterns::tr("Variety of item type of %1 must be either atomic or union.").arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); return; } @@ -900,7 +900,7 @@ void XsdSchemaChecker::checkSimpleDerivationRestrictions() 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); + m_context->error(QtXmlPatterns::tr("Variety of member types of %1 must be atomic.").arg(formatType(m_namePool, simpleItemType)), XsdSchemaContext::XSDError, location); return; } } @@ -915,7 +915,7 @@ void XsdSchemaChecker::checkSimpleDerivationRestrictions() const AnySimpleType::Ptr memberType = memberTypes.at(i); if (memberType->isComplexType()) { - m_context->error(QtXmlPatterns::tr("member type of simple type %1 cannot be a complex type") + m_context->error(QtXmlPatterns::tr("Member type of simple type %1 cannot be a complex type.") .arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); return; @@ -923,7 +923,7 @@ void XsdSchemaChecker::checkSimpleDerivationRestrictions() // @see http://www.w3.org/TR/xmlschema-2/#cos-no-circular-unions if (simpleType->name(m_namePool) == memberType->name(m_namePool)) { - m_context->error(QtXmlPatterns::tr("%1 is not allowed to have a member type with the same name as itself") + m_context->error(QtXmlPatterns::tr("%1 is not allowed to have a member type with the same name as itself.") .arg(formatType(m_namePool, simpleType)), XsdSchemaContext::XSDError, location); return; @@ -932,7 +932,7 @@ void XsdSchemaChecker::checkSimpleDerivationRestrictions() if (memberType->isSimpleType() && memberType->isDefinedBySchema()) { const XsdSimpleType::Ptr simpleMemberType = memberType; if (simpleMemberType->derivationConstraints() & XsdSimpleType::UnionConstraint) { - m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by union as the latter defines it as final") + m_context->error(QtXmlPatterns::tr("%1 is not allowed to derive from %2 by union as the latter defines it as final.") .arg(formatType(m_namePool, simpleType)) .arg(formatType(m_namePool, simpleMemberType)), XsdSchemaContext::XSDError, location); @@ -1006,7 +1006,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con } if ((minLengthValue->toInteger() > lengthValue->toInteger()) || !foundSuperMinimumLength) { - m_context->error(QtXmlPatterns::tr("%1 facet collides with %2 facet") + m_context->error(QtXmlPatterns::tr("%1 facet collides with %2 facet.") .arg(formatKeyword("length")) .arg(formatKeyword("minLength")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1035,7 +1035,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con } if ((maxLengthValue->toInteger() < lengthValue->toInteger()) || !foundSuperMaximumLength) { - m_context->error(QtXmlPatterns::tr("%1 facet collides with %2 facet") + m_context->error(QtXmlPatterns::tr("%1 facet collides with %2 facet.") .arg(formatKeyword("length")) .arg(formatKeyword("maxLength")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1049,7 +1049,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con if (baseFacets.contains(XsdFacet::Length)) { const DerivedInteger<TypeNonNegativeInteger>::Ptr baseValue = baseFacets.value(XsdFacet::Length)->value(); if (lengthValue->toInteger() != baseValue->toInteger()) { - m_context->error(QtXmlPatterns::tr("%1 facet must have the same value as %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must have the same value as %2 facet of base type.") .arg(formatKeyword("length")) .arg(formatKeyword("length")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1069,7 +1069,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con // @see http://www.w3.org/TR/xmlschema-2/#minLength-less-than-equal-to-maxLength if (maxLengthValue->toInteger() < minLengthValue->toInteger()) { - m_context->error(QtXmlPatterns::tr("%1 facet collides with %2 facet") + m_context->error(QtXmlPatterns::tr("%1 facet collides with %2 facet.") .arg(formatKeyword("minLength")) .arg(formatKeyword("maxLength")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1086,7 +1086,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con if (baseFacets.contains(XsdFacet::MinimumLength)) { const DerivedInteger<TypeNonNegativeInteger>::Ptr baseValue = baseFacets.value(XsdFacet::MinimumLength)->value(); if (minLengthValue->toInteger() < baseValue->toInteger()) { - m_context->error(QtXmlPatterns::tr("%1 facet must be equal or greater than %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be equal or greater than %2 facet of base type.") .arg(formatKeyword("minLength")) .arg(formatKeyword("minLength")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1105,7 +1105,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con if (baseFacets.contains(XsdFacet::MaximumLength)) { const DerivedInteger<TypeNonNegativeInteger>::Ptr baseValue(baseFacets.value(XsdFacet::MaximumLength)->value()); if (maxLengthValue->toInteger() > baseValue->toInteger()) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type.") .arg(formatKeyword("maxLength")) .arg(formatKeyword("maxLength")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1126,7 +1126,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const DerivedString<TypeString>::Ptr value = multiValue.at(i); const QRegExp exp = PatternPlatform::parsePattern(value->stringValue(), m_context, &reflection); if (!exp.isValid()) { - m_context->error(QtXmlPatterns::tr("%1 facet contains invalid regular expression").arg(formatKeyword("pattern")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); + m_context->error(QtXmlPatterns::tr("%1 facet contains invalid regular expression").arg(formatKeyword("pattern.")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); return; } } @@ -1141,7 +1141,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con for (int k = 0; k < notationNames.count(); ++k) { const QNameValue::Ptr notationName = notationNames.at(k); if (!m_schema->notation(notationName->qName())) { - m_context->error(QtXmlPatterns::tr("unknown notation %1 used in %2 facet") + m_context->error(QtXmlPatterns::tr("Unknown notation %1 used in %2 facet.") .arg(formatKeyword(m_namePool, notationName->qName())) .arg(formatKeyword("enumeration")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1161,7 +1161,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con QString errorMsg; if (!checker.isValidString(actualValue, baseType, errorMsg)) { - m_context->error(QtXmlPatterns::tr("%1 facet contains invalid value %2: %3") + m_context->error(QtXmlPatterns::tr("%1 facet contains invalid value %2: %3.") .arg(formatKeyword("enumeration")) .arg(formatData(stringValue)) .arg(errorMsg), @@ -1183,7 +1183,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const QString baseValue = DerivedString<TypeString>::Ptr(baseFacets.value(XsdFacet::WhiteSpace)->value())->stringValue(); if (value == XsdSchemaToken::toString(XsdSchemaToken::Replace) || value == XsdSchemaToken::toString(XsdSchemaToken::Preserve)) { if (baseValue == XsdSchemaToken::toString(XsdSchemaToken::Collapse)) { - m_context->error(QtXmlPatterns::tr("%1 facet cannot be %2 or %3 if %4 facet of base type is %5") + m_context->error(QtXmlPatterns::tr("%1 facet cannot be %2 or %3 if %4 facet of base type is %5.") .arg(formatKeyword("whiteSpace")) .arg(formatData("replace")) .arg(formatData("preserve")) @@ -1194,7 +1194,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con } } if (value == XsdSchemaToken::toString(XsdSchemaToken::Preserve) && baseValue == XsdSchemaToken::toString(XsdSchemaToken::Replace)) { - m_context->error(QtXmlPatterns::tr("%1 facet cannot be %2 if %3 facet of base type is %4") + m_context->error(QtXmlPatterns::tr("%1 facet cannot be %2 if %3 facet of base type is %4.") .arg(formatKeyword("whiteSpace")) .arg(formatData("preserve")) .arg(formatKeyword("whiteSpace")) @@ -1214,7 +1214,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterThan, maxFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet.") .arg(formatKeyword("minInclusive")) .arg(formatKeyword("maxInclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1230,7 +1230,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumInclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(maxFacet->value(), AtomicComparator::OperatorGreaterThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type.") .arg(formatKeyword("maxInclusive")) .arg(formatKeyword("maxInclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1242,7 +1242,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumExclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(maxFacet->value(), AtomicComparator::OperatorGreaterOrEqual, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet of base type.") .arg(formatKeyword("maxInclusive")) .arg(formatKeyword("maxExclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1257,7 +1257,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con // @see http://www.w3.org/TR/xmlschema-2/#maxInclusive-maxExclusive if (facets.contains(XsdFacet::MaximumInclusive)) { - m_context->error(QtXmlPatterns::tr("%1 facet and %2 facet cannot appear together") + m_context->error(QtXmlPatterns::tr("%1 facet and %2 facet cannot appear together.") .arg(formatKeyword("maxExclusive")) .arg(formatKeyword("maxInclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1269,7 +1269,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr minFacet = facets.value(XsdFacet::MinimumExclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterThan, maxFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet.") .arg(formatKeyword("minExclusive")) .arg(formatKeyword("maxExclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1285,7 +1285,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumExclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(maxFacet->value(), AtomicComparator::OperatorGreaterThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type.") .arg(formatKeyword("maxExclusive")) .arg(formatKeyword("maxExclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1297,7 +1297,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumInclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(maxFacet->value(), AtomicComparator::OperatorGreaterThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type.") .arg(formatKeyword("maxExclusive")) .arg(formatKeyword("maxInclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1309,7 +1309,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MinimumInclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(maxFacet->value(), AtomicComparator::OperatorLessOrEqual, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be greater than %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be greater than %2 facet of base type.") .arg(formatKeyword("maxExclusive")) .arg(formatKeyword("minInclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1321,7 +1321,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MinimumExclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(maxFacet->value(), AtomicComparator::OperatorLessOrEqual, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be greater than %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be greater than %2 facet of base type.") .arg(formatKeyword("maxExclusive")) .arg(formatKeyword("minExclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1336,7 +1336,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con // @see http://www.w3.org/TR/xmlschema-2/#minInclusive-minExclusive if (facets.contains(XsdFacet::MinimumInclusive)) { - m_context->error(QtXmlPatterns::tr("%1 facet and %2 facet cannot appear together") + m_context->error(QtXmlPatterns::tr("%1 facet and %2 facet cannot appear together.") .arg(formatKeyword("minExclusive")) .arg(formatKeyword("minInclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1348,7 +1348,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr maxFacet = facets.value(XsdFacet::MaximumInclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterOrEqual, maxFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet.") .arg(formatKeyword("minExclusive")) .arg(formatKeyword("maxInclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1364,7 +1364,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MinimumExclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorLessThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be greater than or equal to %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be greater than or equal to %2 facet of base type.") .arg(formatKeyword("minExclusive")) .arg(formatKeyword("minExclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1376,7 +1376,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumExclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterOrEqual, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet of base type.") .arg(formatKeyword("minExclusive")) .arg(formatKeyword("maxExclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1388,7 +1388,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumInclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type.") .arg(formatKeyword("minExclusive")) .arg(formatKeyword("maxInclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1406,7 +1406,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr maxFacet = facets.value(XsdFacet::MaximumExclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterOrEqual, maxFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet.") .arg(formatKeyword("minInclusive")) .arg(formatKeyword("maxExclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1422,7 +1422,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MinimumInclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorLessThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be greater than or equal to %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be greater than or equal to %2 facet of base type.") .arg(formatKeyword("minInclusive")) .arg(formatKeyword("minInclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1434,7 +1434,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MinimumExclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorLessOrEqual, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be greater than %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be greater than %2 facet of base type.") .arg(formatKeyword("minInclusive")) .arg(formatKeyword("minExclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1446,7 +1446,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumInclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterThan, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type.") .arg(formatKeyword("minInclusive")) .arg(formatKeyword("maxInclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1458,7 +1458,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const XsdFacet::Ptr baseFacet = baseFacets.value(XsdFacet::MaximumExclusive); if (comparableBaseType) { if (XsdSchemaHelper::constructAndCompare(minFacet->value(), AtomicComparator::OperatorGreaterOrEqual, baseFacet->value(), comparableBaseType, m_context, &reflection)) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than %2 facet of base type.") .arg(formatKeyword("minInclusive")) .arg(formatKeyword("maxExclusive")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1480,7 +1480,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const DerivedInteger<TypeNonNegativeInteger>::Ptr baseValue = baseFacet->value(); if (totalDigitsValue->toInteger() > baseValue->toInteger()) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type.") .arg(formatKeyword("totalDigits")) .arg(formatKeyword("totalDigits")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1499,7 +1499,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const DerivedInteger<TypeNonNegativeInteger>::Ptr totalDigitsValue = totalDigitsFacet->value(); if (fractionDigitsValue->toInteger() > totalDigitsValue->toInteger()) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet.") .arg(formatKeyword("fractionDigits")) .arg(formatKeyword("totalDigits")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1515,7 +1515,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const DerivedInteger<TypeNonNegativeInteger>::Ptr baseValue = baseFacet->value(); if (fractionDigitsValue->toInteger() > baseValue->toInteger()) { - m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type") + m_context->error(QtXmlPatterns::tr("%1 facet must be less than or equal to %2 facet of base type.") .arg(formatKeyword("fractionDigits")) .arg(formatKeyword("fractionDigits")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1535,7 +1535,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con QSet<XsdFacet::Type> availableFacets = facets.keys().toSet(); if (!availableFacets.subtract(allowedFacets).isEmpty()) { - m_context->error(QtXmlPatterns::tr("simple type contains not allowed facet %1") + m_context->error(QtXmlPatterns::tr("Simple type contains not allowed facet %1.") .arg(formatKeyword(XsdFacet::typeName(availableFacets.toList().first()))), XsdSchemaContext::XSDError, sourceLocation(simpleType)); return; @@ -1547,7 +1547,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con facets.contains(XsdFacet::MaximumExclusive) || facets.contains(XsdFacet::MinimumExclusive) || facets.contains(XsdFacet::TotalDigits) || facets.contains(XsdFacet::FractionDigits)) { - m_context->error(QtXmlPatterns::tr("%1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list") + m_context->error(QtXmlPatterns::tr("%1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list.") .arg(formatKeyword("maxInclusive")) .arg(formatKeyword("maxExclusive")) .arg(formatKeyword("minInclusive")) @@ -1563,7 +1563,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con facets.contains(XsdFacet::MinimumLength) || facets.contains(XsdFacet::MaximumLength) || facets.contains(XsdFacet::Length) || facets.contains(XsdFacet::WhiteSpace)) { - m_context->error(QtXmlPatterns::tr("only %1 and %2 facets are allowed when derived by union") + m_context->error(QtXmlPatterns::tr("Only %1 and %2 facets are allowed when derived by union.") .arg(formatKeyword("pattern")) .arg(formatKeyword("enumeration")), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1586,7 +1586,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const DerivedString<TypeString>::Ptr stringValue = facet->value(); const AtomicValue::Ptr value = ValueFactory::fromLexical(stringValue->stringValue(), baseType, m_context, &reflection); if (value->hasError()) { - m_context->error(QtXmlPatterns::tr("%1 contains %2 facet with invalid data: %3") + m_context->error(QtXmlPatterns::tr("%1 contains %2 facet with invalid data: %3.") .arg(formatType(m_namePool, simpleType)) .arg(formatKeyword(XsdFacet::typeName(facet->type()))) .arg(formatData(stringValue->stringValue())), @@ -1602,7 +1602,7 @@ void XsdSchemaChecker::checkConstrainingFacets(const XsdFacet::Hash &facets, con const QString stringValue = DerivedString<TypeString>::Ptr(multiValue.at(j))->stringValue(); const AtomicValue::Ptr value = ValueFactory::fromLexical(stringValue, baseType, m_context, &reflection); if (value->hasError()) { - m_context->error(QtXmlPatterns::tr("%1 contains %2 facet with invalid data: %3") + m_context->error(QtXmlPatterns::tr("%1 contains %2 facet with invalid data: %3.") .arg(formatType(m_namePool, simpleType)) .arg(formatKeyword(XsdFacet::typeName(XsdFacet::Enumeration))) .arg(formatData(stringValue)), @@ -1626,7 +1626,7 @@ void XsdSchemaChecker::checkDuplicatedAttributeUses() // @see http://www.w3.org/TR/xmlschema11-1/#ct-props-correct 4) XsdAttribute::Ptr conflictingAttribute; if (hasDuplicatedAttributeUses(uses, conflictingAttribute)) { - m_context->error(QtXmlPatterns::tr("attribute group %1 contains attribute %2 twice") + m_context->error(QtXmlPatterns::tr("Attribute group %1 contains attribute %2 twice.") .arg(formatKeyword(attributeGroup->displayName(m_namePool))) .arg(formatKeyword(conflictingAttribute->displayName(m_namePool))), XsdSchemaContext::XSDError, sourceLocation(attributeGroup)); @@ -1635,7 +1635,7 @@ void XsdSchemaChecker::checkDuplicatedAttributeUses() // @see http://www.w3.org/TR/xmlschema11-1/#ct-props-correct 5) if (hasMultipleIDAttributeUses(uses)) { - m_context->error(QtXmlPatterns::tr("attribute group %1 contains two different attributes that both have types derived from %2") + m_context->error(QtXmlPatterns::tr("Attribute group %1 contains two different attributes that both have types derived from %2.") .arg(formatKeyword(attributeGroup->displayName(m_namePool))) .arg(formatType(m_namePool, BuiltinTypes::xsID)), XsdSchemaContext::XSDError, sourceLocation(attributeGroup)); @@ -1643,7 +1643,7 @@ void XsdSchemaChecker::checkDuplicatedAttributeUses() } if (hasConstraintIDAttributeUse(uses, conflictingAttribute)) { - m_context->error(QtXmlPatterns::tr("attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3") + m_context->error(QtXmlPatterns::tr("Attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3.") .arg(formatKeyword(attributeGroup->displayName(m_namePool))) .arg(formatKeyword(conflictingAttribute->displayName(m_namePool))) .arg(formatType(m_namePool, BuiltinTypes::xsID)), @@ -1666,7 +1666,7 @@ void XsdSchemaChecker::checkDuplicatedAttributeUses() // @see http://www.w3.org/TR/xmlschema11-1/#ct-props-correct 4) XsdAttribute::Ptr conflictingAttribute; if (hasDuplicatedAttributeUses(attributeUses, conflictingAttribute)) { - m_context->error(QtXmlPatterns::tr("complex type %1 contains attribute %2 twice") + m_context->error(QtXmlPatterns::tr("Complex type %1 contains attribute %2 twice.") .arg(formatType(m_namePool, complexType)) .arg(formatKeyword(conflictingAttribute->displayName(m_namePool))), XsdSchemaContext::XSDError, sourceLocation(complexType)); @@ -1675,7 +1675,7 @@ void XsdSchemaChecker::checkDuplicatedAttributeUses() // @see http://www.w3.org/TR/xmlschema11-1/#ct-props-correct 5) if (hasMultipleIDAttributeUses(attributeUses)) { - m_context->error(QtXmlPatterns::tr("complex type %1 contains two different attributes that both have types derived from %2") + m_context->error(QtXmlPatterns::tr("Complex type %1 contains two different attributes that both have types derived from %2.") .arg(formatType(m_namePool, complexType)) .arg(formatType(m_namePool, BuiltinTypes::xsID)), XsdSchemaContext::XSDError, sourceLocation(complexType)); @@ -1683,7 +1683,7 @@ void XsdSchemaChecker::checkDuplicatedAttributeUses() } if (hasConstraintIDAttributeUse(attributeUses, conflictingAttribute)) { - m_context->error(QtXmlPatterns::tr("complex type %1 contains attribute %2 that has value constraint but type that inherits from %3") + m_context->error(QtXmlPatterns::tr("Complex type %1 contains attribute %2 that has value constraint but type that inherits from %3.") .arg(formatType(m_namePool, complexType)) .arg(formatKeyword(conflictingAttribute->displayName(m_namePool))) .arg(formatType(m_namePool, BuiltinTypes::xsID)), @@ -1726,14 +1726,14 @@ void XsdSchemaChecker::checkElementConstraints() targetType = XsdSimpleType::Ptr(simpleType)->primitiveType(); } } else if (complexType->contentType()->variety() != XsdComplexType::ContentType::Mixed) { - m_context->error(QtXmlPatterns::tr("element %1 is not allowed to have a value constraint if its base type is complex") + m_context->error(QtXmlPatterns::tr("Element %1 is not allowed to have a value constraint if its base type is complex.") .arg(formatKeyword(element->displayName(m_namePool))), XsdSchemaContext::XSDError, sourceLocation(element)); return; } } if ((targetType == BuiltinTypes::xsID) || BuiltinTypes::xsID->wxsTypeMatches(type)) { - m_context->error(QtXmlPatterns::tr("element %1 is not allowed to have a value constraint if its type is derived from %2") + m_context->error(QtXmlPatterns::tr("Element %1 is not allowed to have a value constraint if its type is derived from %2.") .arg(formatKeyword(element->displayName(m_namePool))) .arg(formatType(m_namePool, BuiltinTypes::xsID)), XsdSchemaContext::XSDError, sourceLocation(element)); @@ -1743,7 +1743,7 @@ void XsdSchemaChecker::checkElementConstraints() if (type->isSimpleType()) { QString errorMsg; if (!isValidValue(element->valueConstraint()->value(), type, errorMsg)) { - m_context->error(QtXmlPatterns::tr("value constraint of element %1 is not of elements type: %2") + m_context->error(QtXmlPatterns::tr("Value constraint of element %1 is not of elements type: %2.") .arg(formatKeyword(element->displayName(m_namePool))) .arg(errorMsg), XsdSchemaContext::XSDError, sourceLocation(element)); @@ -1754,7 +1754,7 @@ void XsdSchemaChecker::checkElementConstraints() if (complexType->contentType()->variety() == XsdComplexType::ContentType::Simple) { QString errorMsg; if (!isValidValue(element->valueConstraint()->value(), complexType->contentType()->simpleType(), errorMsg)) { - m_context->error(QtXmlPatterns::tr("value constraint of element %1 is not of elements type: %2") + m_context->error(QtXmlPatterns::tr("Value constraint of element %1 is not of elements type: %2.") .arg(formatKeyword(element->displayName(m_namePool))) .arg(errorMsg), XsdSchemaContext::XSDError, sourceLocation(element)); @@ -1767,7 +1767,7 @@ void XsdSchemaChecker::checkElementConstraints() if (!element->substitutionGroupAffiliations().isEmpty()) { // 3 if (!element->scope() || element->scope()->variety() != XsdElement::Scope::Global) { - m_context->error(QtXmlPatterns::tr("element %1 is not allowed to have substitution group affiliation as it is no global element").arg(formatKeyword(element->displayName(m_namePool))), + m_context->error(QtXmlPatterns::tr("Element %1 is not allowed to have substitution group affiliation as it is no global element.").arg(formatKeyword(element->displayName(m_namePool))), XsdSchemaContext::XSDError, sourceLocation(element)); return; } @@ -1795,7 +1795,7 @@ void XsdSchemaChecker::checkElementConstraints() } if (!derivationOk) { - m_context->error(QtXmlPatterns::tr("type of element %1 cannot be derived from type of substitution group affiliation").arg(formatKeyword(element->displayName(m_namePool))), + m_context->error(QtXmlPatterns::tr("Type of element %1 cannot be derived from type of substitution group affiliation.").arg(formatKeyword(element->displayName(m_namePool))), XsdSchemaContext::XSDError, sourceLocation(element)); return; } @@ -1836,7 +1836,7 @@ void XsdSchemaChecker::checkAttributeConstraints() QString errorMsg; if (!isValidValue(attribute->valueConstraint()->value(), attribute->type(), errorMsg)) { - m_context->error(QtXmlPatterns::tr("value constraint of attribute %1 is not of attributes type: %2") + m_context->error(QtXmlPatterns::tr("Value constraint of attribute %1 is not of attributes type: %2.") .arg(formatKeyword(attribute->displayName(m_namePool))) .arg(errorMsg), XsdSchemaContext::XSDError, sourceLocation(attribute)); @@ -1845,7 +1845,7 @@ void XsdSchemaChecker::checkAttributeConstraints() } if (BuiltinTypes::xsID->wxsTypeMatches(attribute->type())) { - m_context->error(QtXmlPatterns::tr("attribute %1 has value constraint but has type derived from %2") + m_context->error(QtXmlPatterns::tr("Attribute %1 has value constraint but has type derived from %2.") .arg(formatKeyword(attribute->displayName(m_namePool))) .arg(formatType(m_namePool, BuiltinTypes::xsID)), XsdSchemaContext::XSDError, sourceLocation(attribute)); @@ -1901,7 +1901,7 @@ void XsdSchemaChecker::checkAttributeUseConstraints() if (baseAttributeUse->useType() == XsdAttributeUse::RequiredUse) { if (attributeUse->useType() == XsdAttributeUse::OptionalUse || attributeUse->useType() == XsdAttributeUse::ProhibitedUse) { - m_context->error(QtXmlPatterns::tr("%1 attribute in derived complex type must be %2 like in base type") + m_context->error(QtXmlPatterns::tr("%1 attribute in derived complex type must be %2 like in base type.") .arg(formatAttribute("use")) .arg(formatData("required")), XsdSchemaContext::XSDError, sourceLocation(complexType)); @@ -1912,7 +1912,7 @@ void XsdSchemaChecker::checkAttributeUseConstraints() if (baseAttributeUse->valueConstraint()) { if (baseAttributeUse->valueConstraint()->variety() == XsdAttributeUse::ValueConstraint::Fixed) { if (!attributeUse->valueConstraint()) { - m_context->error(QtXmlPatterns::tr("attribute %1 in derived complex type must have %2 value constraint like in base type") + m_context->error(QtXmlPatterns::tr("Attribute %1 in derived complex type must have %2 value constraint like in base type.") .arg(formatKeyword(attributeUse->attribute()->displayName(m_namePool))) .arg(formatData("fixed")), XsdSchemaContext::XSDError, sourceLocation(complexType)); @@ -1921,14 +1921,14 @@ void XsdSchemaChecker::checkAttributeUseConstraints() if (attributeUse->valueConstraint()->variety() == XsdAttributeUse::ValueConstraint::Fixed) { const XsdTypeChecker checker(m_context, QVector<QXmlName>(), sourceLocation(complexType)); if (!checker.valuesAreEqual(attributeUse->valueConstraint()->value(), baseAttributeUse->valueConstraint()->value(), attributeUse->attribute()->type())) { - m_context->error(QtXmlPatterns::tr("attribute %1 in derived complex type must have the same %2 value constraint like in base type") + m_context->error(QtXmlPatterns::tr("Attribute %1 in derived complex type must have the same %2 value constraint like in base type.") .arg(formatKeyword(attributeUse->attribute()->displayName(m_namePool))) .arg(formatData("fixed")), XsdSchemaContext::XSDError, sourceLocation(complexType)); return; } } else { - m_context->error(QtXmlPatterns::tr("attribute %1 in derived complex type must have %2 value constraint") + m_context->error(QtXmlPatterns::tr("Attribute %1 in derived complex type must have %2 value constraint.") .arg(formatKeyword(attributeUse->attribute()->displayName(m_namePool))) .arg(formatData("fixed")), XsdSchemaContext::XSDError, sourceLocation(complexType)); @@ -1946,7 +1946,7 @@ void XsdSchemaChecker::checkAttributeUseConstraints() const XsdWildcard::Ptr derivedWildcard(complexType->attributeWildcard()); if (baseWildcard && derivedWildcard) { if (!XsdSchemaHelper::checkWildcardProcessContents(baseWildcard, derivedWildcard)) { - m_context->error(QtXmlPatterns::tr("processContent of base wildcard must be weaker than derived wildcard"), XsdSchemaContext::XSDError, sourceLocation(complexType)); + m_context->error(QtXmlPatterns::tr("processContent of base wildcard must be weaker than derived wildcard."), XsdSchemaContext::XSDError, sourceLocation(complexType)); return; } } @@ -1985,7 +1985,7 @@ void XsdSchemaChecker::checkElementDuplicates(const XsdParticle::Ptr &particle, if (elementMap.contains(element->name(m_namePool))) { if (element->type() != elementMap.value(element->name(m_namePool))) { - m_context->error(QtXmlPatterns::tr("element %1 exists twice with different types") + m_context->error(QtXmlPatterns::tr("Element %1 exists twice with different types.") .arg(formatKeyword(element->displayName(m_namePool))), XsdSchemaContext::XSDError, sourceLocation(element)); return; @@ -2000,7 +2000,7 @@ void XsdSchemaChecker::checkElementDuplicates(const XsdParticle::Ptr &particle, const XsdElement::Ptr substElement = substElements.at(i); if (elementMap.contains(substElement->name(m_namePool))) { if (substElement->type() != elementMap.value(substElement->name(m_namePool))) { - m_context->error(QtXmlPatterns::tr("element %1 exists twice with different types") + m_context->error(QtXmlPatterns::tr("Element %1 exists twice with different types.") .arg(formatKeyword(substElement->displayName(m_namePool))), XsdSchemaContext::XSDError, sourceLocation(element)); return; @@ -2028,7 +2028,7 @@ void XsdSchemaChecker::checkElementDuplicates(const XsdParticle::Ptr &particle, } if (error) { - m_context->error(QtXmlPatterns::tr("particle contains non-deterministic wildcards"), XsdSchemaContext::XSDError, sourceLocation(wildcard)); + m_context->error(QtXmlPatterns::tr("Particle contains non-deterministic wildcards."), XsdSchemaContext::XSDError, sourceLocation(wildcard)); return; } else { wildcardMap.insert(wildcard->namespaceConstraint()->variety(), wildcard); diff --git a/src/xmlpatterns/schema/qxsdschemahelper.cpp b/src/xmlpatterns/schema/qxsdschemahelper.cpp index 3173498..a56f3ef 100644 --- a/src/xmlpatterns/schema/qxsdschemahelper.cpp +++ b/src/xmlpatterns/schema/qxsdschemahelper.cpp @@ -688,13 +688,13 @@ bool XsdSchemaHelper::isValidAttributeUsesRestriction(const XsdAttributeUse::Lis // 2.1.1 if (baseAttributeUse->isRequired() == true && derivedAttributeUse->isRequired() == false) { - errorMsg = QtXmlPatterns::tr("base attribute %1 is required but derived attribute is not").arg(formatAttribute(baseAttributeUse->attribute()->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Base attribute %1 is required but derived attribute is not.").arg(formatAttribute(baseAttributeUse->attribute()->displayName(namePool))); return false; } // 2.1.2 if (!isSimpleDerivationOk(derivedAttributeUse->attribute()->type(), baseAttributeUse->attribute()->type(), SchemaType::DerivationConstraints())) { - errorMsg = QtXmlPatterns::tr("type of derived attribute %1 cannot be validly derived from type of base attribute").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Type of derived attribute %1 cannot be validly derived from type of base attribute.").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool))); return false; } @@ -722,12 +722,12 @@ bool XsdSchemaHelper::isValidAttributeUsesRestriction(const XsdAttributeUse::Lis } if (!ok) { - errorMsg = QtXmlPatterns::tr("value constraint of derived attribute %1 does not match value constraint of base attribute").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Value constraint of derived attribute %1 does not match value constraint of base attribute.").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool))); return false; } } else { if (!wildcard) { - errorMsg = QtXmlPatterns::tr("derived attribute %1 does not exists in the base definition").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Derived attribute %1 does not exists in the base definition.").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool))); return false; } @@ -738,7 +738,7 @@ bool XsdSchemaHelper::isValidAttributeUsesRestriction(const XsdAttributeUse::Lis name.setNamespaceURI(namePool->allocateNamespace(XsdWildcard::absentNamespace())); if (!wildcardAllowsExpandedName(name, wildcard, namePool)) { - errorMsg = QtXmlPatterns::tr("derived attribute %1 does not match the wildcard in the base definition").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Derived attribute %1 does not match the wildcard in the base definition.").arg(formatAttribute(derivedAttributeUse->attribute()->displayName(namePool))); return false; } } @@ -751,11 +751,11 @@ bool XsdSchemaHelper::isValidAttributeUsesRestriction(const XsdAttributeUse::Lis if (baseAttributeUse->isRequired()) { if (derivedAttributeUsesLookup.contains(baseAttributeUse->attribute()->name(namePool))) { if (!derivedAttributeUsesLookup.value(baseAttributeUse->attribute()->name(namePool))->isRequired()) { - errorMsg = QtXmlPatterns::tr("base attribute %1 is required but derived attribute is not").arg(formatAttribute(baseAttributeUse->attribute()->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Base attribute %1 is required but derived attribute is not.").arg(formatAttribute(baseAttributeUse->attribute()->displayName(namePool))); return false; } } else { - errorMsg = QtXmlPatterns::tr("base attribute %1 is required but missing in derived definition").arg(formatAttribute(baseAttributeUse->attribute()->displayName(namePool))); + errorMsg = QtXmlPatterns::tr("Base attribute %1 is required but missing in derived definition.").arg(formatAttribute(baseAttributeUse->attribute()->displayName(namePool))); return false; } } @@ -764,17 +764,17 @@ bool XsdSchemaHelper::isValidAttributeUsesRestriction(const XsdAttributeUse::Lis // 4 if (derivedWildcard) { if (!wildcard) { - errorMsg = QtXmlPatterns::tr("derived definition contains an %1 element that does not exists in the base definition").arg(formatElement("anyAttribute")); + errorMsg = QtXmlPatterns::tr("Derived definition contains an %1 element that does not exists in the base definition").arg(formatElement("anyAttribute.")); return false; } if (!isWildcardSubset(derivedWildcard, wildcard)) { - errorMsg = QtXmlPatterns::tr("derived wildcard is not a subset of the base wildcard"); + errorMsg = QtXmlPatterns::tr("Derived wildcard is not a subset of the base wildcard."); return false; } if (!checkWildcardProcessContents(wildcard, derivedWildcard)) { - errorMsg = QtXmlPatterns::tr("%1 of derived wildcard is not a valid restriction of %2 of base wildcard").arg(formatKeyword("processContents")).arg(formatKeyword("processContents")); + errorMsg = QtXmlPatterns::tr("%1 of derived wildcard is not a valid restriction of %2 of base wildcard").arg(formatKeyword("processContents")).arg(formatKeyword("processContents.")); return false; } } @@ -797,12 +797,12 @@ bool XsdSchemaHelper::isValidAttributeUsesExtension(const XsdAttributeUse::List for (int i = 0; i < attributeUses.count(); ++i) { const QXmlName attributeName = attributeUses.at(i)->attribute()->name(namePool); if (!lookupHash.contains(attributeName)) { - errorMsg = QtXmlPatterns::tr("attribute %1 from base type is missing in derived type").arg(formatKeyword(namePool->displayName(attributeName))); + errorMsg = QtXmlPatterns::tr("Attribute %1 from base type is missing in derived type.").arg(formatKeyword(namePool->displayName(attributeName))); return false; } if (lookupHash.value(attributeName)->type() != attributeUses.at(i)->attribute()->type()) { - errorMsg = QtXmlPatterns::tr("type of derived attribute %1 differs from type of base attribute").arg(formatKeyword(namePool->displayName(attributeName))); + errorMsg = QtXmlPatterns::tr("Type of derived attribute %1 differs from type of base attribute.").arg(formatKeyword(namePool->displayName(attributeName))); return false; } } @@ -810,7 +810,7 @@ bool XsdSchemaHelper::isValidAttributeUsesExtension(const XsdAttributeUse::List // 1.3 if (wildcard) { if (!derivedWildcard) { - errorMsg = QtXmlPatterns::tr("base definition contains an %1 element that is missing in the derived definition").arg(formatElement("anyAttribute")); + errorMsg = QtXmlPatterns::tr("Base definition contains an %1 element that is missing in the derived definition").arg(formatElement("anyAttribute.")); return false; } } diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp index 19a8425..8f7b6af 100644 --- a/src/xmlpatterns/schema/qxsdschemaparser.cpp +++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp @@ -166,7 +166,7 @@ class TagValidationHandler for (int i = 0; i < tokens.count(); ++i) elementNames.append(formatElement(XsdSchemaToken::toString(tokens.at(i)))); - m_parser->error(QtXmlPatterns::tr("can not process unknown element %1, expected elements are: %2") + m_parser->error(QtXmlPatterns::tr("Can not process unknown element %1, expected elements are: %2.") .arg(formatElement(m_parser->name().toString())) .arg(elementNames.join(QLatin1String(", ")))); return; @@ -179,7 +179,7 @@ class TagValidationHandler for (int i = 0; i < tokens.count(); ++i) elementNames.append(formatElement(XsdSchemaToken::toString(tokens.at(i)))); - m_parser->error(QtXmlPatterns::tr("element %1 is not allowed in this scope, possible elements are: %2") + m_parser->error(QtXmlPatterns::tr("Element %1 is not allowed in this scope, possible elements are: %2.") .arg(formatElement(XsdSchemaToken::toString(token))) .arg(elementNames.join(QLatin1String(", ")))); return; @@ -195,7 +195,7 @@ class TagValidationHandler for (int i = 0; i < tokens.count(); ++i) elementNames.append(formatElement(XsdSchemaToken::toString(tokens.at(i)))); - m_parser->error(QtXmlPatterns::tr("child element is missing in that scope, possible child elements are: %1") + m_parser->error(QtXmlPatterns::tr("Child element is missing in that scope, possible child elements are: %1.") .arg(elementNames.join(QLatin1String(", ")))); } } @@ -322,7 +322,7 @@ bool XsdSchemaParser::parse(ParserType parserType) if (isSchemaTag(XsdSchemaToken::Schema, token, namespaceToken)) { parseSchema(parserType); } else { - error(QtXmlPatterns::tr("document is not a XML schema")); + error(QtXmlPatterns::tr("Document is not a XML schema.")); } } } @@ -344,13 +344,13 @@ void XsdSchemaParser::error(const QString &msg) void XsdSchemaParser::attributeContentError(const char *attributeName, const char *elementName, const QString &value, const SchemaType::Ptr &type) { if (type) { - error(QtXmlPatterns::tr("%1 attribute of %2 element contains invalid content: {%3} is not a value of type %4") + error(QtXmlPatterns::tr("%1 attribute of %2 element contains invalid content: {%3} is not a value of type %4.") .arg(formatAttribute(attributeName)) .arg(formatElement(elementName)) .arg(formatData(value)) .arg(formatType(m_namePool, type))); } else { - error(QtXmlPatterns::tr("%1 attribute of %2 element contains invalid content: {%3}") + error(QtXmlPatterns::tr("%1 attribute of %2 element contains invalid content: {%3}.") .arg(formatAttribute(attributeName)) .arg(formatElement(elementName)) .arg(formatData(value))); @@ -376,7 +376,7 @@ void XsdSchemaParser::parseSchema(ParserType parserType) const QString targetNamespace = readNamespaceAttribute(QString::fromLatin1("targetNamespace"), "schema"); if (m_targetNamespace != targetNamespace) { - error(QtXmlPatterns::tr("target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema") + error(QtXmlPatterns::tr("Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema.") .arg(formatURI(targetNamespace)).arg(formatURI(m_targetNamespace))); return; } @@ -390,7 +390,7 @@ void XsdSchemaParser::parseSchema(ParserType parserType) } if (m_targetNamespace != targetNamespace) { - error(QtXmlPatterns::tr("target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema") + error(QtXmlPatterns::tr("Target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema.") .arg(formatURI(targetNamespace)).arg(formatURI(m_targetNamespace))); return; } @@ -401,7 +401,7 @@ void XsdSchemaParser::parseSchema(ParserType parserType) const QString targetNamespace = readNamespaceAttribute(QString::fromLatin1("targetNamespace"), "schema"); if (m_targetNamespace != targetNamespace) { - error(QtXmlPatterns::tr("target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema") + error(QtXmlPatterns::tr("Target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema.") .arg(formatURI(targetNamespace)).arg(formatURI(m_targetNamespace))); return; } @@ -638,7 +638,7 @@ void XsdSchemaParser::parseImport() if (hasAttribute(QString::fromLatin1("namespace"))) { importNamespace = readAttribute(QString::fromLatin1("namespace")); if (importNamespace == m_targetNamespace) { - error(QtXmlPatterns::tr("%1 element is not allowed to have the same %2 attribute value as the target namespace %3") + error(QtXmlPatterns::tr("%1 element is not allowed to have the same %2 attribute value as the target namespace %3.") .arg(formatElement("import")) .arg(formatAttribute("namespace")) .arg(formatURI(m_targetNamespace))); @@ -646,7 +646,7 @@ void XsdSchemaParser::parseImport() } } else { if (m_targetNamespace.isEmpty()) { - error(QtXmlPatterns::tr("%1 element without %2 attribute is not allowed inside schema without target namespace") + error(QtXmlPatterns::tr("%1 element without %2 attribute is not allowed inside schema without target namespace.") .arg(formatElement("import")) .arg(formatAttribute("namespace"))); return; @@ -1479,7 +1479,7 @@ void XsdSchemaParser::parseSimpleRestriction(const XsdSimpleType::Ptr &ptr) ptr->addAnnotation(annotation); } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) { if (hasBaseAttribute) { - error(QtXmlPatterns::tr("%1 element is not allowed inside %2 element if %3 attribute is present") + error(QtXmlPatterns::tr("%1 element is not allowed inside %2 element if %3 attribute is present.") .arg(formatElement("simpleType")) .arg(formatElement("restriction")) .arg(formatAttribute("base"))); @@ -1540,7 +1540,7 @@ void XsdSchemaParser::parseSimpleRestriction(const XsdSimpleType::Ptr &ptr) } if (!hasBaseTypeSpecified) { - error(QtXmlPatterns::tr("%1 element has neither %2 attribute nor %3 child element") + error(QtXmlPatterns::tr("%1 element has neither %2 attribute nor %3 child element.") .arg(formatElement("restriction")) .arg(formatAttribute("base")) .arg(formatElement("simpleType"))); @@ -1637,7 +1637,7 @@ void XsdSchemaParser::parseList(const XsdSimpleType::Ptr &ptr) ptr->addAnnotation(annotation); } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) { if (hasItemTypeAttribute) { - error(QtXmlPatterns::tr("%1 element is not allowed inside %2 element if %3 attribute is present") + error(QtXmlPatterns::tr("%1 element is not allowed inside %2 element if %3 attribute is present.") .arg(formatElement("simpleType")) .arg(formatElement("list")) .arg(formatAttribute("itemType"))); @@ -1659,7 +1659,7 @@ void XsdSchemaParser::parseList(const XsdSimpleType::Ptr &ptr) } if (!hasItemTypeSpecified) { - error(QtXmlPatterns::tr("%1 element has neither %2 attribute nor %3 child element") + error(QtXmlPatterns::tr("%1 element has neither %2 attribute nor %3 child element.") .arg(formatElement("list")) .arg(formatAttribute("itemType")) .arg(formatElement("simpleType"))); @@ -1751,7 +1751,7 @@ void XsdSchemaParser::parseUnion(const XsdSimpleType::Ptr &ptr) } if (!hasMemberTypesSpecified) { - error(QtXmlPatterns::tr("%1 element has neither %2 attribute nor %3 child element") + error(QtXmlPatterns::tr("%1 element has neither %2 attribute nor %3 child element.") .arg(formatElement("union")) .arg(formatAttribute("memberTypes")) .arg(formatElement("simpleType"))); @@ -2586,7 +2586,7 @@ XsdComplexType::Ptr XsdSchemaParser::parseGlobalComplexType() complexType->addAnnotation(annotation); } else if (isSchemaTag(XsdSchemaToken::SimpleContent, token, namespaceToken)) { if (effectiveMixed) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("complexType")) .arg(formatElement("simpleContent")) .arg(formatAttribute("mixed"))); @@ -3588,7 +3588,7 @@ XsdModelGroup::Ptr XsdSchemaParser::parseAll(const NamedSchemaComponent::Ptr &pa particle->setTerm(term); if (particle->maximumOccursUnbounded() || particle->maximumOccurs() > 1) { - error(QtXmlPatterns::tr("%1 attribute of %2 element must be %3 or %4") + error(QtXmlPatterns::tr("%1 attribute of %2 element must be %3 or %4.") .arg(formatAttribute("maxOccurs")) .arg(formatElement("all")) .arg(formatData("0")) @@ -3624,14 +3624,14 @@ XsdModelGroup::Ptr XsdSchemaParser::parseLocalAll(const XsdParticle::Ptr &partic return modelGroup; } if (particle->maximumOccursUnbounded() || particle->maximumOccurs() != 1) { - error(QtXmlPatterns::tr("%1 attribute of %2 element must have a value of %3") + error(QtXmlPatterns::tr("%1 attribute of %2 element must have a value of %3.") .arg(formatAttribute("maxOccurs")) .arg(formatElement("all")) .arg(formatData("1"))); return modelGroup; } if (particle->minimumOccurs() != 0 && particle->minimumOccurs() != 1) { - error(QtXmlPatterns::tr("%1 attribute of %2 element must have a value of %3 or %4") + error(QtXmlPatterns::tr("%1 attribute of %2 element must have a value of %3 or %4.") .arg(formatAttribute("minOccurs")) .arg(formatElement("all")) .arg(formatData("0")) @@ -3665,7 +3665,7 @@ XsdModelGroup::Ptr XsdSchemaParser::parseLocalAll(const XsdParticle::Ptr &partic particle->setTerm(term); if (particle->maximumOccursUnbounded() || particle->maximumOccurs() > 1) { - error(QtXmlPatterns::tr("%1 attribute of %2 element must have a value of %3 or %4") + error(QtXmlPatterns::tr("%1 attribute of %2 element must have a value of %3 or %4.") .arg(formatAttribute("maxOccurs")) .arg(formatElement("all")) .arg(formatData("0")) @@ -3984,7 +3984,7 @@ XsdAttribute::Ptr XsdSchemaParser::parseGlobalAttribute() attribute->scope()->setVariety(XsdAttribute::Scope::Global); if (hasAttribute(QString::fromLatin1("default")) && hasAttribute(QString::fromLatin1("fixed"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("attribute")) .arg(formatAttribute("default")) .arg(formatAttribute("fixed"))); @@ -4011,14 +4011,14 @@ XsdAttribute::Ptr XsdSchemaParser::parseGlobalAttribute() (m_namePool->stringForLocalName(objectName.localName()) != QString::fromLatin1("schemaLocation")) && (m_namePool->stringForLocalName(objectName.localName()) != QString::fromLatin1("noNamespaceSchemaLocation"))) { - error(QtXmlPatterns::tr("content of %1 attribute of %2 element must not be from namespace %3") + error(QtXmlPatterns::tr("Content of %1 attribute of %2 element must not be from namespace %3.") .arg(formatAttribute("name")) .arg(formatElement("attribute")) .arg(formatURI(CommonNamespaces::XSI))); return attribute; } if (m_namePool->stringForLocalName(objectName.localName()) == QString::fromLatin1("xmlns")) { - error(QtXmlPatterns::tr("%1 attribute of %2 element must not be %3") + error(QtXmlPatterns::tr("%1 attribute of %2 element must not be %3.") .arg(formatAttribute("name")) .arg(formatElement("attribute")) .arg(formatData("xmlns"))); @@ -4060,7 +4060,7 @@ XsdAttribute::Ptr XsdSchemaParser::parseGlobalAttribute() attribute->addAnnotation(annotation); } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) { if (hasTypeAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("attribute")) .arg(formatElement("simpleType")) .arg(formatAttribute("type"))); @@ -4113,7 +4113,7 @@ XsdAttributeUse::Ptr XsdSchemaParser::parseLocalAttribute(const NamedSchemaCompo } if (hasAttribute(QString::fromLatin1("default")) && hasAttribute(QString::fromLatin1("fixed"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("attribute")) .arg(formatAttribute("default")) .arg(formatAttribute("fixed"))); @@ -4122,21 +4122,21 @@ XsdAttributeUse::Ptr XsdSchemaParser::parseLocalAttribute(const NamedSchemaCompo if (hasRefAttribute) { if (hasAttribute(QString::fromLatin1("form"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("attribute")) .arg(formatAttribute("ref")) .arg(formatAttribute("form"))); return attributeUse; } if (hasAttribute(QString::fromLatin1("name"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("attribute")) .arg(formatAttribute("ref")) .arg(formatAttribute("name"))); return attributeUse; } if (hasAttribute(QString::fromLatin1("type"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("attribute")) .arg(formatAttribute("ref")) .arg(formatAttribute("type"))); @@ -4176,7 +4176,7 @@ XsdAttributeUse::Ptr XsdSchemaParser::parseLocalAttribute(const NamedSchemaCompo attributeUse->setUseType(XsdAttributeUse::RequiredUse); if (attributeUse->valueConstraint() && attributeUse->valueConstraint()->variety() == XsdAttributeUse::ValueConstraint::Default && value != QString::fromLatin1("optional")) { - error(QtXmlPatterns::tr("%1 attribute of %2 element must have the value %3 because the %4 attribute is set") + error(QtXmlPatterns::tr("%1 attribute of %2 element must have the value %3 because the %4 attribute is set.") .arg(formatAttribute("use")) .arg(formatElement("attribute")) .arg(formatData("optional")) @@ -4233,14 +4233,14 @@ XsdAttributeUse::Ptr XsdSchemaParser::parseLocalAttribute(const NamedSchemaCompo (m_namePool->stringForLocalName(objectName.localName()) != QString::fromLatin1("schemaLocation")) && (m_namePool->stringForLocalName(objectName.localName()) != QString::fromLatin1("noNamespaceSchemaLocation"))) { - error(QtXmlPatterns::tr("content of %1 attribute of %2 element must not be from namespace %3") + error(QtXmlPatterns::tr("Content of %1 attribute of %2 element must not be from namespace %3.") .arg(formatAttribute("name")) .arg(formatElement("attribute")) .arg(formatURI(CommonNamespaces::XSI))); return attributeUse; } if (m_namePool->stringForLocalName(objectName.localName()) == QString::fromLatin1("xmlns")) { - error(QtXmlPatterns::tr("%1 attribute of %2 element must not be %3") + error(QtXmlPatterns::tr("%1 attribute of %2 element must not be %3.") .arg(formatAttribute("name")) .arg(formatElement("attribute")) .arg(formatData("xmlns"))); @@ -4292,14 +4292,14 @@ XsdAttributeUse::Ptr XsdSchemaParser::parseLocalAttribute(const NamedSchemaCompo attribute->addAnnotation(annotation); } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) { if (hasTypeAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("attribute")) .arg(formatElement("simpleType")) .arg(formatAttribute("type"))); break; } if (hasRefAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("attribute")) .arg(formatElement("simpleType")) .arg(formatAttribute("ref"))); @@ -4363,7 +4363,7 @@ XsdAttributeGroup::Ptr XsdSchemaParser::parseNamedAttributeGroup() const XsdAttributeUse::Ptr attributeUse = parseLocalAttribute(attributeGroup); if (attributeUse->useType() == XsdAttributeUse::ProhibitedUse) { - warning(QtXmlPatterns::tr("specifying use='prohibited' inside an attribute group has no effect")); + warning(QtXmlPatterns::tr("Specifying use='prohibited' inside an attribute group has no effect.")); } else { attributeGroup->addAttributeUse(attributeUse); } @@ -4463,7 +4463,7 @@ XsdElement::Ptr XsdSchemaParser::parseGlobalElement() } if (hasAttribute(QString::fromLatin1("default")) && hasAttribute(QString::fromLatin1("fixed"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("element")) .arg(formatAttribute("default")) .arg(formatAttribute("fixed"))); @@ -4559,7 +4559,7 @@ XsdElement::Ptr XsdSchemaParser::parseGlobalElement() element->addAnnotation(annotation); } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) { if (hasTypeAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("element")) .arg(formatElement("simpleType")) .arg(formatAttribute("type"))); @@ -4576,7 +4576,7 @@ XsdElement::Ptr XsdSchemaParser::parseGlobalElement() hasTypeSpecified = true; } else if (isSchemaTag(XsdSchemaToken::ComplexType, token, namespaceToken)) { if (hasTypeAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("element")) .arg(formatElement("complexType")) .arg(formatAttribute("type"))); @@ -4666,43 +4666,43 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle if (hasRefAttribute) { if (hasAttribute(QString::fromLatin1("name"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("element")) .arg(formatAttribute("ref")) .arg(formatAttribute("name"))); return term; } else if (hasAttribute(QString::fromLatin1("block"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("element")) .arg(formatAttribute("ref")) .arg(formatAttribute("block"))); return term; } else if (hasAttribute(QString::fromLatin1("nillable"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("element")) .arg(formatAttribute("ref")) .arg(formatAttribute("nillable"))); return term; } else if (hasAttribute(QString::fromLatin1("default"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("element")) .arg(formatAttribute("ref")) .arg(formatAttribute("default"))); return term; } else if (hasAttribute(QString::fromLatin1("fixed"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("element")) .arg(formatAttribute("ref")) .arg(formatAttribute("fixed"))); return term; } else if (hasAttribute(QString::fromLatin1("form"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("element")) .arg(formatAttribute("ref")) .arg(formatAttribute("form"))); return term; } else if (hasAttribute(QString::fromLatin1("type"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("element")) .arg(formatAttribute("ref")) .arg(formatAttribute("type"))); @@ -4716,7 +4716,7 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle } if (!hasAttribute(QString::fromLatin1("name")) && !hasAttribute(QString::fromLatin1("ref"))) { - error(QtXmlPatterns::tr("%1 element must have either %2 or %3 attribute") + error(QtXmlPatterns::tr("%1 element must have either %2 or %3 attribute.") .arg(formatElement("element")) .arg(formatAttribute("name")) .arg(formatAttribute("ref"))); @@ -4779,7 +4779,7 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle } if (hasAttribute(QString::fromLatin1("default")) && hasAttribute(QString::fromLatin1("fixed"))) { - error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together") + error(QtXmlPatterns::tr("%1 element must not have %2 and %3 attribute together.") .arg(formatElement("element")) .arg(formatAttribute("default")) .arg(formatAttribute("fixed"))); @@ -4834,13 +4834,13 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle element->addAnnotation(annotation); } else if (isSchemaTag(XsdSchemaToken::SimpleType, token, namespaceToken)) { if (hasRefAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("element")) .arg(formatElement("simpleType")) .arg(formatAttribute("ref"))); return term; } else if (hasTypeAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("element")) .arg(formatElement("simpleType")) .arg(formatAttribute("type"))); @@ -4857,13 +4857,13 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle hasTypeSpecified = true; } else if (isSchemaTag(XsdSchemaToken::ComplexType, token, namespaceToken)) { if (hasRefAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("element")) .arg(formatElement("complexType")) .arg(formatAttribute("ref"))); return term; } else if (hasTypeAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("element")) .arg(formatElement("complexType")) .arg(formatAttribute("type"))); @@ -4880,7 +4880,7 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle hasTypeSpecified = true; } else if (isSchemaTag(XsdSchemaToken::Alternative, token, namespaceToken)) { if (hasRefAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("element")) .arg(formatElement("alternative")) .arg(formatAttribute("ref"))); @@ -4891,7 +4891,7 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle alternatives.append(alternative); } else if (isSchemaTag(XsdSchemaToken::Unique, token, namespaceToken)) { if (hasRefAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("element")) .arg(formatElement("unique")) .arg(formatAttribute("ref"))); @@ -4902,7 +4902,7 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle element->addIdentityConstraint(constraint); } else if (isSchemaTag(XsdSchemaToken::Key, token, namespaceToken)) { if (hasRefAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("element")) .arg(formatElement("key")) .arg(formatAttribute("ref"))); @@ -4913,7 +4913,7 @@ XsdTerm::Ptr XsdSchemaParser::parseLocalElement(const XsdParticle::Ptr &particle element->addIdentityConstraint(constraint); } else if (isSchemaTag(XsdSchemaToken::Keyref, token, namespaceToken)) { if (hasRefAttribute) { - error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute") + error(QtXmlPatterns::tr("%1 element with %2 child element must not have a %3 attribute.") .arg(formatElement("element")) .arg(formatElement("keyref")) .arg(formatAttribute("ref"))); @@ -5270,7 +5270,7 @@ XsdAlternative::Ptr XsdSchemaParser::parseAlternative() tagValidator.finalize(); if (!hasTypeSpecified) { - error(QtXmlPatterns::tr("%1 element must have either %2 attribute or %3 or %4 as child element") + error(QtXmlPatterns::tr("%1 element must have either %2 attribute or %3 or %4 as child element.") .arg(formatElement("alternative")) .arg(formatAttribute("type")) .arg(formatElement("simpleType")) @@ -5325,7 +5325,7 @@ XsdNotation::Ptr XsdSchemaParser::parseNotation() } if (!hasOptionalAttribute) { - error(QtXmlPatterns::tr("%1 element requires either %2 or %3 attribute") + error(QtXmlPatterns::tr("%1 element requires either %2 or %3 attribute.") .arg(formatElement("notation")) .arg(formatAttribute("public")) .arg(formatAttribute("system"))); @@ -5344,7 +5344,7 @@ XsdNotation::Ptr XsdSchemaParser::parseNotation() if (isCharacters() || isEntityReference()) { if (!text().toString().trimmed().isEmpty()) { - error(QtXmlPatterns::tr("text or entity references not allowed inside %1 element").arg(formatElement("notation"))); + error(QtXmlPatterns::tr("Text or entity references not allowed inside %1 element").arg(formatElement("notation."))); return notation; } } @@ -5385,7 +5385,7 @@ XsdWildcard::Ptr XsdSchemaParser::parseAny(const XsdParticle::Ptr &particle) if (hasAttribute(QString::fromLatin1("namespace"))) { const QSet<QString> values = readAttribute(QString::fromLatin1("namespace")).split(QLatin1Char(' '), QString::SkipEmptyParts).toSet(); if ((values.contains(QString::fromLatin1("##any")) || values.contains(QString::fromLatin1("##other"))) && values.count() != 1) { - error(QtXmlPatterns::tr("%1 attribute of %2 element must contain %3, %4 or a list of URIs") + error(QtXmlPatterns::tr("%1 attribute of %2 element must contain %3, %4 or a list of URIs.") .arg(formatAttribute("namespace")) .arg(formatElement("any")) .arg(formatData("##any")) @@ -5497,7 +5497,7 @@ XsdWildcard::Ptr XsdSchemaParser::parseAnyAttribute() if (hasAttribute(QString::fromLatin1("namespace"))) { const QSet<QString> values = readAttribute(QString::fromLatin1("namespace")).split(QLatin1Char(' '), QString::SkipEmptyParts).toSet(); if ((values.contains(QString::fromLatin1("##any")) || values.contains(QString::fromLatin1("##other"))) && values.count() != 1) { - error(QtXmlPatterns::tr("%1 attribute of %2 element must contain %3, %4 or a list of URIs") + error(QtXmlPatterns::tr("%1 attribute of %2 element must contain %3, %4 or a list of URIs.") .arg(formatAttribute("namespace")) .arg(formatElement("anyAttribute")) .arg(formatData("##any")) @@ -5623,7 +5623,7 @@ void XsdSchemaParser::parseUnknown() m_namespaceSupport.pushContext(); m_namespaceSupport.setPrefixes(namespaceDeclarations()); - error(QtXmlPatterns::tr("%1 element is not allowed in this context").arg(formatElement(name().toString()))); + error(QtXmlPatterns::tr("%1 element is not allowed in this context.").arg(formatElement(name().toString()))); while (!atEnd()) { readNext(); @@ -5676,7 +5676,7 @@ bool XsdSchemaParser::parseMinMaxConstraint(const XsdParticle::Ptr &particle, co if (!particle->maximumOccursUnbounded()) { if (particle->maximumOccurs() < particle->minimumOccurs()) { - error(QtXmlPatterns::tr("%1 attribute of %2 element has larger value than %3 attribute") + error(QtXmlPatterns::tr("%1 attribute of %2 element has larger value than %3 attribute.") .arg(formatAttribute("minOccurs")) .arg(formatElement(elementName)) .arg(formatAttribute("maxOccurs"))); @@ -5701,7 +5701,7 @@ void XsdSchemaParser::convertName(const QString &qualifiedName, NamespaceSupport { bool result = m_namespaceSupport.processName(qualifiedName, type, name); if (!result) { - error(QtXmlPatterns::tr("prefix of qualified name %1 is not defined").arg(formatKeyword(qualifiedName))); + error(QtXmlPatterns::tr("Prefix of qualified name %1 is not defined.").arg(formatKeyword(qualifiedName))); } } @@ -5766,7 +5766,7 @@ SchemaType::DerivationConstraints XsdSchemaParser::readDerivationConstraintAttri } if ((value == QString::fromLatin1("#all")) && values.count() != 1) { - error(QtXmlPatterns::tr("%1 attribute of %2 element must either contain %3 or the other values") + error(QtXmlPatterns::tr("%1 attribute of %2 element must either contain %3 or the other values.") .arg(formatAttribute("final")) .arg(formatElement(elementName)) .arg(formatData("#all"))); @@ -5827,7 +5827,7 @@ NamedSchemaComponent::BlockingConstraints XsdSchemaParser::readBlockingConstrain } if ((value == QString::fromLatin1("#all")) && values.count() != 1) { - error(QtXmlPatterns::tr("%1 attribute of %2 element must either contain %3 or the other values") + error(QtXmlPatterns::tr("%1 attribute of %2 element must either contain %3 or the other values.") .arg(formatAttribute("block")) .arg(formatElement(elementName)) .arg(formatData("#all"))); @@ -5958,7 +5958,7 @@ void XsdSchemaParser::validateIdAttribute(const char *elementName) attributeContentError("id", elementName, value, BuiltinTypes::xsID); } else { if (m_idCache->hasId(value)) { - error(QtXmlPatterns::tr("component with id %1 has been defined previously").arg(formatData(value))); + error(QtXmlPatterns::tr("Component with id %1 has been defined previously.").arg(formatData(value))); } else { m_idCache->addId(value); } @@ -5975,7 +5975,7 @@ void XsdSchemaParser::addElement(const XsdElement::Ptr &element) { const QXmlName objectName = element->name(m_namePool); if (m_schema->element(objectName)) { - error(QtXmlPatterns::tr("element %1 already defined").arg(formatElement(m_namePool->displayName(objectName)))); + error(QtXmlPatterns::tr("Element %1 already defined.").arg(formatElement(m_namePool->displayName(objectName)))); } else { m_schema->addElement(element); m_componentLocationHash.insert(element, currentSourceLocation()); @@ -5986,7 +5986,7 @@ void XsdSchemaParser::addAttribute(const XsdAttribute::Ptr &attribute) { const QXmlName objectName = attribute->name(m_namePool); if (m_schema->attribute(objectName)) { - error(QtXmlPatterns::tr("attribute %1 already defined").arg(formatAttribute(m_namePool->displayName(objectName)))); + error(QtXmlPatterns::tr("Attribute %1 already defined.").arg(formatAttribute(m_namePool->displayName(objectName)))); } else { m_schema->addAttribute(attribute); m_componentLocationHash.insert(attribute, currentSourceLocation()); @@ -6001,7 +6001,7 @@ void XsdSchemaParser::addType(const SchemaType::Ptr &type) const QXmlName objectName = type->name(m_namePool); if (m_schema->type(objectName)) { - error(QtXmlPatterns::tr("type %1 already defined").arg(formatType(m_namePool, objectName))); + error(QtXmlPatterns::tr("Type %1 already defined.").arg(formatType(m_namePool, objectName))); } else { m_schema->addType(type); if (type->isSimpleType()) @@ -6024,7 +6024,7 @@ void XsdSchemaParser::addAttributeGroup(const XsdAttributeGroup::Ptr &group) { const QXmlName objectName = group->name(m_namePool); if (m_schema->attributeGroup(objectName)) { - error(QtXmlPatterns::tr("attribute group %1 already defined").arg(formatKeyword(m_namePool, objectName))); + error(QtXmlPatterns::tr("Attribute group %1 already defined.").arg(formatKeyword(m_namePool, objectName))); } else { m_schema->addAttributeGroup(group); m_componentLocationHash.insert(group, currentSourceLocation()); @@ -6035,7 +6035,7 @@ void XsdSchemaParser::addElementGroup(const XsdModelGroup::Ptr &group) { const QXmlName objectName = group->name(m_namePool); if (m_schema->elementGroup(objectName)) { - error(QtXmlPatterns::tr("element group %1 already defined").arg(formatKeyword(m_namePool, objectName))); + error(QtXmlPatterns::tr("Element group %1 already defined.").arg(formatKeyword(m_namePool, objectName))); } else { m_schema->addElementGroup(group); m_componentLocationHash.insert(group, currentSourceLocation()); @@ -6046,7 +6046,7 @@ void XsdSchemaParser::addNotation(const XsdNotation::Ptr ¬ation) { const QXmlName objectName = notation->name(m_namePool); if (m_schema->notation(objectName)) { - error(QtXmlPatterns::tr("notation %1 already defined").arg(formatKeyword(m_namePool, objectName))); + error(QtXmlPatterns::tr("Notation %1 already defined.").arg(formatKeyword(m_namePool, objectName))); } else { m_schema->addNotation(notation); m_componentLocationHash.insert(notation, currentSourceLocation()); @@ -6057,7 +6057,7 @@ void XsdSchemaParser::addIdentityConstraint(const XsdIdentityConstraint::Ptr &co { const QXmlName objectName = constraint->name(m_namePool); if (m_schema->identityConstraint(objectName)) { - error(QtXmlPatterns::tr("identity constraint %1 already defined").arg(formatKeyword(m_namePool, objectName))); + error(QtXmlPatterns::tr("Identity constraint %1 already defined.").arg(formatKeyword(m_namePool, objectName))); } else { m_schema->addIdentityConstraint(constraint); m_componentLocationHash.insert(constraint, currentSourceLocation()); @@ -6068,7 +6068,7 @@ void XsdSchemaParser::addFacet(const XsdFacet::Ptr &facet, XsdFacet::Hash &facet { // @see http://www.w3.org/TR/xmlschema-2/#src-single-facet-value if (facets.contains(facet->type())) { - error(QtXmlPatterns::tr("duplicated facets in simple type %1").arg(formatType(m_namePool, type))); + error(QtXmlPatterns::tr("Duplicated facets in simple type %1.").arg(formatType(m_namePool, type))); return; } diff --git a/src/xmlpatterns/schema/qxsdschemaresolver.cpp b/src/xmlpatterns/schema/qxsdschemaresolver.cpp index d71f482..3ec598d 100644 --- a/src/xmlpatterns/schema/qxsdschemaresolver.cpp +++ b/src/xmlpatterns/schema/qxsdschemaresolver.cpp @@ -351,7 +351,7 @@ void XsdSchemaResolver::resolveKeyReferences() const XsdIdentityConstraint::Ptr constraint = m_schema->identityConstraint(ref.reference); if (!constraint) { - m_context->error(QtXmlPatterns::tr("%1 references unknown %2 or %3 element %4") + m_context->error(QtXmlPatterns::tr("%1 references unknown %2 or %3 element %4.") .arg(formatKeyword(ref.keyRef->displayName(m_namePool))) .arg(formatElement("key")) .arg(formatElement("unique")) @@ -361,7 +361,7 @@ void XsdSchemaResolver::resolveKeyReferences() } if (constraint->category() != XsdIdentityConstraint::Key && constraint->category() != XsdIdentityConstraint::Unique) { // only key and unique can be referenced - m_context->error(QtXmlPatterns::tr("%1 references identity constraint %2 that is no %3 or %4 element") + m_context->error(QtXmlPatterns::tr("%1 references identity constraint %2 that is no %3 or %4 element.") .arg(formatKeyword(ref.keyRef->displayName(m_namePool))) .arg(formatKeyword(m_namePool, ref.reference)) .arg(formatElement("key")) @@ -371,7 +371,7 @@ void XsdSchemaResolver::resolveKeyReferences() } if (constraint->fields().count() != ref.keyRef->fields().count()) { - m_context->error(QtXmlPatterns::tr("%1 has a different number of fields from the identity constraint %2 that it references") + m_context->error(QtXmlPatterns::tr("%1 has a different number of fields from the identity constraint %2 that it references.") .arg(formatKeyword(ref.keyRef->displayName(m_namePool))) .arg(formatKeyword(m_namePool, ref.reference)), XsdSchemaContext::XSDError, ref.location); @@ -394,7 +394,7 @@ void XsdSchemaResolver::resolveSimpleRestrictionBaseTypes() // maybe it's a basic type... type = m_context->schemaTypeFactory()->createSchemaType(item.baseName); if (!type) { - m_context->error(QtXmlPatterns::tr("base type %1 of %2 element cannot be resolved") + m_context->error(QtXmlPatterns::tr("Base type %1 of %2 element cannot be resolved.") .arg(formatType(m_namePool, item.baseName)) .arg(formatElement("restriction")), XsdSchemaContext::XSDError, item.location); @@ -478,7 +478,7 @@ void XsdSchemaResolver::resolveSimpleListType() // maybe it's a basic type... type = m_context->schemaTypeFactory()->createSchemaType(item.typeName); if (!type) { - m_context->error(QtXmlPatterns::tr("item type %1 of %2 element cannot be resolved") + m_context->error(QtXmlPatterns::tr("Item type %1 of %2 element cannot be resolved.") .arg(formatType(m_namePool, item.typeName)) .arg(formatElement("list")), XsdSchemaContext::XSDError, item.location); @@ -509,7 +509,7 @@ void XsdSchemaResolver::resolveSimpleUnionTypes() // maybe it's a basic type... type = m_context->schemaTypeFactory()->createSchemaType(typeName); if (!type) { - m_context->error(QtXmlPatterns::tr("member type %1 of %2 element cannot be resolved") + m_context->error(QtXmlPatterns::tr("Member type %1 of %2 element cannot be resolved.") .arg(formatType(m_namePool, typeName)) .arg(formatElement("union")), XsdSchemaContext::XSDError, item.location); @@ -537,7 +537,7 @@ void XsdSchemaResolver::resolveElementTypes() // maybe it's a basic type... type = m_context->schemaTypeFactory()->createSchemaType(item.typeName); if (!type) { - m_context->error(QtXmlPatterns::tr("type %1 of %2 element cannot be resolved") + m_context->error(QtXmlPatterns::tr("Type %1 of %2 element cannot be resolved.") .arg(formatType(m_namePool, item.typeName)) .arg(formatElement("element")), XsdSchemaContext::XSDError, item.location); @@ -559,7 +559,7 @@ void XsdSchemaResolver::resolveComplexBaseTypes() // maybe it's a basic type... type = m_context->schemaTypeFactory()->createSchemaType(item.baseName); if (!type) { - m_context->error(QtXmlPatterns::tr("base type %1 of complex type cannot be resolved").arg(formatType(m_namePool, item.baseName)), XsdSchemaContext::XSDError, item.location); + m_context->error(QtXmlPatterns::tr("Base type %1 of complex type cannot be resolved.").arg(formatType(m_namePool, item.baseName)), XsdSchemaContext::XSDError, item.location); return; } } @@ -568,7 +568,7 @@ void XsdSchemaResolver::resolveComplexBaseTypes() if (type->isComplexType() && type->isDefinedBySchema()) { const XsdComplexType::Ptr baseType = type; if (baseType->contentType()->variety() != XsdComplexType::ContentType::Simple) { - m_context->error(QtXmlPatterns::tr("%1 cannot have complex base type that has a %2") + m_context->error(QtXmlPatterns::tr("%1 cannot have complex base type that has a %2.") .arg(formatElement("simpleContent")) .arg(formatElement("complexContent")), XsdSchemaContext::XSDError, item.location); @@ -847,13 +847,13 @@ void XsdSchemaResolver::resolveComplexContentComplexTypes(const XsdComplexType:: group->setCompositor(XsdModelGroup::SequenceCompositor); if (effectiveContent && effectiveContent->term()->isModelGroup() && XsdModelGroup::Ptr(effectiveContent->term())->compositor() == XsdModelGroup::AllCompositor) { - m_context->error(QtXmlPatterns::tr("content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type") + m_context->error(QtXmlPatterns::tr("Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type.") .arg(formatType(m_namePool, complexType)).arg(formatKeyword("all")), XsdSchemaContext::XSDError, sourceLocation(complexType)); return; } if (baseParticle && baseParticle->term()->isModelGroup() && XsdModelGroup::Ptr(baseParticle->term())->compositor() == XsdModelGroup::AllCompositor) { - m_context->error(QtXmlPatterns::tr("complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model") + m_context->error(QtXmlPatterns::tr("Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model.") .arg(formatType(m_namePool, complexType)) .arg(formatType(m_namePool, baseType)) .arg(formatKeyword("all")), XsdSchemaContext::XSDError, sourceLocation(complexType)); @@ -945,7 +945,7 @@ void XsdSchemaResolver::resolveAttributeTypes() // maybe it's a basic type... type = m_context->schemaTypeFactory()->createSchemaType(item.typeName); if (!type) { - m_context->error(QtXmlPatterns::tr("type %1 of %2 element cannot be resolved") + m_context->error(QtXmlPatterns::tr("Type %1 of %2 element cannot be resolved.") .arg(formatType(m_namePool, item.typeName)) .arg(formatElement("attribute")), XsdSchemaContext::XSDError, item.location); @@ -954,7 +954,7 @@ void XsdSchemaResolver::resolveAttributeTypes() } if (!type->isSimpleType() && type->category() != SchemaType::None) { - m_context->error(QtXmlPatterns::tr("type of %1 element must be a simple type, %2 is not") + m_context->error(QtXmlPatterns::tr("Type of %1 element must be a simple type, %2 is not.") .arg(formatElement("attribute")) .arg(formatType(m_namePool, item.typeName)), XsdSchemaContext::XSDError, item.location); @@ -975,7 +975,7 @@ void XsdSchemaResolver::resolveAlternativeTypes() // maybe it's a basic type... type = m_context->schemaTypeFactory()->createSchemaType(item.typeName); if (!type) { - m_context->error(QtXmlPatterns::tr("type %1 of %2 element cannot be resolved") + m_context->error(QtXmlPatterns::tr("Type %1 of %2 element cannot be resolved.") .arg(formatType(m_namePool, item.typeName)) .arg(formatElement("alternative")), XsdSchemaContext::XSDError, item.location); @@ -1016,7 +1016,7 @@ void XsdSchemaResolver::resolveSubstitutionGroupAffiliations() for (int j = 0; j < item.elementNames.count(); ++j) { const XsdElement::Ptr element = m_schema->element(item.elementNames.at(j)); if (!element) { - m_context->error(QtXmlPatterns::tr("substitution group %1 of %2 element cannot be resolved") + m_context->error(QtXmlPatterns::tr("Substitution group %1 of %2 element cannot be resolved.") .arg(formatKeyword(m_namePool, item.elementNames.at(j))) .arg(formatElement("element")), XsdSchemaContext::XSDError, item.location); @@ -1025,7 +1025,7 @@ void XsdSchemaResolver::resolveSubstitutionGroupAffiliations() // @see http://www.w3.org/TR/xmlschema11-1/#e-props-correct 5) if (hasCircularSubstitutionGroup(element, item.element, m_namePool)) { - m_context->error(QtXmlPatterns::tr("substitution group %1 has circular definition").arg(formatKeyword(m_namePool, item.elementNames.at(j))), XsdSchemaContext::XSDError, item.location); + m_context->error(QtXmlPatterns::tr("Substitution group %1 has circular definition.").arg(formatKeyword(m_namePool, item.elementNames.at(j))), XsdSchemaContext::XSDError, item.location); return; } @@ -1145,14 +1145,14 @@ void XsdSchemaResolver::resolveTermReference(const XsdParticle::Ptr &particle, Q if (element->name(m_namePool) == otherElement->name(m_namePool)) { if (modelGroup->compositor() == XsdModelGroup::AllCompositor) { - m_context->error(QtXmlPatterns::tr("duplicated element names %1 in %2 element") + m_context->error(QtXmlPatterns::tr("Duplicated element names %1 in %2 element.") .arg(formatKeyword(element->displayName(m_namePool))) .arg(formatElement("all")), XsdSchemaContext::XSDError, sourceLocation(modelGroup)); return; } else if (modelGroup->compositor() == XsdModelGroup::SequenceCompositor) { if (element->type() != otherElement->type()) { // not same variety - m_context->error(QtXmlPatterns::tr("duplicated element names %1 in %2 element") + m_context->error(QtXmlPatterns::tr("Duplicated element names %1 in %2 element.") .arg(formatKeyword(element->displayName(m_namePool))) .arg(formatElement("sequence")), XsdSchemaContext::XSDError, sourceLocation(modelGroup)); @@ -1181,7 +1181,7 @@ void XsdSchemaResolver::resolveTermReference(const XsdParticle::Ptr &particle, Q if (element) { particle->setTerm(element); } else { - m_context->error(QtXmlPatterns::tr("reference %1 of %2 element cannot be resolved") + m_context->error(QtXmlPatterns::tr("Reference %1 of %2 element cannot be resolved.") .arg(formatKeyword(m_namePool, reference->referenceName())) .arg(formatElement("element")), XsdSchemaContext::XSDError, reference->sourceLocation()); @@ -1194,7 +1194,7 @@ void XsdSchemaResolver::resolveTermReference(const XsdParticle::Ptr &particle, Q const XsdModelGroup::Ptr modelGroup = m_schema->elementGroup(reference->referenceName()); if (modelGroup) { if (visitedGroups.contains(modelGroup->name(m_namePool))) { - m_context->error(QtXmlPatterns::tr("circular group reference for %1").arg(formatKeyword(modelGroup->displayName(m_namePool))), + m_context->error(QtXmlPatterns::tr("Circular group reference for %1.").arg(formatKeyword(modelGroup->displayName(m_namePool))), XsdSchemaContext::XSDError, reference->sourceLocation()); } else { visitedGroups.insert(modelGroup->name(m_namePool)); @@ -1210,12 +1210,12 @@ void XsdSchemaResolver::resolveTermReference(const XsdParticle::Ptr &particle, Q if (modelGroup->compositor() == XsdModelGroup::AllCompositor) { if (m_allGroups.contains(reference)) { - m_context->error(QtXmlPatterns::tr("%1 element is not allowed in this scope").arg(formatElement("all")), + m_context->error(QtXmlPatterns::tr("%1 element is not allowed in this scope").arg(formatElement("all.")), XsdSchemaContext::XSDError, reference->sourceLocation()); return; } if (particle->maximumOccursUnbounded() || particle->maximumOccurs() != 1) { - m_context->error(QtXmlPatterns::tr("%1 element cannot have %2 attribute with value other than %3") + m_context->error(QtXmlPatterns::tr("%1 element cannot have %2 attribute with value other than %3.") .arg(formatElement("all")) .arg(formatAttribute("maxOccurs")) .arg(formatData("1")), @@ -1223,7 +1223,7 @@ void XsdSchemaResolver::resolveTermReference(const XsdParticle::Ptr &particle, Q return; } if (particle->minimumOccurs() != 0 && particle->minimumOccurs() != 1) { - m_context->error(QtXmlPatterns::tr("%1 element cannot have %2 attribute with value other than %3 or %4") + m_context->error(QtXmlPatterns::tr("%1 element cannot have %2 attribute with value other than %3 or %4.") .arg(formatElement("all")) .arg(formatAttribute("minOccurs")) .arg(formatData("0")) @@ -1233,7 +1233,7 @@ void XsdSchemaResolver::resolveTermReference(const XsdParticle::Ptr &particle, Q } } } else { - m_context->error(QtXmlPatterns::tr("reference %1 of %2 element cannot be resolved") + m_context->error(QtXmlPatterns::tr("Reference %1 of %2 element cannot be resolved.") .arg(formatKeyword(m_namePool, reference->referenceName())) .arg(formatElement("group")), XsdSchemaContext::XSDError, reference->sourceLocation()); @@ -1304,7 +1304,7 @@ XsdAttributeUse::List XsdSchemaResolver::resolveAttributeTermReferences(const Xs // lookup the real attribute const XsdAttribute::Ptr attribute = m_schema->attribute(reference->referenceName()); if (!attribute) { - m_context->error(QtXmlPatterns::tr("reference %1 of %2 element cannot be resolved") + m_context->error(QtXmlPatterns::tr("Reference %1 of %2 element cannot be resolved.") .arg(formatKeyword(m_namePool, reference->referenceName())) .arg(formatElement("attribute")), XsdSchemaContext::XSDError, reference->sourceLocation()); @@ -1314,7 +1314,7 @@ XsdAttributeUse::List XsdSchemaResolver::resolveAttributeTermReferences(const Xs // if both, reference and definition have a fixed or default value set, then they must be equal if (attribute->valueConstraint() && attributeUse->valueConstraint()) { if (attribute->valueConstraint()->value() != attributeUse->valueConstraint()->value()) { - m_context->error(QtXmlPatterns::tr("%1 or %2 attribute of reference %3 does not match with the attribute declaration %4") + m_context->error(QtXmlPatterns::tr("%1 or %2 attribute of reference %3 does not match with the attribute declaration %4.") .arg(formatAttribute("fixed")) .arg(formatAttribute("default")) .arg(formatKeyword(m_namePool, reference->referenceName())) @@ -1332,14 +1332,14 @@ XsdAttributeUse::List XsdSchemaResolver::resolveAttributeTermReferences(const Xs } else if (reference->type() == XsdAttributeReference::AttributeGroup) { const XsdAttributeGroup::Ptr attributeGroup = m_schema->attributeGroup(reference->referenceName()); if (!attributeGroup) { - m_context->error(QtXmlPatterns::tr("reference %1 of %2 element cannot be resolved") + m_context->error(QtXmlPatterns::tr("Reference %1 of %2 element cannot be resolved.") .arg(formatKeyword(m_namePool, reference->referenceName())) .arg(formatElement("attributeGroup")), XsdSchemaContext::XSDError, reference->sourceLocation()); return XsdAttributeUse::List(); } if (visitedAttributeGroups.contains(attributeGroup->name(m_namePool))) { - m_context->error(QtXmlPatterns::tr("attribute group %1 has circular reference").arg(formatKeyword(m_namePool, reference->referenceName())), + m_context->error(QtXmlPatterns::tr("Attribute group %1 has circular reference.").arg(formatKeyword(m_namePool, reference->referenceName())), XsdSchemaContext::XSDError, reference->sourceLocation()); return XsdAttributeUse::List(); } else { @@ -1470,7 +1470,7 @@ void XsdSchemaResolver::resolveAttributeInheritance(const XsdComplexType::Ptr &c // check if prohibited usage is violated if ((use->useType() == XsdAttributeUse::ProhibitedUse) && (currentUses.at(k)->useType() != XsdAttributeUse::ProhibitedUse)) { - m_context->error(QtXmlPatterns::tr("%1 attribute in %2 must have %3 use like in base type %4") + m_context->error(QtXmlPatterns::tr("%1 attribute in %2 must have %3 use like in base type %4.") .arg(formatAttribute(use->attribute()->displayName(m_namePool))) .arg(formatType(m_namePool, complexType)) .arg(formatData("prohibited")) @@ -1522,14 +1522,14 @@ void XsdSchemaResolver::resolveAttributeInheritance(const XsdComplexType::Ptr &c if (complexType->attributeWildcard()) { if (complexBaseType->attributeWildcard()) { if (!isValidWildcardRestriction(complexType->attributeWildcard(), complexBaseType->attributeWildcard())) { - m_context->error(QtXmlPatterns::tr("attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2") + m_context->error(QtXmlPatterns::tr("Attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2.") .arg(formatType(m_namePool, complexType)) .arg(formatType(m_namePool, complexBaseType)), XsdSchemaContext::XSDError, sourceLocation(complexType)); return; } } else { - m_context->error(QtXmlPatterns::tr("%1 has attribute wildcard but its base type %2 has not") + m_context->error(QtXmlPatterns::tr("%1 has attribute wildcard but its base type %2 has not.") .arg(formatType(m_namePool, complexType)) .arg(formatType(m_namePool, complexBaseType)), XsdSchemaContext::XSDError, sourceLocation(complexType)); @@ -1555,7 +1555,7 @@ void XsdSchemaResolver::resolveAttributeInheritance(const XsdComplexType::Ptr &c unionWildcard->setProcessContents(completeWildcard->processContents()); complexType->setAttributeWildcard(unionWildcard); // 2.2.2.3 } else { - m_context->error(QtXmlPatterns::tr("union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible") + m_context->error(QtXmlPatterns::tr("Union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible.") .arg(formatType(m_namePool, complexType)) .arg(formatType(m_namePool, complexBaseType)), XsdSchemaContext::XSDError, sourceLocation(complexType)); @@ -1603,7 +1603,7 @@ void XsdSchemaResolver::resolveEnumerationFacetValues() const QString qualifiedName = value->as<DerivedString<TypeString> >()->stringValue(); if (!XPathHelper::isQName(qualifiedName)) { - m_context->error(QtXmlPatterns::tr("enumeration facet contains invalid content: {%1} is not a value of type %2") + m_context->error(QtXmlPatterns::tr("Enumeration facet contains invalid content: {%1} is not a value of type %2.") .arg(formatData(qualifiedName)) .arg(formatType(m_namePool, BuiltinTypes::xsQName)), XsdSchemaContext::XSDError, sourceLocation(simpleType)); @@ -1613,7 +1613,7 @@ void XsdSchemaResolver::resolveEnumerationFacetValues() QXmlName qNameValue; bool result = support.processName(qualifiedName, NamespaceSupport::ElementName, qNameValue); if (!result) { - m_context->error(QtXmlPatterns::tr("namespace prefix of qualified name %1 is not defined").arg(formatData(qualifiedName)), + m_context->error(QtXmlPatterns::tr("Namespace prefix of qualified name %1 is not defined.").arg(formatData(qualifiedName)), XsdSchemaContext::XSDError, sourceLocation(simpleType)); return; } @@ -1664,7 +1664,7 @@ void XsdSchemaResolver::checkRedefinedGroups() // so that we can pass them to XsdParticleChecker::subsumes() QString errorMsg; if (!XsdParticleChecker::subsumes(particle, redefinedParticle, m_context, errorMsg)) { - m_context->error(QtXmlPatterns::tr("%1 element %2 is not a valid restriction of the %3 element it redefines: %4") + m_context->error(QtXmlPatterns::tr("%1 element %2 is not a valid restriction of the %3 element it redefines: %4.") .arg(formatElement("group")) .arg(formatData(item.redefinedGroup->displayName(m_namePool))) .arg(formatElement("group")) @@ -1682,7 +1682,7 @@ void XsdSchemaResolver::checkRedefinedAttributeGroups() QString errorMsg; if (!XsdSchemaHelper::isValidAttributeGroupRestriction(item.redefinedGroup, item.group, m_context, errorMsg)) { - m_context->error(QtXmlPatterns::tr("%1 element %2 is not a valid restriction of the %3 element it redefines: %4") + m_context->error(QtXmlPatterns::tr("%1 element %2 is not a valid restriction of the %3 element it redefines: %4.") .arg(formatElement("attributeGroup")) .arg(formatData(item.redefinedGroup->displayName(m_namePool))) .arg(formatElement("attributeGroup")) diff --git a/src/xmlpatterns/schema/qxsdtypechecker.cpp b/src/xmlpatterns/schema/qxsdtypechecker.cpp index 0d957b6..4eb10dc 100644 --- a/src/xmlpatterns/schema/qxsdtypechecker.cpp +++ b/src/xmlpatterns/schema/qxsdtypechecker.cpp @@ -230,14 +230,14 @@ bool XsdTypeChecker::isValidString(const QString &normalizedString, const AnySim // special QName check if (BuiltinTypes::xsQName->wxsTypeMatches(type)) { if (!XPathHelper::isQName(normalizedString)) { - errorMsg = QtXmlPatterns::tr("%1 is not valid according to %2").arg(formatData(normalizedString)).arg(formatType(m_namePool, type)); + errorMsg = QtXmlPatterns::tr("%1 is not valid according to %2.").arg(formatData(normalizedString)).arg(formatType(m_namePool, type)); return false; } } const AtomicValue::Ptr value = fromLexical(normalizedString, type, m_context, m_reflection); if (value->hasError()) { - errorMsg = QtXmlPatterns::tr("%1 is not valid according to %2").arg(formatData(normalizedString)).arg(formatType(m_namePool, type)); + errorMsg = QtXmlPatterns::tr("%1 is not valid according to %2.").arg(formatData(normalizedString)).arg(formatType(m_namePool, type)); return false; } @@ -258,7 +258,7 @@ bool XsdTypeChecker::isValidString(const QString &normalizedString, const AnySim const AtomicValue::Ptr value = fromLexical(normalizedString, targetType, m_context, m_reflection); if (value->hasError()) { - errorMsg = QtXmlPatterns::tr("%1 is not valid according to %2").arg(formatData(normalizedString)).arg(formatType(m_namePool, targetType)); + errorMsg = QtXmlPatterns::tr("%1 is not valid according to %2.").arg(formatData(normalizedString)).arg(formatType(m_namePool, targetType)); return false; } @@ -425,7 +425,7 @@ bool XsdTypeChecker::checkConstrainingFacetsString(const QString &value, const X const XsdFacet::Ptr facet = facets.value(XsdFacet::Length); const DerivedInteger<TypeNonNegativeInteger>::Ptr length = facet->value(); if (length->toInteger() != value.length()) { - errorMsg = QtXmlPatterns::tr("string content does not match the length facet"); + errorMsg = QtXmlPatterns::tr("String content does not match the length facet."); return false; } } @@ -433,7 +433,7 @@ bool XsdTypeChecker::checkConstrainingFacetsString(const QString &value, const X const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumLength); const DerivedInteger<TypeNonNegativeInteger>::Ptr length = facet->value(); if (length->toInteger() > value.length()) { - errorMsg = QtXmlPatterns::tr("string content does not match the minLength facet"); + errorMsg = QtXmlPatterns::tr("String content does not match the minLength facet."); return false; } } @@ -441,7 +441,7 @@ bool XsdTypeChecker::checkConstrainingFacetsString(const QString &value, const X const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumLength); const DerivedInteger<TypeNonNegativeInteger>::Ptr length = facet->value(); if (length->toInteger() < value.length()) { - errorMsg = QtXmlPatterns::tr("string content does not match the maxLength facet"); + errorMsg = QtXmlPatterns::tr("String content does not match the maxLength facet."); return false; } } @@ -459,7 +459,7 @@ bool XsdTypeChecker::checkConstrainingFacetsString(const QString &value, const X } if (!found) { - errorMsg = QtXmlPatterns::tr("string content does not match pattern facet"); + errorMsg = QtXmlPatterns::tr("String content does not match pattern facet."); return false; } } @@ -477,7 +477,7 @@ bool XsdTypeChecker::checkConstrainingFacetsString(const QString &value, const X } if (!found) { - errorMsg = QtXmlPatterns::tr("string content is not listed in the enumeration facet"); + errorMsg = QtXmlPatterns::tr("String content is not listed in the enumeration facet."); return false; } } @@ -494,7 +494,7 @@ bool XsdTypeChecker::checkConstrainingFacetsSignedInteger(long long value, const const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumInclusive); const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsLong, m_context, m_reflection); if (facetValue->toInteger() < value) { - errorMsg = QtXmlPatterns::tr("signed integer content does not match the maxInclusive facet"); + errorMsg = QtXmlPatterns::tr("Signed integer content does not match the maxInclusive facet."); return false; } } @@ -502,7 +502,7 @@ bool XsdTypeChecker::checkConstrainingFacetsSignedInteger(long long value, const const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumExclusive); const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsLong, m_context, m_reflection); if (facetValue->toInteger() <= value) { - errorMsg = QtXmlPatterns::tr("signed integer content does not match the maxExclusive facet"); + errorMsg = QtXmlPatterns::tr("Signed integer content does not match the maxExclusive facet."); return false; } } @@ -510,7 +510,7 @@ bool XsdTypeChecker::checkConstrainingFacetsSignedInteger(long long value, const const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumInclusive); const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsLong, m_context, m_reflection); if (facetValue->toInteger() > value) { - errorMsg = QtXmlPatterns::tr("signed integer content does not match the minInclusive facet"); + errorMsg = QtXmlPatterns::tr("Signed integer content does not match the minInclusive facet."); return false; } } @@ -518,7 +518,7 @@ bool XsdTypeChecker::checkConstrainingFacetsSignedInteger(long long value, const const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumExclusive); const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsLong, m_context, m_reflection); if (facetValue->toInteger() >= value) { - errorMsg = QtXmlPatterns::tr("signed integer content does not match the minExclusive facet"); + errorMsg = QtXmlPatterns::tr("Signed integer content does not match the minExclusive facet."); return false; } } @@ -536,7 +536,7 @@ bool XsdTypeChecker::checkConstrainingFacetsSignedInteger(long long value, const } if (!found) { - errorMsg = QtXmlPatterns::tr("signed integer content is not listed in the enumeration facet"); + errorMsg = QtXmlPatterns::tr("Signed integer content is not listed in the enumeration facet."); return false; } } @@ -554,7 +554,7 @@ bool XsdTypeChecker::checkConstrainingFacetsSignedInteger(long long value, const } if (!found) { - errorMsg = QtXmlPatterns::tr("signed integer content does not match pattern facet"); + errorMsg = QtXmlPatterns::tr("Signed integer content does not match pattern facet."); return false; } } @@ -563,7 +563,7 @@ bool XsdTypeChecker::checkConstrainingFacetsSignedInteger(long long value, const const DerivedInteger<TypePositiveInteger>::Ptr facetValue = facet->value(); if (totalDigitsForSignedLongLong(value) > facetValue->toInteger()) { - errorMsg = QtXmlPatterns::tr("signed integer content does not match in the totalDigits facet"); + errorMsg = QtXmlPatterns::tr("Signed integer content does not match in the totalDigits facet."); return false; } } @@ -580,7 +580,7 @@ bool XsdTypeChecker::checkConstrainingFacetsUnsignedInteger(unsigned long long v const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumInclusive); const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsUnsignedLong, m_context, m_reflection); if (facetValue->toUnsignedInteger() < value) { - errorMsg = QtXmlPatterns::tr("unsigned integer content does not match the maxInclusive facet"); + errorMsg = QtXmlPatterns::tr("Unsigned integer content does not match the maxInclusive facet."); return false; } } @@ -588,7 +588,7 @@ bool XsdTypeChecker::checkConstrainingFacetsUnsignedInteger(unsigned long long v const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumExclusive); const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsUnsignedLong, m_context, m_reflection); if (facetValue->toUnsignedInteger() <= value) { - errorMsg = QtXmlPatterns::tr("unsigned integer content does not match the maxExclusive facet"); + errorMsg = QtXmlPatterns::tr("Unsigned integer content does not match the maxExclusive facet."); return false; } } @@ -596,7 +596,7 @@ bool XsdTypeChecker::checkConstrainingFacetsUnsignedInteger(unsigned long long v const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumInclusive); const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsUnsignedLong, m_context, m_reflection); if (facetValue->toUnsignedInteger() > value) { - errorMsg = QtXmlPatterns::tr("unsigned integer content does not match the minInclusive facet"); + errorMsg = QtXmlPatterns::tr("Unsigned integer content does not match the minInclusive facet."); return false; } } @@ -604,7 +604,7 @@ bool XsdTypeChecker::checkConstrainingFacetsUnsignedInteger(unsigned long long v const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumExclusive); const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsUnsignedLong, m_context, m_reflection); if (facetValue->toUnsignedInteger() >= value) { - errorMsg = QtXmlPatterns::tr("unsigned integer content does not match the minExclusive facet"); + errorMsg = QtXmlPatterns::tr("Unsigned integer content does not match the minExclusive facet."); return false; } } @@ -622,7 +622,7 @@ bool XsdTypeChecker::checkConstrainingFacetsUnsignedInteger(unsigned long long v } if (!found) { - errorMsg = QtXmlPatterns::tr("unsigned integer content is not listed in the enumeration facet"); + errorMsg = QtXmlPatterns::tr("Unsigned integer content is not listed in the enumeration facet."); return false; } } @@ -640,7 +640,7 @@ bool XsdTypeChecker::checkConstrainingFacetsUnsignedInteger(unsigned long long v } if (!found) { - errorMsg = QtXmlPatterns::tr("unsigned integer content does not match pattern facet"); + errorMsg = QtXmlPatterns::tr("Unsigned integer content does not match pattern facet."); return false; } } @@ -649,7 +649,7 @@ bool XsdTypeChecker::checkConstrainingFacetsUnsignedInteger(unsigned long long v const DerivedInteger<TypePositiveInteger>::Ptr facetValue = facet->value(); if (totalDigitsForUnsignedLongLong(value) > facetValue->toInteger()) { - errorMsg = QtXmlPatterns::tr("unsigned integer content does not match in the totalDigits facet"); + errorMsg = QtXmlPatterns::tr("Unsigned integer content does not match in the totalDigits facet."); return false; } } @@ -666,7 +666,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDouble(double value, const QString & const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumInclusive); const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsDouble, m_context, m_reflection); if (facetValue->toDouble() < value) { - errorMsg = QtXmlPatterns::tr("double content does not match the maxInclusive facet"); + errorMsg = QtXmlPatterns::tr("Double content does not match the maxInclusive facet."); return false; } } @@ -674,7 +674,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDouble(double value, const QString & const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumExclusive); const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsDouble, m_context, m_reflection); if (facetValue->toDouble() <= value) { - errorMsg = QtXmlPatterns::tr("double content does not match the maxExclusive facet"); + errorMsg = QtXmlPatterns::tr("Double content does not match the maxExclusive facet."); return false; } } @@ -682,7 +682,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDouble(double value, const QString & const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumInclusive); const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsDouble, m_context, m_reflection); if (facetValue->toDouble() > value) { - errorMsg = QtXmlPatterns::tr("double content does not match the minInclusive facet"); + errorMsg = QtXmlPatterns::tr("Double content does not match the minInclusive facet."); return false; } } @@ -690,7 +690,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDouble(double value, const QString & const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumExclusive); const Numeric::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), BuiltinTypes::xsDouble, m_context, m_reflection); if (facetValue->toDouble() >= value) { - errorMsg = QtXmlPatterns::tr("double content does not match the minExclusive facet"); + errorMsg = QtXmlPatterns::tr("Double content does not match the minExclusive facet."); return false; } } @@ -708,7 +708,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDouble(double value, const QString & } if (!found) { - errorMsg = QtXmlPatterns::tr("double content is not listed in the enumeration facet"); + errorMsg = QtXmlPatterns::tr("Double content is not listed in the enumeration facet."); return false; } } @@ -726,7 +726,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDouble(double value, const QString & } if (!found) { - errorMsg = QtXmlPatterns::tr("double content does not match pattern facet"); + errorMsg = QtXmlPatterns::tr("Double content does not match pattern facet."); return false; } } @@ -744,7 +744,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDecimal(const AtomicValue::Ptr &valu const DerivedInteger<TypePositiveInteger>::Ptr facetValue = facet->value(); if (fractionDigitsForDecimal(lexicalValue) > facetValue->toInteger()) { - errorMsg = QtXmlPatterns::tr("decimal content does not match in the fractionDigits facet"); + errorMsg = QtXmlPatterns::tr("Decimal content does not match in the fractionDigits facet."); return false; } } @@ -753,7 +753,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDecimal(const AtomicValue::Ptr &valu const DerivedInteger<TypePositiveInteger>::Ptr facetValue = facet->value(); if (totalDigitsForDecimal(lexicalValue) > facetValue->toInteger()) { - errorMsg = QtXmlPatterns::tr("decimal content does not match in the totalDigits facet"); + errorMsg = QtXmlPatterns::tr("Decimal content does not match in the totalDigits facet."); return false; } } @@ -767,7 +767,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDateTime(const QDateTime &value, con const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumInclusive); const AbstractDateTime::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), type, m_context, m_reflection); if (facetValue->toDateTime() < value) { - errorMsg = QtXmlPatterns::tr("date time content does not match the maxInclusive facet"); + errorMsg = QtXmlPatterns::tr("Date time content does not match the maxInclusive facet."); return false; } } @@ -775,7 +775,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDateTime(const QDateTime &value, con const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumExclusive); const AbstractDateTime::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), type, m_context, m_reflection); if (facetValue->toDateTime() <= value) { - errorMsg = QtXmlPatterns::tr("date time content does not match the maxExclusive facet"); + errorMsg = QtXmlPatterns::tr("Date time content does not match the maxExclusive facet."); return false; } } @@ -783,7 +783,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDateTime(const QDateTime &value, con const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumInclusive); const AbstractDateTime::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), type, m_context, m_reflection); if (facetValue->toDateTime() > value) { - errorMsg = QtXmlPatterns::tr("date time content does not match the minInclusive facet"); + errorMsg = QtXmlPatterns::tr("Date time content does not match the minInclusive facet."); return false; } } @@ -791,7 +791,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDateTime(const QDateTime &value, con const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumExclusive); const AbstractDateTime::Ptr facetValue = ValueFactory::fromLexical(facet->value()->as<DerivedString<TypeString> >()->stringValue(), type, m_context, m_reflection); if (facetValue->toDateTime() >= value) { - errorMsg = QtXmlPatterns::tr("date time content does not match the minExclusive facet"); + errorMsg = QtXmlPatterns::tr("Date time content does not match the minExclusive facet."); return false; } } @@ -809,7 +809,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDateTime(const QDateTime &value, con } if (!found) { - errorMsg = QtXmlPatterns::tr("date time content is not listed in the enumeration facet"); + errorMsg = QtXmlPatterns::tr("Date time content is not listed in the enumeration facet."); return false; } } @@ -827,7 +827,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDateTime(const QDateTime &value, con } if (!found) { - errorMsg = QtXmlPatterns::tr("date time content does not match pattern facet"); + errorMsg = QtXmlPatterns::tr("Date time content does not match pattern facet."); return false; } } @@ -842,7 +842,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDuration(const AtomicValue::Ptr&, co const DerivedString<TypeString>::Ptr value = DerivedString<TypeString>::fromLexical(m_namePool, lexicalValue); if (XsdSchemaHelper::constructAndCompare(facets.value(XsdFacet::MaximumInclusive)->value(), AtomicComparator::OperatorLessThan, value, BuiltinTypes::xsDuration, m_context, m_reflection)) { - errorMsg = QtXmlPatterns::tr("duration content does not match the maxInclusive facet"); + errorMsg = QtXmlPatterns::tr("Duration content does not match the maxInclusive facet."); return false; } } @@ -851,7 +851,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDuration(const AtomicValue::Ptr&, co const DerivedString<TypeString>::Ptr value = DerivedString<TypeString>::fromLexical(m_namePool, lexicalValue); if (XsdSchemaHelper::constructAndCompare(facets.value(XsdFacet::MaximumExclusive)->value(), AtomicComparator::OperatorLessOrEqual, value, BuiltinTypes::xsDuration, m_context, m_reflection)) { - errorMsg = QtXmlPatterns::tr("duration content does not match the maxExclusive facet"); + errorMsg = QtXmlPatterns::tr("Duration content does not match the maxExclusive facet."); return false; } } @@ -860,7 +860,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDuration(const AtomicValue::Ptr&, co const DerivedString<TypeString>::Ptr value = DerivedString<TypeString>::fromLexical(m_namePool, lexicalValue); if (XsdSchemaHelper::constructAndCompare(facets.value(XsdFacet::MinimumInclusive)->value(), AtomicComparator::OperatorGreaterThan, value, BuiltinTypes::xsDuration, m_context, m_reflection)) { - errorMsg = QtXmlPatterns::tr("duration content does not match the minInclusive facet"); + errorMsg = QtXmlPatterns::tr("Duration content does not match the minInclusive facet."); return false; } } @@ -869,7 +869,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDuration(const AtomicValue::Ptr&, co const DerivedString<TypeString>::Ptr value = DerivedString<TypeString>::fromLexical(m_namePool, lexicalValue); if (XsdSchemaHelper::constructAndCompare(facets.value(XsdFacet::MinimumExclusive)->value(), AtomicComparator::OperatorGreaterOrEqual, value, BuiltinTypes::xsDuration, m_context, m_reflection)) { - errorMsg = QtXmlPatterns::tr("duration content does not match the minExclusive facet"); + errorMsg = QtXmlPatterns::tr("Duration content does not match the minExclusive facet."); return false; } } @@ -887,7 +887,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDuration(const AtomicValue::Ptr&, co } if (!found) { - errorMsg = QtXmlPatterns::tr("duration content is not listed in the enumeration facet"); + errorMsg = QtXmlPatterns::tr("Duration content is not listed in the enumeration facet."); return false; } } @@ -905,7 +905,7 @@ bool XsdTypeChecker::checkConstrainingFacetsDuration(const AtomicValue::Ptr&, co } if (!found) { - errorMsg = QtXmlPatterns::tr("duration content does not match pattern facet"); + errorMsg = QtXmlPatterns::tr("Duration content does not match pattern facet."); return false; } } @@ -932,7 +932,7 @@ bool XsdTypeChecker::checkConstrainingFacetsBoolean(bool, const QString &lexical } if (!found) { - errorMsg = QtXmlPatterns::tr("boolean content does not match pattern facet"); + errorMsg = QtXmlPatterns::tr("Boolean content does not match pattern facet."); return false; } } @@ -949,7 +949,7 @@ bool XsdTypeChecker::checkConstrainingFacetsBinary(const QByteArray &value, cons const XsdFacet::Ptr facet = facets.value(XsdFacet::Length); const DerivedInteger<TypeNonNegativeInteger>::Ptr length = facet->value(); if (length->toInteger() != value.length()) { - errorMsg = QtXmlPatterns::tr("binary content does not match the length facet"); + errorMsg = QtXmlPatterns::tr("Binary content does not match the length facet."); return false; } } @@ -957,7 +957,7 @@ bool XsdTypeChecker::checkConstrainingFacetsBinary(const QByteArray &value, cons const XsdFacet::Ptr facet = facets.value(XsdFacet::MinimumLength); const DerivedInteger<TypeNonNegativeInteger>::Ptr length = facet->value(); if (length->toInteger() > value.length()) { - errorMsg = QtXmlPatterns::tr("binary content does not match the minLength facet"); + errorMsg = QtXmlPatterns::tr("Binary content does not match the minLength facet."); return false; } } @@ -965,7 +965,7 @@ bool XsdTypeChecker::checkConstrainingFacetsBinary(const QByteArray &value, cons const XsdFacet::Ptr facet = facets.value(XsdFacet::MaximumLength); const DerivedInteger<TypeNonNegativeInteger>::Ptr length = facet->value(); if (length->toInteger() < value.length()) { - errorMsg = QtXmlPatterns::tr("binary content does not match the maxLength facet"); + errorMsg = QtXmlPatterns::tr("Binary content does not match the maxLength facet."); return false; } } @@ -983,7 +983,7 @@ bool XsdTypeChecker::checkConstrainingFacetsBinary(const QByteArray &value, cons } if (!found) { - errorMsg = QtXmlPatterns::tr("binary content is not listed in the enumeration facet"); + errorMsg = QtXmlPatterns::tr("Binary content is not listed in the enumeration facet."); return false; } } @@ -1010,7 +1010,7 @@ bool XsdTypeChecker::checkConstrainingFacetsQName(const QXmlName &value, const Q } if (facets.contains(XsdFacet::Enumeration)) { if (!XPathHelper::isQName(lexicalValue)) { - errorMsg = QtXmlPatterns::tr("invalid QName content: %1").arg(formatData(lexicalValue)); + errorMsg = QtXmlPatterns::tr("Invalid QName content: %1.").arg(formatData(lexicalValue)); return false; } @@ -1027,7 +1027,7 @@ bool XsdTypeChecker::checkConstrainingFacetsQName(const QXmlName &value, const Q } if (!found) { - errorMsg = QtXmlPatterns::tr("QName content is not listed in the enumeration facet"); + errorMsg = QtXmlPatterns::tr("QName content is not listed in the enumeration facet."); return false; } } @@ -1045,7 +1045,7 @@ bool XsdTypeChecker::checkConstrainingFacetsQName(const QXmlName &value, const Q } if (!found) { - errorMsg = QtXmlPatterns::tr("QName content does not match pattern facet"); + errorMsg = QtXmlPatterns::tr("QName content does not match pattern facet."); return false; } } @@ -1081,7 +1081,7 @@ bool XsdTypeChecker::checkConstrainingFacetsNotation(const QXmlName &value, cons } if (!found) { - errorMsg = QtXmlPatterns::tr("notation content is not listed in the enumeration facet"); + errorMsg = QtXmlPatterns::tr("Notation content is not listed in the enumeration facet."); return false; } } @@ -1100,21 +1100,21 @@ bool XsdTypeChecker::checkConstrainingFacetsList(const QStringList &values, cons if (facets.contains(XsdFacet::Length)) { const DerivedInteger<TypeNonNegativeInteger>::Ptr value = facets.value(XsdFacet::Length)->value(); if (value->toInteger() != values.count()) { - errorMsg = QtXmlPatterns::tr("list content does not match length facet"); + errorMsg = QtXmlPatterns::tr("List content does not match length facet."); return false; } } if (facets.contains(XsdFacet::MinimumLength)) { const DerivedInteger<TypeNonNegativeInteger>::Ptr value = facets.value(XsdFacet::MinimumLength)->value(); if (value->toInteger() > values.count()) { - errorMsg = QtXmlPatterns::tr("list content does not match minLength facet"); + errorMsg = QtXmlPatterns::tr("List content does not match minLength facet."); return false; } } if (facets.contains(XsdFacet::MaximumLength)) { const DerivedInteger<TypeNonNegativeInteger>::Ptr value = facets.value(XsdFacet::MaximumLength)->value(); if (value->toInteger() < values.count()) { - errorMsg = QtXmlPatterns::tr("list content does not match maxLength facet"); + errorMsg = QtXmlPatterns::tr("List content does not match maxLength facet."); return false; } } @@ -1204,7 +1204,7 @@ bool XsdTypeChecker::checkConstrainingFacetsList(const QStringList &values, cons } if (!found) { - errorMsg = QtXmlPatterns::tr("list content is not listed in the enumeration facet"); + errorMsg = QtXmlPatterns::tr("List content is not listed in the enumeration facet."); return false; } } @@ -1222,7 +1222,7 @@ bool XsdTypeChecker::checkConstrainingFacetsList(const QStringList &values, cons } if (!found) { - errorMsg = QtXmlPatterns::tr("list content does not match pattern facet"); + errorMsg = QtXmlPatterns::tr("List content does not match pattern facet."); return false; } } @@ -1261,7 +1261,7 @@ bool XsdTypeChecker::checkConstrainingFacetsUnion(const QString &value, const QS } if (!found) { - errorMsg = QtXmlPatterns::tr("union content is not listed in the enumeration facet"); + errorMsg = QtXmlPatterns::tr("Union content is not listed in the enumeration facet."); return false; } } @@ -1279,7 +1279,7 @@ bool XsdTypeChecker::checkConstrainingFacetsUnion(const QString &value, const QS } if (!found) { - errorMsg = QtXmlPatterns::tr("union content does not match pattern facet"); + errorMsg = QtXmlPatterns::tr("Union content does not match pattern facet."); return false; } } @@ -1294,7 +1294,7 @@ AtomicValue::Ptr XsdTypeChecker::fromLexical(const QString &value, const SchemaT { if (type->name(m_namePool) == BuiltinTypes::xsNOTATION->name(m_namePool) || type->name(m_namePool) == BuiltinTypes::xsQName->name(m_namePool)) { if (value.simplified().isEmpty()) - return ValidationError::createError(QtXmlPatterns::tr("data of type %1 are not allowed to be empty").arg(formatType(m_namePool, BuiltinTypes::xsNOTATION))); + return ValidationError::createError(QtXmlPatterns::tr("Data of type %1 are not allowed to be empty.").arg(formatType(m_namePool, BuiltinTypes::xsNOTATION))); const QXmlName valueName = convertToQName(value); return QNameValue::fromValue(m_namePool, valueName); diff --git a/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp b/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp index 0980777..7552c41 100644 --- a/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp +++ b/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp @@ -157,7 +157,7 @@ bool XsdValidatingInstanceReader::read() if (!m_stateMachines.isEmpty() && hasStateMachine) { if (!m_stateMachines.top().inEndState()) { - error(QtXmlPatterns::tr("element %1 is missing child element").arg(formatKeyword(m_namePool->displayName(elementName)))); + error(QtXmlPatterns::tr("Element %1 is missing child element.").arg(formatKeyword(m_namePool->displayName(elementName)))); return false; } m_stateMachines.pop(); @@ -173,7 +173,7 @@ bool XsdValidatingInstanceReader::read() while (it.hasNext()) { const QString id = it.next(); if (!ids.contains(id)) { - error(QtXmlPatterns::tr("there is one IDREF value with no corresponding ID: %1").arg(formatKeyword(id))); + error(QtXmlPatterns::tr("There is one IDREF value with no corresponding ID: %1.").arg(formatKeyword(id))); return false; } } @@ -200,7 +200,7 @@ bool XsdValidatingInstanceReader::loadSchema(const QString &targetNamespace, con QXmlSchemaPrivate schema(context); schema.load(reply.data(), location, targetNamespace); if (!schema.isValid()) { - error(QtXmlPatterns::tr("loaded schema file is invalid")); + error(QtXmlPatterns::tr("Loaded schema file is invalid.")); return false; } @@ -216,7 +216,7 @@ bool XsdValidatingInstanceReader::validate(bool &hasStateMachine, XsdElement::Pt const QString schemaLocation = attribute(m_xsiSchemaLocationName); const QStringList parts = schemaLocation.split(QLatin1Char(' '), QString::SkipEmptyParts); if ((parts.count()%2) == 1) { - error(QtXmlPatterns::tr("%1 contains invalid data").arg(formatKeyword(m_namePool, m_xsiSchemaLocationName))); + error(QtXmlPatterns::tr("%1 contains invalid data.").arg(formatKeyword(m_namePool, m_xsiSchemaLocationName))); return false; } @@ -229,7 +229,7 @@ bool XsdValidatingInstanceReader::validate(bool &hasStateMachine, XsdElement::Pt // check constraint 4) from http://www.w3.org/TR/xmlschema-1/#schema-loc (only valid for XML Schema 1.0?) if (m_processedNamespaces.contains(parts.at(i))) { - error(QtXmlPatterns::tr("xsi:schemaLocation namespace %1 has already appeared earlier in the instance document").arg(formatKeyword(parts.at(i)))); + error(QtXmlPatterns::tr("xsi:schemaLocation namespace %1 has already appeared earlier in the instance document.").arg(formatKeyword(parts.at(i)))); return false; } @@ -251,7 +251,7 @@ bool XsdValidatingInstanceReader::validate(bool &hasStateMachine, XsdElement::Pt m_processedSchemaLocations.insert(schemaLocation); if (m_processedNamespaces.contains(QString())) { - error(QtXmlPatterns::tr("xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute")); + error(QtXmlPatterns::tr("xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute.")); return false; } @@ -269,7 +269,7 @@ bool XsdValidatingInstanceReader::validate(bool &hasStateMachine, XsdElement::Pt m_processedNamespaces.insert(m_namePool->stringForNamespace(name().namespaceURI())); if (!m_schema) { - error(QtXmlPatterns::tr("no schema defined for validation")); + error(QtXmlPatterns::tr("No schema defined for validation.")); return false; } @@ -279,7 +279,7 @@ bool XsdValidatingInstanceReader::validate(bool &hasStateMachine, XsdElement::Pt XsdElement::Ptr element = elementByName(name()); if (!element) { if (!hasAttribute(m_xsiTypeName)) { - error(QtXmlPatterns::tr("no definition for element %1 available").arg(formatKeyword(m_namePool, name()))); + error(QtXmlPatterns::tr("No definition for element %1 available.").arg(formatKeyword(m_namePool, name()))); return false; } @@ -297,7 +297,7 @@ bool XsdValidatingInstanceReader::validate(bool &hasStateMachine, XsdElement::Pt const SchemaType::Ptr elementType = typeByName(typeName); if (!elementType) { - error(QtXmlPatterns::tr("specified type %1 is not known to the schema").arg(formatType(m_namePool, typeName))); + error(QtXmlPatterns::tr("Specified type %1 is not known to the schema.").arg(formatType(m_namePool, typeName))); return false; } element->setType(elementType); @@ -312,7 +312,7 @@ bool XsdValidatingInstanceReader::validate(bool &hasStateMachine, XsdElement::Pt } else { if (!m_stateMachines.top().proceed<QXmlName>(name())) { - error(QtXmlPatterns::tr("element %1 is not defined in this scope").arg(formatKeyword(m_namePool, name()))); + error(QtXmlPatterns::tr("Element %1 is not defined in this scope.").arg(formatKeyword(m_namePool, name()))); return false; } @@ -346,7 +346,7 @@ bool XsdValidatingInstanceReader::validate(bool &hasStateMachine, XsdElement::Pt const SchemaType::Ptr elementType = typeByName(typeName); if (!elementType) { - error(QtXmlPatterns::tr("specified type %1 is not known to the schema").arg(formatType(m_namePool, typeName))); + error(QtXmlPatterns::tr("Specified type %1 is not known to the schema.").arg(formatType(m_namePool, typeName))); return false; } elementDeclaration->setType(elementType); @@ -355,7 +355,7 @@ bool XsdValidatingInstanceReader::validate(bool &hasStateMachine, XsdElement::Pt if (!elementDeclaration) { if (wildcard->processContents() == XsdWildcard::Strict) { - error(QtXmlPatterns::tr("declaration for element %1 does not exist").arg(formatKeyword(m_namePool->displayName(name())))); + error(QtXmlPatterns::tr("Declaration for element %1 does not exist.").arg(formatKeyword(m_namePool->displayName(name())))); return false; } else { // in this case we put a state machine for the xs:anyType on the statemachine stack, @@ -367,7 +367,7 @@ bool XsdValidatingInstanceReader::validate(bool &hasStateMachine, XsdElement::Pt } else { if (!validateElement(elementDeclaration, hasStateMachine)) { if (wildcard->processContents() == XsdWildcard::Strict) { - error(QtXmlPatterns::tr("element %1 contains invalid content").arg(formatKeyword(m_namePool->displayName(name())))); + error(QtXmlPatterns::tr("Element %1 contains invalid content.").arg(formatKeyword(m_namePool->displayName(name())))); return false; } } @@ -440,14 +440,14 @@ bool XsdValidatingInstanceReader::validateElement(const XsdElement::Ptr &declara // 2 if (declaration->isAbstract()) { - error(QtXmlPatterns::tr("element %1 is declared as abstract").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Element %1 is declared as abstract.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } // 3 if (!declaration->isNillable()) { if (hasAttribute(m_xsiNilName)) { - error(QtXmlPatterns::tr("element %1 is not nillable").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Element %1 is not nillable.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; // 3.1 } } else { @@ -455,7 +455,7 @@ bool XsdValidatingInstanceReader::validateElement(const XsdElement::Ptr &declara const QString value = attribute(m_xsiNilName); const Boolean::Ptr nil = Boolean::fromLexical(value); if (nil->hasError()) { - error(QtXmlPatterns::tr("attribute %1 contains invalid data: %2").arg(formatKeyword(QLatin1String("nil"))).arg(formatData(value))); + error(QtXmlPatterns::tr("Attribute %1 contains invalid data: %2").arg(formatKeyword(QLatin1String("nil."))).arg(formatData(value))); return false; } @@ -463,13 +463,13 @@ bool XsdValidatingInstanceReader::validateElement(const XsdElement::Ptr &declara if (nil->as<Boolean>()->value() == true) { // 3.2.3.1 if (hasChildElement() || hasChildText()) { - error(QtXmlPatterns::tr("element contains content although it is nillable")); + error(QtXmlPatterns::tr("Element contains content although it is nillable.")); return false; } // 3.2.3.2 if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) { - error(QtXmlPatterns::tr("fixed value constrained not allowed if element is nillable")); + error(QtXmlPatterns::tr("Fixed value constrained not allowed if element is nillable.")); return false; } } @@ -488,7 +488,7 @@ bool XsdValidatingInstanceReader::validateElement(const XsdElement::Ptr &declara const SchemaType::Ptr elementType = typeByName(typeName); // 4.1 if (!elementType) { - error(QtXmlPatterns::tr("specified type %1 is not known to the schema").arg(formatType(m_namePool, typeName))); + error(QtXmlPatterns::tr("Specified type %1 is not known to the schema.").arg(formatType(m_namePool, typeName))); return false; } @@ -501,7 +501,7 @@ bool XsdValidatingInstanceReader::validateElement(const XsdElement::Ptr &declara if (!XsdSchemaHelper::isValidlySubstitutable(elementType, declaration->type(), constraints)) { if (declaration->type()->name(m_namePool) != BuiltinTypes::xsAnyType->name(m_namePool)) { // xs:anyType is a valid substitutable type here - error(QtXmlPatterns::tr("specified type %1 is not validly substitutable with element type %2").arg(formatType(m_namePool, elementType)).arg(formatType(m_namePool, declaration->type()))); + error(QtXmlPatterns::tr("Specified type %1 is not validly substitutable with element type %2.").arg(formatType(m_namePool, elementType)).arg(formatType(m_namePool, declaration->type()))); return false; } } @@ -524,7 +524,7 @@ bool XsdValidatingInstanceReader::validateElementType(const XsdElement::Ptr &dec // 2 if (type->isComplexType() && type->isDefinedBySchema()) { if (XsdComplexType::Ptr(type)->isAbstract()) { - error(QtXmlPatterns::tr("complex type %1 is not allowed to be abstract").arg(formatType(m_namePool, type))); + error(QtXmlPatterns::tr("Complex type %1 is not allowed to be abstract.").arg(formatType(m_namePool, type))); return false; } } @@ -545,13 +545,13 @@ bool XsdValidatingInstanceReader::validateElementSimpleType(const XsdElement::Pt QSet<QXmlName> elementAttributes = attributeNames(); elementAttributes.subtract(allowedAttributes); if (!elementAttributes.isEmpty()) { - error(QtXmlPatterns::tr("element %1 contains not allowed attributes").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Element %1 contains not allowed attributes.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } // 3.1.2 if (hasChildElement()) { - error(QtXmlPatterns::tr("element %1 contains not allowed child element").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Element %1 contains not allowed child element.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } @@ -572,7 +572,7 @@ bool XsdValidatingInstanceReader::validateElementSimpleType(const XsdElement::Pt const XsdTypeChecker checker(m_context, namespaceBindings(item().toNodeModelIndex()), sourceLocation()); if (!checker.isValidString(actualValue, type, errorMsg, &boundType)) { - error(QtXmlPatterns::tr("content of element %1 does not match its type definition: %2").arg(formatKeyword(declaration->displayName(m_namePool))).arg(errorMsg)); + error(QtXmlPatterns::tr("Content of element %1 does not match its type definition: %2.").arg(formatKeyword(declaration->displayName(m_namePool))).arg(errorMsg)); return false; } @@ -580,7 +580,7 @@ bool XsdValidatingInstanceReader::validateElementSimpleType(const XsdElement::Pt if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) { const QString actualConstraintValue = XsdTypeChecker::normalizedValue(declaration->valueConstraint()->value(), facets); if (!text().isEmpty() && !checker.valuesAreEqual(actualValue, actualConstraintValue, type)) { - error(QtXmlPatterns::tr("content of element %1 does not match defined value constraint").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Content of element %1 does not match defined value constraint.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } } @@ -640,7 +640,7 @@ bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::P // 1.1 if (complexType->contentType()->variety() == XsdComplexType::ContentType::Empty) { if (hasChildText() || hasChildElement()) { - error(QtXmlPatterns::tr("element %1 contains not allowed child content").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Element %1 contains not allowed child content.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } } @@ -648,7 +648,7 @@ bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::P // 1.2 if (complexType->contentType()->variety() == XsdComplexType::ContentType::Simple) { if (hasChildElement()) { - error(QtXmlPatterns::tr("element %1 contains not allowed child element").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Element %1 contains not allowed child element.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } @@ -665,14 +665,14 @@ bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::P AnySimpleType::Ptr boundType; const XsdTypeChecker checker(m_context, namespaceBindings(item().toNodeModelIndex()), sourceLocation()); if (!checker.isValidString(actualValue, complexType->contentType()->simpleType(), errorMsg, &boundType)) { - error(QtXmlPatterns::tr("content of element %1 does not match its type definition: %2").arg(formatKeyword(declaration->displayName(m_namePool))).arg(errorMsg)); + error(QtXmlPatterns::tr("Content of element %1 does not match its type definition: %2.").arg(formatKeyword(declaration->displayName(m_namePool))).arg(errorMsg)); return false; } // additional check if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) { if (!checker.valuesAreEqual(actualValue, declaration->valueConstraint()->value(), boundType)) { - error(QtXmlPatterns::tr("content of element %1 does not match defined value constraint").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Content of element %1 does not match defined value constraint.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } } @@ -681,7 +681,7 @@ bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::P // 1.3 if (complexType->contentType()->variety() == XsdComplexType::ContentType::ElementOnly) { if (!text().simplified().isEmpty()) { - error(QtXmlPatterns::tr("element %1 contains not allowed text content").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Element %1 contains not allowed text content.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } } @@ -699,7 +699,7 @@ bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::P if (complexType->contentType()->variety() == XsdComplexType::ContentType::Mixed) { if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) { if (hasChildElement()) { - error(QtXmlPatterns::tr("element %1 can not contain other elements, as it has a fixed content").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Element %1 can not contain other elements, as it has a fixed content.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } @@ -713,7 +713,7 @@ bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::P } if (actualValue != declaration->valueConstraint()->value()) { - error(QtXmlPatterns::tr("content of element %1 does not match defined value constraint").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Content of element %1 does not match defined value constraint.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } } @@ -742,7 +742,7 @@ bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::P if (usesIt.value()->isRequired()) { if (!attributes.contains(usesIt.key())) { - error(QtXmlPatterns::tr("element %1 is missing required attribute %2").arg(formatKeyword(declaration->displayName(m_namePool))) + error(QtXmlPatterns::tr("Element %1 is missing required attribute %2.").arg(formatKeyword(declaration->displayName(m_namePool))) .arg(formatKeyword(m_namePool->displayName(usesIt.key())))); return false; } @@ -771,7 +771,7 @@ bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::P if (complexType->attributeWildcard()) { const XsdWildcard::Ptr wildcard(complexType->attributeWildcard()); if (!validateAttributeWildcard(attributeName, wildcard)) { - error(QtXmlPatterns::tr("attribute %1 does not match the attribute wildcard").arg(formatKeyword(m_namePool->displayName(attributeName)))); + error(QtXmlPatterns::tr("Attribute %1 does not match the attribute wildcard.").arg(formatKeyword(m_namePool->displayName(attributeName)))); return false; } @@ -780,13 +780,13 @@ bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::P if (!attributeDeclaration) { if (wildcard->processContents() == XsdWildcard::Strict) { - error(QtXmlPatterns::tr("declaration for attribute %1 does not exist").arg(formatKeyword(m_namePool->displayName(attributeName)))); + error(QtXmlPatterns::tr("Declaration for attribute %1 does not exist.").arg(formatKeyword(m_namePool->displayName(attributeName)))); return false; } } else { if (BuiltinTypes::xsID->wxsTypeMatches(attributeDeclaration->type())) { if (hasIDAttribute) { - error(QtXmlPatterns::tr("element %1 contains two attributes of type %2") + error(QtXmlPatterns::tr("Element %1 contains two attributes of type %2.") .arg(formatKeyword(declaration->displayName(m_namePool))) .arg(formatKeyword("ID"))); return false; @@ -797,14 +797,14 @@ bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::P if (!validateAttribute(attributeDeclaration, attribute(attributeName))) { if (wildcard->processContents() == XsdWildcard::Strict) { - error(QtXmlPatterns::tr("attribute %1 contains invalid content").arg(formatKeyword(m_namePool->displayName(attributeName)))); + error(QtXmlPatterns::tr("Attribute %1 contains invalid content.").arg(formatKeyword(m_namePool->displayName(attributeName)))); return false; } } } } } else { - error(QtXmlPatterns::tr("element %1 contains unknown attribute %2").arg(formatKeyword(declaration->displayName(m_namePool))) + error(QtXmlPatterns::tr("Element %1 contains unknown attribute %2.").arg(formatKeyword(declaration->displayName(m_namePool))) .arg(formatKeyword(m_namePool->displayName(attributeName)))); return false; } @@ -844,7 +844,7 @@ bool XsdValidatingInstanceReader::validateAttribute(const XsdAttributeUse::Ptr & const XsdTypeChecker checker(m_context, namespaceBindings(index), sourceLocation()); if (!checker.isValidString(actualValue, attributeType, errorMsg, &boundType)) { - error(QtXmlPatterns::tr("content of attribute %1 does not match its type definition: %2").arg(formatKeyword(declaration->attribute()->displayName(m_namePool))).arg(errorMsg)); + error(QtXmlPatterns::tr("Content of attribute %1 does not match its type definition: %2.").arg(formatKeyword(declaration->attribute()->displayName(m_namePool))).arg(errorMsg)); return false; } @@ -852,7 +852,7 @@ bool XsdValidatingInstanceReader::validateAttribute(const XsdAttributeUse::Ptr & if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdAttributeUse::ValueConstraint::Fixed) { const QString actualConstraintValue = XsdTypeChecker::normalizedValue(declaration->valueConstraint()->value(), facets); if (!checker.valuesAreEqual(actualValue, actualConstraintValue, attributeType)) { - error(QtXmlPatterns::tr("content of attribute %1 does not match defined value constraint").arg(formatKeyword(declaration->attribute()->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Content of attribute %1 does not match defined value constraint.").arg(formatKeyword(declaration->attribute()->displayName(m_namePool)))); return false; } } @@ -890,7 +890,7 @@ bool XsdValidatingInstanceReader::validateAttribute(const XsdAttribute::Ptr &dec const XsdTypeChecker checker(m_context, namespaceBindings(index), sourceLocation()); if (!checker.isValidString(actualValue, attributeType, errorMsg, &boundType)) { - error(QtXmlPatterns::tr("content of attribute %1 does not match its type definition: %2").arg(formatKeyword(declaration->displayName(m_namePool))).arg(errorMsg)); + error(QtXmlPatterns::tr("Content of attribute %1 does not match its type definition: %2.").arg(formatKeyword(declaration->displayName(m_namePool))).arg(errorMsg)); return false; } @@ -898,7 +898,7 @@ bool XsdValidatingInstanceReader::validateAttribute(const XsdAttribute::Ptr &dec if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdAttribute::ValueConstraint::Fixed) { const QString actualConstraintValue = XsdTypeChecker::normalizedValue(declaration->valueConstraint()->value(), facets); if (!checker.valuesAreEqual(actualValue, actualConstraintValue, attributeType)) { - error(QtXmlPatterns::tr("content of attribute %1 does not match defined value constraint").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Content of attribute %1 does not match defined value constraint.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } } @@ -986,7 +986,7 @@ bool XsdValidatingInstanceReader::validateUniqueIdentityConstraint(const XsdElem continue; if (node.fieldsAreEqual(innerNode, m_namePool, m_context, &reflection)) { - error(QtXmlPatterns::tr("non-unique value found for constraint %1").arg(formatKeyword(constraint->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Non-unique value found for constraint %1.").arg(formatKeyword(constraint->displayName(m_namePool)))); return false; } } @@ -1006,7 +1006,7 @@ bool XsdValidatingInstanceReader::validateKeyIdentityConstraint(const XsdElement // 4.2.1 if (targetNodeSet.count() != qualifiedNodeSet.count()) { - error(QtXmlPatterns::tr("key constraint %1 contains absent fields").arg(formatKeyword(constraint->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Key constraint %1 contains absent fields.").arg(formatKeyword(constraint->displayName(m_namePool)))); return false; } @@ -1024,7 +1024,7 @@ bool XsdValidatingInstanceReader::validateKeyIdentityConstraint(const XsdElement if (m_model->kind(index) == QXmlNodeModelIndex::Element) { const XsdElement::Ptr declaration = m_model->assignedElement(index); if (declaration && declaration->isNillable()) { - error(QtXmlPatterns::tr("key constraint %1 contains references nillable element %2") + error(QtXmlPatterns::tr("Key constraint %1 contains references nillable element %2.") .arg(formatKeyword(constraint->displayName(m_namePool))) .arg(formatKeyword(declaration->displayName(m_namePool)))); return false; @@ -1064,7 +1064,7 @@ bool XsdValidatingInstanceReader::validateKeyRefIdentityConstraint(const XsdElem } if (!foundMatching) { - error(QtXmlPatterns::tr("no referenced value found for key reference %1").arg(formatKeyword(constraint->displayName(m_namePool)))); + error(QtXmlPatterns::tr("No referenced value found for key reference %1.").arg(formatKeyword(constraint->displayName(m_namePool)))); return false; } } @@ -1128,7 +1128,7 @@ bool XsdValidatingInstanceReader::selectNodeSets(const XsdElement::Ptr&, const Q } if (fieldVector.count() > 1) { - error(QtXmlPatterns::tr("more than one value found for field %1").arg(formatData(field->expression()))); + error(QtXmlPatterns::tr("More than one value found for field %1.").arg(formatData(field->expression()))); return false; } @@ -1148,7 +1148,7 @@ bool XsdValidatingInstanceReader::selectNodeSets(const XsdElement::Ptr&, const Q } } if (!typeOk) { - error(QtXmlPatterns::tr("field %1 has no simple type").arg(formatData(field->expression()))); + error(QtXmlPatterns::tr("Field %1 has no simple type.").arg(formatData(field->expression()))); return false; } @@ -1221,7 +1221,7 @@ SchemaType::Ptr XsdValidatingInstanceReader::typeByName(const QXmlName &name) co void XsdValidatingInstanceReader::addIdIdRefBinding(const QString &id, const NamedSchemaComponent::Ptr &binding) { if (!m_model->idIdRefBindings(id).isEmpty()) { - error(QtXmlPatterns::tr("ID value '%1' is not unique").arg(formatKeyword(id))); + error(QtXmlPatterns::tr("ID value '%1' is not unique.").arg(formatKeyword(id))); return; } @@ -1232,7 +1232,7 @@ QString XsdValidatingInstanceReader::qNameAttribute(const QXmlName &attributeNam { const QString value = attribute(attributeName).simplified(); if (!XPathHelper::isQName(value)) { - error(QtXmlPatterns::tr("'%1' attribute contains invalid QName content: %2").arg(m_namePool->displayName(attributeName)).arg(formatData(value))); + error(QtXmlPatterns::tr("'%1' attribute contains invalid QName content: %2.").arg(m_namePool->displayName(attributeName)).arg(formatData(value))); return QString(); } else { return value; diff --git a/src/xmlpatterns/type/qanytype.cpp b/src/xmlpatterns/type/qanytype.cpp index cb9ef37..8966220 100644 --- a/src/xmlpatterns/type/qanytype.cpp +++ b/src/xmlpatterns/type/qanytype.cpp @@ -69,7 +69,7 @@ QXmlName AnyType::name(const NamePool::Ptr &np) const return np->allocateQName(StandardNamespaces::xs, QLatin1String("anyType")); } -QString AnyType::displayName(const NamePool::Ptr &np) const +QString AnyType::displayName(const NamePool::Ptr &) const { /* A bit faster than calling name()->displayName() */ return QLatin1String("xs:anyType"); |