Qt 4.8
|
Encapsulates the checking of schema valitity after reference resolving has finished. More...
#include <qxsdschemachecker_p.h>
Public Types | |
typedef QExplicitlySharedDataPointer< XsdSchemaChecker > | Ptr |
Public Functions | |
void | addComponentLocationHash (const QHash< NamedSchemaComponent::Ptr, QSourceLocation > &hash) |
void | basicCheck () |
void | check () |
void | checkConstrainingFacets () |
XsdSchemaChecker (const QExplicitlySharedDataPointer< XsdSchemaContext > &context, const XsdSchemaParserContext *parserContext) | |
~XsdSchemaChecker () | |
Public Functions inherited from QSharedData | |
QSharedData () | |
Constructs a QSharedData object with a reference count of 0. More... | |
QSharedData (const QSharedData &) | |
Constructs a QSharedData object with reference count 0. More... | |
Private Types | |
typedef QHash< QXmlName, SchemaType::Ptr > | DuplicatedElementMap |
typedef QHash< XsdWildcard::NamespaceConstraint::Variety, XsdWildcard::Ptr > | DuplicatedWildcardMap |
Additional Inherited Members | |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Encapsulates the checking of schema valitity after reference resolving has finished.
Definition at line 81 of file qxsdschemachecker_p.h.
|
private |
A map used to find duplicated elements inside a model group.
Definition at line 188 of file qxsdschemachecker_p.h.
|
private |
A map used to find duplicated wildcards inside a model group.
Definition at line 193 of file qxsdschemachecker_p.h.
Definition at line 84 of file qxsdschemachecker_p.h.
XsdSchemaChecker::XsdSchemaChecker | ( | const QExplicitlySharedDataPointer< XsdSchemaContext > & | context, |
const XsdSchemaParserContext * | parserContext | ||
) |
Creates a new schema checker.
context | The context that is used for customization. |
parserContext | The context that contains all the data structures. |
Definition at line 65 of file qxsdschemachecker.cpp.
XsdSchemaChecker::~XsdSchemaChecker | ( | ) |
void XsdSchemaChecker::addComponentLocationHash | ( | const QHash< NamedSchemaComponent::Ptr, QSourceLocation > & | hash | ) |
Adds the component location hash, so the checker is able to report meaning full error messages.
Definition at line 108 of file qxsdschemachecker.cpp.
Referenced by QPatternist::XsdSchemaResolver::resolve().
void XsdSchemaChecker::basicCheck | ( | ) |
Starts a basic check process.
This check only validates the basic super type inheritance of simple and complex types.
Definition at line 82 of file qxsdschemachecker.cpp.
Referenced by QPatternist::XsdSchemaResolver::resolve().
void XsdSchemaChecker::check | ( | ) |
Starts the real check process.
Definition at line 93 of file qxsdschemachecker.cpp.
Referenced by QPatternist::XsdSchemaResolver::resolve().
|
private |
Check the attribute constraints.
Definition at line 1809 of file qxsdschemachecker.cpp.
Referenced by check().
|
private |
Check the attribute use constraints.
Definition at line 1869 of file qxsdschemachecker.cpp.
Referenced by check().
|
private |
Checks that no simple or complex type inherits itself.
Definition at line 207 of file qxsdschemachecker.cpp.
Referenced by basicCheck().
|
private |
Checks for various constraints for complex types defined by schema.
Definition at line 608 of file qxsdschemachecker.cpp.
Referenced by basicCheck().
|
private |
Checks for various constraints for simple types defined by schema.
Definition at line 306 of file qxsdschemachecker.cpp.
Referenced by basicCheck().
|
private |
Checks the advanced circular inheritance.
Definition at line 239 of file qxsdschemachecker.cpp.
Referenced by check().
|
private |
Definition at line 640 of file qxsdschemachecker.cpp.
Referenced by check().
void XsdSchemaChecker::checkConstrainingFacets | ( | ) |
Checks the constraining facets of all global and anonymous simple types for validity.
Definition at line 947 of file qxsdschemachecker.cpp.
Referenced by QPatternist::XsdSchemaResolver::resolve().
|
private |
Checks the set of constraining facets
that belongs to simpleType
for validity.
Definition at line 970 of file qxsdschemachecker.cpp.
|
private |
Checks for duplicated attribute uses (attributes with the same name) inside a complex type.
Definition at line 1618 of file qxsdschemachecker.cpp.
Referenced by check().
|
private |
Check the element constraints.
Definition at line 1696 of file qxsdschemachecker.cpp.
Referenced by check().
|
private |
Check for duplicated elements and element wildcards in all complex type particles.
Definition at line 1956 of file qxsdschemachecker.cpp.
Referenced by checkElementDuplicates().
|
private |
Check for duplicated elements and element wildcards in the given particle
.
particle | The particle to check. |
elementMap | A map to find the duplicated elements. |
wildcardMap | A map to find the duplicated element wildcards. |
Definition at line 1981 of file qxsdschemachecker.cpp.
|
private |
Checks for inheritance restrictions given by final or finalDefault attributes.
Definition at line 276 of file qxsdschemachecker.cpp.
Referenced by check().
|
private |
Checks for list and union derivation restrictions given by final or finalDefault attributes.
Definition at line 849 of file qxsdschemachecker.cpp.
Referenced by check().
|
private |
|
private |
Definition at line 347 of file qxsdschemachecker.cpp.
Referenced by check().
|
private |
Checks whether the sequence
of elements is accepted by the given particle
.
Definition at line 244 of file qxsdschemachecker_helper.cpp.
|
private |
Returns the list of facets for the given type
.
|
private |
Returns whether the given list
of attribute uses contains an attribute uses that has a type inherited by xs:ID with a value constraint. conflictingAttribute
will contain the conflicting attribute in that case.
Definition at line 82 of file qxsdschemachecker_helper.cpp.
Referenced by checkDuplicatedAttributeUses().
|
private |
Returns whether the given list
of attribute uses contains two (or more) attribute uses that point to attributes with the same name. conflictingAttribute
will contain the conflicting attribute in that case.
Definition at line 46 of file qxsdschemachecker_helper.cpp.
Referenced by checkDuplicatedAttributeUses().
|
private |
Returns whether the given list
of attribute uses contains two (or more) attribute uses that have a type inherited by xs:ID.
Definition at line 65 of file qxsdschemachecker_helper.cpp.
Referenced by checkDuplicatedAttributeUses().
|
private |
Checks whether the extension
particle is a valid extension of the base
particle.
Definition at line 155 of file qxsdschemachecker_helper.cpp.
Referenced by checkComplexTypeConstraints().
|
private |
Checks that the string value
is valid according the value space of type
for the given component
.
Definition at line 1857 of file qxsdschemachecker.cpp.
Referenced by checkAttributeConstraints(), and checkElementConstraints().
|
private |
Checks whether the particle
equals the otherParticle
recursively.
Definition at line 99 of file qxsdschemachecker_helper.cpp.
Referenced by isValidParticleExtension().
|
private |
Setup fast lookup list for allowed facets of atomic simple types.
Definition at line 48 of file qxsdschemachecker_setup.cpp.
Referenced by XsdSchemaChecker().
|
private |
Returns the source location of the given schema component
or a dummy source location if the component is not found in the component location hash.
Definition at line 2039 of file qxsdschemachecker.cpp.
Referenced by checkAttributeConstraints(), checkAttributeUseConstraints(), checkBasicComplexTypeConstraints(), checkBasicSimpleTypeConstraints(), checkComplexTypeConstraints(), checkConstrainingFacets(), checkDuplicatedAttributeUses(), checkElementConstraints(), checkElementDuplicates(), checkSimpleDerivationRestrictions(), checkSimpleTypeConstraints(), and sourceLocationForType().
|
private |
Returns the source location of the given schema type
or a dummy source location if the type is not found in the component location hash.
Definition at line 2053 of file qxsdschemachecker.cpp.
Referenced by checkBasicCircularInheritances(), checkCircularInheritances(), and checkInheritanceRestrictions().
|
private |
Definition at line 275 of file qxsdschemachecker_p.h.
Referenced by checkConstrainingFacets(), and setupAllowedAtomicFacets().
|
private |
Definition at line 276 of file qxsdschemachecker_p.h.
Referenced by addComponentLocationHash(), and sourceLocation().
|
private |
Definition at line 272 of file qxsdschemachecker_p.h.
Referenced by checkAttributeConstraints(), checkAttributeUseConstraints(), checkBasicCircularInheritances(), checkBasicComplexTypeConstraints(), checkBasicSimpleTypeConstraints(), checkCircularInheritances(), checkComplexTypeConstraints(), checkConstrainingFacets(), checkDuplicatedAttributeUses(), checkElementConstraints(), checkElementDuplicates(), checkInheritanceRestrictions(), checkSimpleDerivationRestrictions(), checkSimpleTypeConstraints(), and isValidValue().
|
private |
Definition at line 273 of file qxsdschemachecker_p.h.
Referenced by checkAttributeConstraints(), checkAttributeUseConstraints(), checkBasicCircularInheritances(), checkBasicComplexTypeConstraints(), checkBasicSimpleTypeConstraints(), checkCircularInheritances(), checkComplexTypeConstraints(), checkConstrainingFacets(), checkDuplicatedAttributeUses(), checkElementConstraints(), checkElementDuplicates(), checkInheritanceRestrictions(), checkSimpleDerivationRestrictions(), checkSimpleTypeConstraints(), elementSequenceAccepted(), hasDuplicatedAttributeUses(), isValidValue(), particleEqualsRecursively(), and setupAllowedAtomicFacets().
|
private |
Definition at line 274 of file qxsdschemachecker_p.h.
Referenced by checkAttributeConstraints(), checkAttributeUseConstraints(), checkBasicCircularInheritances(), checkBasicComplexTypeConstraints(), checkBasicSimpleTypeConstraints(), checkCircularInheritances(), checkComplexTypeConstraints(), checkConstrainingFacets(), checkDuplicatedAttributeUses(), checkElementConstraints(), checkElementDuplicates(), checkInheritanceRestrictions(), checkSimpleDerivationRestrictions(), and checkSimpleTypeConstraints().