52 #ifndef Patternist_XsdSchemaParser_H 53 #define Patternist_XsdSchemaParser_H 70 #include <QtCore/QHash> 71 #include <QtCore/QSet> 72 #include <QtCore/QUrl> 73 #include <QtXml/QXmlStreamReader> 74 #include <QtXmlPatterns/QXmlNamePool> 613 inline SchemaType::DerivationConstraints
readDerivationConstraintAttribute(
const SchemaType::DerivationConstraints &allowedConstraints,
const char *elementName);
618 inline NamedSchemaComponent::BlockingConstraints
readBlockingConstraintAttribute(
const NamedSchemaComponent::BlockingConstraints &allowedConstraints,
const char *elementName);
Error error() const
Returns the type of the current error, or NoError if no error occurred.
XsdSchemaParser(const XsdSchemaContext::Ptr &context, const XsdSchemaParserContext::Ptr &parserContext, QIODevice *device)
XsdTerm::Ptr parseLocalElement(const XsdParticle::Ptr &particle, const NamedSchemaComponent::Ptr &parent)
void addType(const SchemaType::Ptr &type)
QSet< QXmlName > m_builtinTypeNames
void parseDefaultOpenContent()
XsdModelGroup::Ptr parseLocalSequence(const XsdParticle::Ptr &particle, const NamedSchemaComponent::Ptr &parent)
XsdWildcard::Ptr parseAnyAttribute()
void addAttribute(const XsdAttribute::Ptr &attribute)
NamespaceSet m_redefinedSchemas
A context for schema parsing and validation.
#define QT_END_NAMESPACE
This macro expands to.
XsdFacet::Ptr parseAssertionFacet()
XsdFacet::Ptr parseMaxLengthFacet()
void parseSchema(ParserType parserType)
XsdAttribute::Ptr parseGlobalAttribute()
void parseSelector(const XsdIdentityConstraint::Ptr &ptr)
void addIdentityConstraint(const XsdIdentityConstraint::Ptr &constraint)
XsdSchemaContext * m_context
XsdTerm::Ptr parseReferredGroup(const XsdParticle::Ptr &particle)
XsdFacet::Ptr parseFractionDigitsFacet()
void parseComplexContentExtension(const XsdComplexType::Ptr &complexType)
void parseList(const XsdSimpleType::Ptr &ptr)
XsdAnnotation::Ptr parseAnnotation()
Store names such as namespace bindings and QNames and allows them to be referenced in efficient ways...
QString readXPathAttribute(const QString &attributeName, XPathType type, const char *elementName)
XsdModelGroup::Ptr parseChoice(const NamedSchemaComponent::Ptr &parent)
XsdFacet::Ptr parseMinLengthFacet()
XsdIdentityConstraint::Ptr parseKey()
XsdComplexType::OpenContent::Ptr parseOpenContent()
void parseSimpleContent(const XsdComplexType::Ptr &complexType)
XsdComplexType::Ptr parseLocalComplexType()
void validateIdAttribute(const char *elementName)
XsdDocumentation::Ptr parseDocumentation()
Represents a XSD schema object.
QStringRef name() const
Returns the local name of a StartElement, EndElement, or an EntityReference.
NamespaceSet m_includedSchemas
NamedSchemaComponent::BlockingConstraints readBlockingConstraintAttribute(const NamedSchemaComponent::BlockingConstraints &allowedConstraints, const char *elementName)
QString m_xpathDefaultNamespace
void resolveComplexContentType(const XsdComplexType::Ptr &complexType, bool effectiveMixed)
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
XsdFacet::Ptr parseWhiteSpaceFacet()
QSourceLocation currentSourceLocation() const
XsdSchemaParserContext * m_parserContext
XsdIdentityConstraint::Ptr parseKeyRef(const XsdElement::Ptr &element)
XsdAttributeUse::Ptr parseLocalAttribute(const NamedSchemaComponent::Ptr &parent)
void addIncludedSchemas(const NamespaceSet &schemas)
bool m_defaultOpenContentAppliesToEmpty
void addElement(const XsdElement::Ptr &element)
void parseComplexContent(const XsdComplexType::Ptr &complexType, bool *mixed)
XsdAttributeUse::Ptr parseReferredAttributeGroup()
#define QT_BEGIN_NAMESPACE
This macro expands to.
void addImportedSchemas(const NamespaceSet &schemas)
ComponentLocationHash m_componentLocationHash
Encapsulates the resolving of type/element references in a schema after parsing has finished...
QString m_elementFormDefault
XsdIdCache::Ptr m_idCache
XsdComplexType::OpenContent::Ptr m_defaultOpenContent
XsdFacet::Ptr parseTotalDigitsFacet()
void parseSimpleContentExtension(const XsdComplexType::Ptr &complexType)
A helper class for automatically handling namespace scopes of elements.
bool parseMinMaxConstraint(const XsdParticle::Ptr &particle, const char *tagName)
void setTargetNamespaceExtended(const QString &targetNamespace)
QString readQNameAttribute(const QString &typeAttribute, const char *elementName)
void setIncludedSchemas(const NamespaceSet &schemas)
The namespace for the internal API of QtXmlPatterns.
A context for schema parsing.
QString m_attributeFormDefault
XsdApplicationInformation::Ptr parseAppInfo()
The QSourceLocation class identifies a location in a resource by URI, line, and column.
XsdFacet::Ptr parseMinInclusiveFacet()
const T * ptr(const T &t)
XsdFacet::Ptr parseLengthFacet()
void addRedefinedSchemas(const NamespaceSet &schemas)
void setDocumentURI(const QUrl &uri)
A helper class for handling nested namespace declarations.
Base class for tokenizers that reads XML formats. This is XSLTTokenizer, and the W3C XML Schema parse...
XsdFacet::Ptr parseMinExclusiveFacet()
QIODevice * device() const
Returns the current device associated with the QXmlStreamReader, or 0 if no device has been assigned...
QHash< XsdTagScope::Type, XsdStateMachine< XsdSchemaToken::NodeName > > m_stateMachines
QString m_targetNamespace
void parseUnknownDocumentation()
void addElementGroup(const XsdModelGroup::Ptr &group)
XsdAttributeGroup::Ptr parseNamedAttributeGroup()
XsdModelGroup::Ptr parseNamedGroup()
XsdComplexType::Ptr parseGlobalComplexType()
The QXmlName class represents the name of an XML node, in an efficient, namespace-aware way...
void setRedefinedSchemas(const NamespaceSet &schemas)
XsdSimpleType::Ptr parseGlobalSimpleType()
QString readNameAttribute(const char *elementName)
XsdAlternative::Ptr parseAlternative()
void parseComplexContentRestriction(const XsdComplexType::Ptr &complexType)
Implements the parsing of XML schema file.
void convertName(const QString &qualified, NamespaceSupport::NameType type, QXmlName &name)
XsdWildcard::Ptr parseAny(const XsdParticle::Ptr &particle)
XsdAssertion::Ptr parseAssertion(const XsdSchemaToken::NodeName &nodeName, const XsdTagScope::Type &tag)
void addAnonymousType(const SchemaType::Ptr &type)
XsdModelGroup::Ptr parseAll(const NamedSchemaComponent::Ptr &parent)
void addFacet(const XsdFacet::Ptr &facet, XsdFacet::Hash &facets, const SchemaType::Ptr &type)
void attributeContentError(const char *attributeName, const char *elementName, const QString &value, const SchemaType::Ptr &type=SchemaType::Ptr())
void setImportedSchemas(const NamespaceSet &schemas)
XsdFacet::Ptr parseEnumerationFacet()
XsdNotation::Ptr parseNotation()
bool parse(ParserType parserType=TopLevelParser)
NamespaceSet m_importedSchemas
QSet< QUrl > NamespaceSet
void parseSimpleRestriction(const XsdSimpleType::Ptr &ptr)
void parseSimpleContentRestriction(const XsdComplexType::Ptr &complexType)
XsdModelGroup::Ptr parseSequence(const NamedSchemaComponent::Ptr &parent)
XsdSchemaResolver * m_schemaResolver
void addNotation(const XsdNotation::Ptr ¬ation)
XsdFacet::Ptr parseMaxInclusiveFacet()
XsdSimpleType::Ptr parseLocalSimpleType()
QString readNamespaceAttribute(const QString &attributeName, const char *elementName)
QXmlName m_defaultAttributes
void setupStateMachines()
bool isAnyAttributeAllowed() const
The QIODevice class is the base interface class of all I/O devices in Qt.
void parseUnion(const XsdSimpleType::Ptr &ptr)
XsdXPathExpression::Ptr readXPathExpression(const char *elementName)
void addAttributeGroup(const XsdAttributeGroup::Ptr &group)
void parseField(const XsdIdentityConstraint::Ptr &ptr)
SchemaType::DerivationConstraints readDerivationConstraintAttribute(const SchemaType::DerivationConstraints &allowedConstraints, const char *elementName)
void setupBuiltinTypeNames()
XsdModelGroup::Ptr parseLocalAll(const XsdParticle::Ptr &particle, const NamedSchemaComponent::Ptr &parent)
NamespaceSupport m_namespaceSupport
bool isSchemaTag(XsdSchemaToken::NodeName tag, XsdSchemaToken::NodeName token, XsdSchemaToken::NodeName namespaceToken) const
XsdFacet::Ptr parseMaxExclusiveFacet()
XsdIdentityConstraint::Ptr parseUnique()
XsdModelGroup::Ptr parseLocalChoice(const XsdParticle::Ptr &particle, const NamedSchemaComponent::Ptr &parent)
XsdElement::Ptr parseGlobalElement()
XsdFacet::Ptr parsePatternFacet()
void setTargetNamespace(const QString &targetNamespace)