Qt 4.8
|
A context for schema parsing and validation. More...
#include <qxsdschemacontext_p.h>
Public Variables | |
QHash< SchemaType::Ptr, XsdFacet::Hash > | m_builtinTypesFacetList |
SchemaTypeFactory::Ptr | m_schemaTypeFactory |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Private Functions | |
QHash< SchemaType::Ptr, XsdFacet::Hash > | setupBuiltinTypesFacetList () const |
Properties | |
QUrl | m_baseURI |
QAbstractMessageHandler * | m_messageHandler |
NamePool::Ptr | m_namePool |
QNetworkAccessManager * | m_networkAccessManager |
const QAbstractUriResolver * | m_uriResolver |
Additional Inherited Members | |
Static Public Functions inherited from QPatternist::ReportContext | |
static QString | codeFromURI (const QString &typeURI, QString &uri) |
static QString | codeToString (const ReportContext::ErrorCode errorCode) |
Related Functions inherited from QPatternist::ReportContext | |
typedef bool | Exception |
This is the class type that is being thrown when a query error occur. More... | |
A context for schema parsing and validation.
This class provides the infrastructure for error reporting and network access. Additionally it stores objects that are used by both, the parser and the validator.
Definition at line 83 of file qxsdschemacontext_p.h.
A smart pointer wrapping XsdSchemaContext instances.
Definition at line 89 of file qxsdschemacontext_p.h.
XsdSchemaContext::XsdSchemaContext | ( | const NamePool::Ptr & | namePool | ) |
Creates a new schema context object.
namePool | The name pool all names belong to. |
Definition at line 52 of file qxsdschemacontext.cpp.
|
virtual |
XsdFacet::Hash XsdSchemaContext::facetsForType | ( | const AnySimpleType::Ptr & | type | ) | const |
Returns the list of facets for the given simple type
.
Definition at line 110 of file qxsdschemacontext.cpp.
Referenced by QPatternist::XsdSchemaChecker::checkConstrainingFacets(), and QPatternist::XsdTypeChecker::mergedFacetsForType().
|
virtual |
Always returns an empty source location.
Implements QPatternist::ReportContext.
Definition at line 95 of file qxsdschemacontext.cpp.
|
virtual |
Returns the message handler used by the context for error reporting.
Implements QPatternist::ReportContext.
Definition at line 90 of file qxsdschemacontext.cpp.
|
virtual |
Returns the name pool of the schema context.
Implements QPatternist::ReportContext.
Definition at line 60 of file qxsdschemacontext.cpp.
Referenced by QPatternist::XsdInstanceReader::convertToQName(), QPatternist::XsdTypeChecker::convertToQName(), derivedTermValid(), QPatternist::XsdSchemaHelper::isValidAttributeUsesExtension(), QPatternist::XsdSchemaHelper::isValidAttributeUsesRestriction(), and QPatternist::XsdParticleChecker::subsumes().
|
virtual |
Returns the network access manager that is used to access referenced schema definitions.
Definition at line 80 of file qxsdschemacontext.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::loadSchema(), QPatternist::XsdSchemaParser::parseImport(), QPatternist::XsdSchemaParser::parseInclude(), and QPatternist::XsdSchemaParser::parseRedefine().
SchemaTypeFactory::Ptr XsdSchemaContext::schemaTypeFactory | ( | ) | const |
Returns a schema type factory that contains some predefined schema types.
Definition at line 122 of file qxsdschemacontext.cpp.
Referenced by QPatternist::XsdSchemaResolver::resolveAlternativeTypes(), QPatternist::XsdSchemaResolver::resolveAttributeTypes(), QPatternist::XsdSchemaResolver::resolveComplexBaseTypes(), QPatternist::XsdSchemaResolver::resolveElementTypes(), QPatternist::XsdSchemaResolver::resolveSimpleListType(), QPatternist::XsdSchemaResolver::resolveSimpleRestrictionBaseTypes(), QPatternist::XsdSchemaResolver::resolveSimpleUnionTypes(), QPatternist::XsdValidatingInstanceReader::typeByName(), QPatternist::XsdSchemaResolver::XsdSchemaResolver(), and QPatternist::XsdValidatingInstanceReader::XsdValidatingInstanceReader().
|
virtual |
Sets the base URI for the main schema.
The main schema is the one that includes resp. imports all the other schema files.
Definition at line 70 of file qxsdschemacontext.cpp.
void XsdSchemaContext::setMessageHandler | ( | QAbstractMessageHandler * | handler | ) |
Sets the message handler
used by the context for error reporting.
Definition at line 85 of file qxsdschemacontext.cpp.
void XsdSchemaContext::setNetworkAccessManager | ( | QNetworkAccessManager * | accessManager | ) |
Sets the network access manager that should be used to access referenced schema definitions.
Definition at line 75 of file qxsdschemacontext.cpp.
|
private |
Definition at line 130 of file qxsdschemacontext.cpp.
Referenced by facetsForType().
void XsdSchemaContext::setUriResolver | ( | const QAbstractUriResolver * | resolver | ) |
Sets the uri resolver
that is used for resolving URIs in the schema parser.
Definition at line 100 of file qxsdschemacontext.cpp.
|
virtual |
Returns the uri resolver that is used for resolving URIs in the schema parser.
Implements QPatternist::ReportContext.
Definition at line 105 of file qxsdschemacontext.cpp.
Referenced by setUriResolver().
|
private |
Definition at line 177 of file qxsdschemacontext_p.h.
Referenced by baseURI(), and setBaseURI().
|
mutable |
Definition at line 170 of file qxsdschemacontext_p.h.
Referenced by facetsForType().
|
private |
Definition at line 179 of file qxsdschemacontext_p.h.
Referenced by messageHandler(), and setMessageHandler().
|
private |
Definition at line 175 of file qxsdschemacontext_p.h.
Referenced by namePool(), schemaTypeFactory(), and setupBuiltinTypesFacetList().
|
private |
Definition at line 176 of file qxsdschemacontext_p.h.
Referenced by networkAccessManager(), and setNetworkAccessManager().
|
mutable |
The following variables should not be accessed directly.
Definition at line 169 of file qxsdschemacontext_p.h.
Referenced by QPatternist::XsdValidatingInstanceReader::loadSchema(), and schemaTypeFactory().
|
private |
Definition at line 178 of file qxsdschemacontext_p.h.
Referenced by setUriResolver(), and uriResolver().