summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns/schema/qxsdschemahelper_p.h
diff options
context:
space:
mode:
authorTobias Koenig <tokoe@kde.org>2009-05-16 10:30:25 (GMT)
committerTobias Koenig <tokoe@kde.org>2009-05-16 10:30:25 (GMT)
commit456463169c6d00b9938f0d975dbd7f398edea39d (patch)
tree13c1b245cffa15828ef1b12ac24c271c301221f2 /src/xmlpatterns/schema/qxsdschemahelper_p.h
parent135a028d9dc9a28a0a072665a7dc43b7e9e187be (diff)
downloadQt-456463169c6d00b9938f0d975dbd7f398edea39d.zip
Qt-456463169c6d00b9938f0d975dbd7f398edea39d.tar.gz
Qt-456463169c6d00b9938f0d975dbd7f398edea39d.tar.bz2
Various api, documentation and code cleanups
Diffstat (limited to 'src/xmlpatterns/schema/qxsdschemahelper_p.h')
-rw-r--r--src/xmlpatterns/schema/qxsdschemahelper_p.h63
1 files changed, 47 insertions, 16 deletions
diff --git a/src/xmlpatterns/schema/qxsdschemahelper_p.h b/src/xmlpatterns/schema/qxsdschemahelper_p.h
index 1722b4c..918664e 100644
--- a/src/xmlpatterns/schema/qxsdschemahelper_p.h
+++ b/src/xmlpatterns/schema/qxsdschemahelper_p.h
@@ -55,12 +55,15 @@ namespace QPatternist
/**
* Checks whether the given @p nameSpace is allowed by the given namespace @p constraint.
*/
- static bool wildcardAllowsNamespaceName(const QString &nameSpace, const XsdWildcard::NamespaceConstraint::Ptr &constraint);
+ static bool wildcardAllowsNamespaceName(const QString &nameSpace,
+ const XsdWildcard::NamespaceConstraint::Ptr &constraint);
/**
* Checks whether the given @p name is allowed by the namespace constraint of the given @p wildcard.
*/
- static bool wildcardAllowsExpandedName(const QXmlName &name, const XsdWildcard::Ptr &wildcard, const NamePool::Ptr &namePool);
+ static bool wildcardAllowsExpandedName(const QXmlName &name,
+ const XsdWildcard::Ptr &wildcard,
+ const NamePool::Ptr &namePool);
/**
* Checks whether the @p wildcard is a subset of @p otherWildcard.
@@ -75,25 +78,32 @@ namespace QPatternist
/**
* Returns the intersection of the given @p wildcard and @p otherWildcard.
*/
- static XsdWildcard::Ptr wildcardIntersection(const XsdWildcard::Ptr &wildcard, const XsdWildcard::Ptr &otherWildcard);
+ static XsdWildcard::Ptr wildcardIntersection(const XsdWildcard::Ptr &wildcard,
+ const XsdWildcard::Ptr &otherWildcard);
/**
* Returns whether the given @p type is validly substitutable for an @p otherType
* under the given @p constraints.
*/
- static bool isValidlySubstitutable(const SchemaType::Ptr &type, const SchemaType::Ptr &otherType, const SchemaType::DerivationConstraints &constraints);
+ static bool isValidlySubstitutable(const SchemaType::Ptr &type,
+ const SchemaType::Ptr &otherType,
+ const SchemaType::DerivationConstraints &constraints);
/**
* Returns whether the simple @p derivedType can be derived from the simple @p baseType
* under the given @p constraints.
*/
- static bool isSimpleDerivationOk(const SchemaType::Ptr &derivedType, const SchemaType::Ptr baseType, const SchemaType::DerivationConstraints &constraints);
+ static bool isSimpleDerivationOk(const SchemaType::Ptr &derivedType,
+ const SchemaType::Ptr &baseType,
+ const SchemaType::DerivationConstraints &constraints);
/**
* Returns whether the complex @p derivedType can be derived from the complex @p baseType
* under the given @p constraints.
*/
- static bool isComplexDerivationOk(const SchemaType::Ptr &derivedType, const SchemaType::Ptr baseType, const SchemaType::DerivationConstraints &constraints);
+ static bool isComplexDerivationOk(const SchemaType::Ptr &derivedType,
+ const SchemaType::Ptr &baseType,
+ const SchemaType::DerivationConstraints &constraints);
/**
* This method takes the two string based operands @p operand1 and @p operand2 and converts them to instances of type @p type.
@@ -111,41 +121,62 @@ namespace QPatternist
* Returns whether the process content property of the @p derivedWildcard is valid
* according to the process content property of its @p baseWildcard.
*/
- static bool checkWildcardProcessContents(const XsdWildcard::Ptr &baseWildcard, const XsdWildcard::Ptr &derivedWildcard);
+ static bool checkWildcardProcessContents(const XsdWildcard::Ptr &baseWildcard,
+ const XsdWildcard::Ptr &derivedWildcard);
/**
* Checks whether @[ member is a member of the substitution group with the given @p head.
*/
- static bool foundSubstitutionGroupTransitive(const XsdElement::Ptr &head, const XsdElement::Ptr &member, QSet<XsdElement::Ptr> &visitedElements);
+ static bool foundSubstitutionGroupTransitive(const XsdElement::Ptr &head,
+ const XsdElement::Ptr &member,
+ QSet<XsdElement::Ptr> &visitedElements);
/**
* A helper method that iterates over the type hierarchy from @p memberType up to @p headType and collects all
* @p derivationSet and @p blockSet constraints that exists on the way there.
*/
- static void foundSubstitutionGroupTypeInheritance(const SchemaType::Ptr &headType, const SchemaType::Ptr &memberType,
- QSet<SchemaType::DerivationMethod> &derivationSet, NamedSchemaComponent::BlockingConstraints &blockSet);
+ static void foundSubstitutionGroupTypeInheritance(const SchemaType::Ptr &headType,
+ const SchemaType::Ptr &memberType,
+ QSet<SchemaType::DerivationMethod> &derivationSet,
+ NamedSchemaComponent::BlockingConstraints &blockSet);
/**
* Checks if the @p member is transitive to @p head.
*/
- static bool substitutionGroupOkTransitive(const XsdElement::Ptr &head, const XsdElement::Ptr &member, const NamePool::Ptr &namePool);
+ static bool substitutionGroupOkTransitive(const XsdElement::Ptr &head,
+ const XsdElement::Ptr &member,
+ const NamePool::Ptr &namePool);
/**
* Checks if @p derivedAttributeGroup is a valid restriction for @p attributeGroup.
*/
- static bool isValidAttributeGroupRestriction(const XsdAttributeGroup::Ptr &derivedAttributeGroup, const XsdAttributeGroup::Ptr &attributeGroup, const XsdSchemaContext::Ptr &context, QString &errorMsg);
+ static bool isValidAttributeGroupRestriction(const XsdAttributeGroup::Ptr &derivedAttributeGroup,
+ const XsdAttributeGroup::Ptr &attributeGroup,
+ const XsdSchemaContext::Ptr &context,
+ QString &errorMsg);
/**
* Checks if @p derivedAttributeUses are a valid restriction for @p attributeUses.
*/
- static bool isValidAttributeUsesRestriction(const XsdAttributeUse::List &derivedAttributeUses, const XsdAttributeUse::List &attributeUses,
- const XsdWildcard::Ptr &derivedWildcard, const XsdWildcard::Ptr &wildcard, const XsdSchemaContext::Ptr &context, QString &errorMsg);
+ static bool isValidAttributeUsesRestriction(const XsdAttributeUse::List &derivedAttributeUses,
+ const XsdAttributeUse::List &attributeUses,
+ const XsdWildcard::Ptr &derivedWildcard,
+ const XsdWildcard::Ptr &wildcard,
+ const XsdSchemaContext::Ptr &context,
+ QString &errorMsg);
/**
* Checks if @p derivedAttributeUses are a valid extension for @p attributeUses.
*/
- static bool isValidAttributeUsesExtension(const XsdAttributeUse::List &derivedAttributeUses, const XsdAttributeUse::List &attributeUses,
- const XsdWildcard::Ptr &derivedWildcard, const XsdWildcard::Ptr &wildcard, const XsdSchemaContext::Ptr &context, QString &errorMsg);
+ static bool isValidAttributeUsesExtension(const XsdAttributeUse::List &derivedAttributeUses,
+ const XsdAttributeUse::List &attributeUses,
+ const XsdWildcard::Ptr &derivedWildcard,
+ const XsdWildcard::Ptr &wildcard,
+ const XsdSchemaContext::Ptr &context,
+ QString &errorMsg);
+
+ private:
+ Q_DISABLE_COPY(XsdSchemaHelper)
};
}