Qt 4.8
|
Implements the parsing of XML schema file. More...
#include <qxsdschemaparser_p.h>
Public Types | |
typedef QSet< QUrl > | NamespaceSet |
enum | ParserType { TopLevelParser, IncludeParser, ImportParser, RedefineParser } |
Public Types inherited from QXmlStreamReader | |
enum | Error { NoError, UnexpectedElementError, CustomError, NotWellFormedError, PrematureEndOfDocumentError } |
This enum specifies different error cases. More... | |
enum | ReadElementTextBehaviour { ErrorOnUnexpectedElement, IncludeChildElements, SkipChildElements } |
This enum specifies the different behaviours of readElementText(). More... | |
enum | TokenType { NoToken = 0, Invalid, StartDocument, EndDocument, StartElement, EndElement, Characters, Comment, DTD, EntityReference, ProcessingInstruction } |
This enum specifies the type of token the reader just read. More... | |
Public Functions | |
void | addImportedSchemas (const NamespaceSet &schemas) |
void | addIncludedSchemas (const NamespaceSet &schemas) |
void | addRedefinedSchemas (const NamespaceSet &schemas) |
QUrl | documentURI () const |
bool | isAnyAttributeAllowed () const |
bool | parse (ParserType parserType=TopLevelParser) |
void | setDocumentURI (const QUrl &uri) |
void | setImportedSchemas (const NamespaceSet &schemas) |
void | setIncludedSchemas (const NamespaceSet &schemas) |
void | setRedefinedSchemas (const NamespaceSet &schemas) |
void | setTargetNamespace (const QString &targetNamespace) |
XsdSchemaParser (const XsdSchemaContext::Ptr &context, const XsdSchemaParserContext::Ptr &parserContext, QIODevice *device) | |
Public Functions inherited from QXmlStreamReader | |
void | addData (const QByteArray &data) |
Adds more data for the reader to read. More... | |
void | addData (const QString &data) |
Adds more data for the reader to read. More... | |
void | addData (const char *data) |
Adds more data for the reader to read. More... | |
void | addExtraNamespaceDeclaration (const QXmlStreamNamespaceDeclaration &extraNamespaceDeclaraction) |
Adds an extraNamespaceDeclaration. More... | |
void | addExtraNamespaceDeclarations (const QXmlStreamNamespaceDeclarations &extraNamespaceDeclaractions) |
Adds a vector of declarations specified by extraNamespaceDeclarations. More... | |
bool | atEnd () const |
Returns true if the reader has read until the end of the XML document, or if an error() has occurred and reading has been aborted. More... | |
QXmlStreamAttributes | attributes () const |
Returns the attributes of a StartElement. More... | |
qint64 | characterOffset () const |
Returns the current character offset, starting with 0. More... | |
void | clear () |
Removes any device() or data from the reader and resets its internal state to the initial state. More... | |
qint64 | columnNumber () const |
Returns the current column number, starting with 0. More... | |
QIODevice * | device () const |
Returns the current device associated with the QXmlStreamReader, or 0 if no device has been assigned. More... | |
QStringRef | documentEncoding () const |
If the state() is StartDocument , this function returns the encoding string as specified in the XML declaration. More... | |
QStringRef | documentVersion () const |
If the state() is StartDocument , this function returns the version string as specified in the XML declaration. More... | |
QStringRef | dtdName () const |
If the state() is DTD , this function returns the DTD's name. More... | |
QStringRef | dtdPublicId () const |
If the state() is DTD , this function returns the DTD's public identifier. More... | |
QStringRef | dtdSystemId () const |
If the state() is DTD , this function returns the DTD's system identifier. More... | |
QXmlStreamEntityDeclarations | entityDeclarations () const |
If the state() is DTD , this function returns the DTD's unparsed (external) entity declarations. More... | |
QXmlStreamEntityResolver * | entityResolver () const |
Returns the entity resolver, or 0 if there is no entity resolver. More... | |
Error | error () const |
Returns the type of the current error, or NoError if no error occurred. More... | |
QString | errorString () const |
Returns the error message that was set with raiseError(). More... | |
bool | hasError () const |
Returns true if an error has occurred, otherwise false . More... | |
bool | isCDATA () const |
Returns true if the reader reports characters that stem from a CDATA section; otherwise returns false. More... | |
bool | isCharacters () const |
Returns true if tokenType() equals Characters ; otherwise returns false. More... | |
bool | isComment () const |
Returns true if tokenType() equals Comment ; otherwise returns false. More... | |
bool | isDTD () const |
Returns true if tokenType() equals DTD ; otherwise returns false. More... | |
bool | isEndDocument () const |
Returns true if tokenType() equals EndDocument ; otherwise returns false. More... | |
bool | isEndElement () const |
Returns true if tokenType() equals EndElement ; otherwise returns false. More... | |
bool | isEntityReference () const |
Returns true if tokenType() equals EntityReference ; otherwise returns false. More... | |
bool | isProcessingInstruction () const |
Returns true if tokenType() equals ProcessingInstruction ; otherwise returns false. More... | |
bool | isStandaloneDocument () const |
Returns true if this document has been declared standalone in the XML declaration; otherwise returns false. More... | |
bool | isStartDocument () const |
Returns true if tokenType() equals StartDocument ; otherwise returns false. More... | |
bool | isStartElement () const |
Returns true if tokenType() equals StartElement ; otherwise returns false. More... | |
bool | isWhitespace () const |
Returns true if the reader reports characters that only consist of white-space; otherwise returns false. More... | |
qint64 | lineNumber () const |
Returns the current line number, starting with 1. More... | |
QStringRef | name () const |
Returns the local name of a StartElement, EndElement, or an EntityReference. More... | |
QXmlStreamNamespaceDeclarations | namespaceDeclarations () const |
If the state() is StartElement , this function returns the element's namespace declarations. More... | |
bool | namespaceProcessing () const |
This property controls whether or not the stream reader processes namespaces. More... | |
QStringRef | namespaceUri () const |
Returns the namespaceUri of a StartElement or EndElement. More... | |
QXmlStreamNotationDeclarations | notationDeclarations () const |
If the state() is DTD , this function returns the DTD's notation declarations. More... | |
QStringRef | prefix () const |
Returns the prefix of a StartElement or EndElement. More... | |
QStringRef | processingInstructionData () const |
Returns the data of a ProcessingInstruction. More... | |
QStringRef | processingInstructionTarget () const |
Returns the target of a ProcessingInstruction. More... | |
QStringRef | qualifiedName () const |
Returns the qualified name of a StartElement or EndElement;. More... | |
QXmlStreamReader () | |
Constructs a stream reader. More... | |
QXmlStreamReader (QIODevice *device) | |
Creates a new stream reader that reads from device. More... | |
QXmlStreamReader (const QByteArray &data) | |
Creates a new stream reader that reads from data. More... | |
QXmlStreamReader (const QString &data) | |
Creates a new stream reader that reads from data. More... | |
QXmlStreamReader (const char *data) | |
Creates a new stream reader that reads from data. More... | |
void | raiseError (const QString &message=QString()) |
Raises a custom error with an optional error message. More... | |
QString | readElementText (ReadElementTextBehaviour behaviour) |
Convenience function to be called in case a StartElement was read. More... | |
QString | readElementText () |
TokenType | readNext () |
Reads the next token and returns its type. More... | |
bool | readNextStartElement () |
Reads until the next start element within the current element. More... | |
void | setDevice (QIODevice *device) |
Sets the current device to device. More... | |
void | setEntityResolver (QXmlStreamEntityResolver *resolver) |
Makes resolver the new entityResolver(). More... | |
void | setNamespaceProcessing (bool) |
void | skipCurrentElement () |
Reads until the end of the current element, skipping any child nodes. More... | |
QStringRef | text () const |
Returns the text of Characters , Comment , DTD , or EntityReference. More... | |
QString | tokenString () const |
Returns the reader's current token as string. More... | |
TokenType | tokenType () const |
Returns the type of the current token. More... | |
~QXmlStreamReader () | |
Destructs the reader. More... | |
Private Types | |
enum | XPathType { XPath20, XPathSelector, XPathField } |
Friends | |
class | ElementNamespaceHandler |
class | TagValidationHandler |
Implements the parsing of XML schema file.
This class parses a XML schema in XML presentation from an QIODevice and returns object representation as XsdSchema.
Definition at line 91 of file qxsdschemaparser_p.h.
Describes a set of namespace URIs
Definition at line 120 of file qxsdschemaparser_p.h.
Enumerator | |
---|---|
TopLevelParser | |
IncludeParser | |
ImportParser | |
RedefineParser |
Definition at line 97 of file qxsdschemaparser_p.h.
|
private |
Describes the type of XPath that is allowed by the readXPathAttribute method.
Enumerator | |
---|---|
XPath20 | |
XPathSelector | |
XPathField |
Definition at line 628 of file qxsdschemaparser_p.h.
XsdSchemaParser::XsdSchemaParser | ( | const XsdSchemaContext::Ptr & | context, |
const XsdSchemaParserContext::Ptr & | parserContext, | ||
QIODevice * | device | ||
) |
Creates a new schema parser object.
Definition at line 252 of file qxsdschemaparser.cpp.
|
private |
Adds an anonymous type
to the schema and checks for duplicated entries.
Definition at line 6052 of file qxsdschemaparser.cpp.
Referenced by parseAlternative(), parseGlobalAttribute(), parseGlobalElement(), parseList(), parseLocalAttribute(), parseLocalElement(), parseRedefine(), parseSimpleContentRestriction(), parseSimpleRestriction(), and parseUnion().
|
private |
Adds an attribute
to the schema and checks for duplicated entries.
Definition at line 6023 of file qxsdschemaparser.cpp.
Referenced by parseRedefine(), and parseSchema().
|
private |
Adds an attribute group
to the schema and checks for duplicated entries.
Definition at line 6061 of file qxsdschemaparser.cpp.
Referenced by parseRedefine(), and parseSchema().
|
private |
Adds an element
to the schema and checks for duplicated entries.
Definition at line 6012 of file qxsdschemaparser.cpp.
Referenced by parseRedefine(), and parseSchema().
|
private |
Adds an element group
to the schema and checks for duplicated entries.
Definition at line 6072 of file qxsdschemaparser.cpp.
Referenced by parseRedefine(), and parseSchema().
|
private |
Adds the facet
to the list of facets
for type
and checks for duplicates.
Definition at line 6105 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
Adds an identity constraint
to the schema and checks for duplicated entries.
Definition at line 6094 of file qxsdschemaparser.cpp.
Referenced by parseKey(), parseKeyRef(), and parseUnique().
void XsdSchemaParser::addImportedSchemas | ( | const NamespaceSet & | schemas | ) |
Adds schemas
to the list of already imported schemas, so the parser can detect multiple imports of the same schema.
Definition at line 277 of file qxsdschemaparser.cpp.
Referenced by parseImport(), parseInclude(), and parseRedefine().
void XsdSchemaParser::addIncludedSchemas | ( | const NamespaceSet & | schemas | ) |
Adds schemas
to the list of already included schemas, so the parser can detect multiple includes of the same schema.
Definition at line 267 of file qxsdschemaparser.cpp.
Referenced by parseImport(), parseInclude(), and parseRedefine().
|
private |
Adds a notation
to the schema and checks for duplicated entries.
Definition at line 6083 of file qxsdschemaparser.cpp.
Referenced by parseRedefine(), and parseSchema().
void XsdSchemaParser::addRedefinedSchemas | ( | const NamespaceSet & | schemas | ) |
Adds schemas
to the list of already redefined schemas, so the parser can detect multiple redefines of the same schema.
Definition at line 287 of file qxsdschemaparser.cpp.
Referenced by parseImport(), parseInclude(), and parseRedefine().
|
private |
Adds a type
to the schema and checks for duplicated entries.
Definition at line 6034 of file qxsdschemaparser.cpp.
Referenced by parseRedefine(), and parseSchema().
|
private |
Definition at line 361 of file qxsdschemaparser.cpp.
Referenced by parseAny(), parseAnyAttribute(), parseAppInfo(), parseComplexContent(), parseDefaultOpenContent(), parseDocumentation(), parseEnumerationFacet(), parseFractionDigitsFacet(), parseGlobalComplexType(), parseGlobalElement(), parseLengthFacet(), parseLocalAttribute(), parseLocalComplexType(), parseLocalElement(), parseMaxExclusiveFacet(), parseMaxInclusiveFacet(), parseMaxLengthFacet(), parseMinExclusiveFacet(), parseMinInclusiveFacet(), parseMinLengthFacet(), parseMinMaxConstraint(), parseNotation(), parseOpenContent(), parsePatternFacet(), parseSchema(), parseTotalDigitsFacet(), parseWhiteSpaceFacet(), readBlockingConstraintAttribute(), readDerivationConstraintAttribute(), readNameAttribute(), readNamespaceAttribute(), readQNameAttribute(), readXPathAttribute(), readXPathExpression(), and validateIdAttribute().
|
private |
Converts a qualified
name into a QXmlName name
and does some error handling.
Definition at line 5738 of file qxsdschemaparser.cpp.
Referenced by parseAlternative(), parseComplexContentExtension(), parseComplexContentRestriction(), parseGlobalAttribute(), parseGlobalElement(), parseKeyRef(), parseList(), parseLocalAttribute(), parseLocalElement(), parseReferredAttributeGroup(), parseReferredGroup(), parseSchema(), parseSimpleContentExtension(), parseSimpleContentRestriction(), parseSimpleRestriction(), and parseUnion().
|
private |
Returnes an source location for the current position.
Definition at line 5728 of file qxsdschemaparser.cpp.
Referenced by addAnonymousType(), addAttribute(), addAttributeGroup(), addElement(), addElementGroup(), addIdentityConstraint(), addNotation(), addType(), parseAlternative(), parseComplexContentExtension(), parseComplexContentRestriction(), parseGlobalAttribute(), parseGlobalElement(), parseKeyRef(), parseList(), parseLocalAttribute(), parseLocalElement(), parseReferredAttributeGroup(), parseReferredGroup(), parseSimpleContentExtension(), parseSimpleContentRestriction(), parseSimpleRestriction(), and parseUnion().
|
virtual |
Returns the document URI of the schema to parse.
Implements QPatternist::MaintainingReader< XsdSchemaToken, XsdTagScope::Type >.
Definition at line 318 of file qxsdschemaparser.cpp.
|
privatevirtual |
Used internally to report any kind of parsing error or schema inconsistency.
Definition at line 356 of file qxsdschemaparser.cpp.
Referenced by QPatternist::TagValidationHandler::finalize(), and QPatternist::TagValidationHandler::validate().
|
virtual |
Reimplemented from MaintainingReader, always returns false
.
Implements QPatternist::MaintainingReader< XsdSchemaToken, XsdTagScope::Type >.
Definition at line 323 of file qxsdschemaparser.cpp.
|
inlineprivate |
Checks whether the given tag
is equal to the given token
and the given namespaceToken
is the XML Schema namespace.
Definition at line 6007 of file qxsdschemaparser.cpp.
Referenced by parse(), parseAll(), parseAlternative(), parseAnnotation(), parseAny(), parseAnyAttribute(), parseAssertion(), parseChoice(), parseComplexContent(), parseComplexContentExtension(), parseComplexContentRestriction(), parseDefaultOpenContent(), parseEnumerationFacet(), parseField(), parseFractionDigitsFacet(), parseGlobalAttribute(), parseGlobalComplexType(), parseGlobalElement(), parseGlobalSimpleType(), parseImport(), parseInclude(), parseKey(), parseKeyRef(), parseLengthFacet(), parseList(), parseLocalAll(), parseLocalAttribute(), parseLocalChoice(), parseLocalComplexType(), parseLocalElement(), parseLocalSequence(), parseLocalSimpleType(), parseMaxExclusiveFacet(), parseMaxInclusiveFacet(), parseMaxLengthFacet(), parseMinExclusiveFacet(), parseMinInclusiveFacet(), parseMinLengthFacet(), parseNamedAttributeGroup(), parseNamedGroup(), parseNotation(), parseOpenContent(), parsePatternFacet(), parseRedefine(), parseReferredAttributeGroup(), parseReferredGroup(), parseSchema(), parseSelector(), parseSequence(), parseSimpleContent(), parseSimpleContentExtension(), parseSimpleContentRestriction(), parseSimpleRestriction(), parseTotalDigitsFacet(), parseUnion(), parseUnique(), and parseWhiteSpaceFacet().
bool XsdSchemaParser::parse | ( | ParserType | parserType = TopLevelParser | ) |
Parses the XML schema file.
true
on success, false
if the schema is somehow invalid. Definition at line 328 of file qxsdschemaparser.cpp.
Referenced by QXmlSchemaPrivate::load(), parseImport(), and parseRedefine().
|
private |
This method is called for parsing an all object as child of a top-level group object.
parent | The schema component the all object is part of. |
Definition at line 3594 of file qxsdschemaparser.cpp.
Referenced by parseNamedGroup().
|
private |
This method is called for parsing an alternative object inside an element object.
Definition at line 5239 of file qxsdschemaparser.cpp.
Referenced by parseGlobalElement(), and parseLocalElement().
|
private |
This method is called for parsing any annotation object everywhere in the schema.
Definition at line 1185 of file qxsdschemaparser.cpp.
Referenced by parseAll(), parseAlternative(), parseAny(), parseAnyAttribute(), parseAssertion(), parseChoice(), parseComplexContent(), parseComplexContentExtension(), parseComplexContentRestriction(), parseDefaultOpenContent(), parseEnumerationFacet(), parseField(), parseFractionDigitsFacet(), parseGlobalAttribute(), parseGlobalComplexType(), parseGlobalElement(), parseGlobalSimpleType(), parseImport(), parseInclude(), parseKey(), parseKeyRef(), parseLengthFacet(), parseList(), parseLocalAll(), parseLocalAttribute(), parseLocalChoice(), parseLocalComplexType(), parseLocalElement(), parseLocalSequence(), parseLocalSimpleType(), parseMaxExclusiveFacet(), parseMaxInclusiveFacet(), parseMaxLengthFacet(), parseMinExclusiveFacet(), parseMinInclusiveFacet(), parseMinLengthFacet(), parseNamedAttributeGroup(), parseNamedGroup(), parseNotation(), parseOpenContent(), parsePatternFacet(), parseRedefine(), parseReferredAttributeGroup(), parseReferredGroup(), parseSchema(), parseSelector(), parseSequence(), parseSimpleContent(), parseSimpleContentExtension(), parseSimpleContentRestriction(), parseSimpleRestriction(), parseTotalDigitsFacet(), parseUnion(), parseUnique(), and parseWhiteSpaceFacet().
|
private |
This method is called for parsing an any object somewhere in the schema.
particle | The particle the any object belongs to. |
Definition at line 5410 of file qxsdschemaparser.cpp.
Referenced by parseChoice(), parseDefaultOpenContent(), parseLocalChoice(), parseLocalSequence(), parseOpenContent(), and parseSequence().
|
private |
This method is called for parsing an anyAttribute object somewhere in the schema.
Definition at line 5526 of file qxsdschemaparser.cpp.
Referenced by parseComplexContentExtension(), parseComplexContentRestriction(), parseGlobalComplexType(), parseLocalComplexType(), parseNamedAttributeGroup(), parseSimpleContentExtension(), and parseSimpleContentRestriction().
|
private |
This method is called for parsing an appinfo object as child of an annotation object.
Definition at line 1227 of file qxsdschemaparser.cpp.
Referenced by parseAnnotation().
|
private |
This method is called for parsing an assert object as child of a complexType or parsing a assertion facet object as child of a simpleType.
nodeName | Either XsdSchemaToken::Assert or XsdSchemaToken::Assertion. |
tag | Either XsdTagScope::Assert or XsdTagScope::Assertion. |
Definition at line 3383 of file qxsdschemaparser.cpp.
Referenced by parseAssertionFacet(), parseComplexContentExtension(), parseComplexContentRestriction(), parseGlobalComplexType(), parseLocalComplexType(), parseSimpleContentExtension(), and parseSimpleContentRestriction().
|
private |
This method is called for parsing an assertion object as child of a restriction object.
Definition at line 2548 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
This method is called for parsing a choice object as child of a top-level group object.
parent | The schema component the choice object is part of. |
Definition at line 3728 of file qxsdschemaparser.cpp.
Referenced by parseNamedGroup().
|
private |
This method is called for parsing a complexContent object as child of a complexType object.
complexType | The complex type the complex content belongs to. |
mixed | The output parameter for the mixed value. |
Definition at line 3155 of file qxsdschemaparser.cpp.
Referenced by parseGlobalComplexType(), and parseLocalComplexType().
|
private |
This method is called for parsing an extension object as child of a complexContent object.
Definition at line 3296 of file qxsdschemaparser.cpp.
Referenced by parseComplexContent().
|
private |
This method is called for parsing a restriction object as child of a complexContent object.
Definition at line 3210 of file qxsdschemaparser.cpp.
Referenced by parseComplexContent().
|
private |
This method is called for parsing a defaultOpenContent object.
Definition at line 1309 of file qxsdschemaparser.cpp.
Referenced by parseSchema().
|
private |
This method is called for parsing a documentation object as child of an annotation object.
Definition at line 1263 of file qxsdschemaparser.cpp.
Referenced by parseAnnotation().
|
private |
This method is called for parsing an enumeration object as child of a restriction object.
Definition at line 2368 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
This method is called for parsing a field object as child of an unique object, key object or keyref object,
ptr | The identity constraint it belongs to. |
Definition at line 5197 of file qxsdschemaparser.cpp.
Referenced by parseKey(), parseKeyRef(), and parseUnique().
|
private |
This method is called for parsing a fractionDigits object as child of a restriction object.
Definition at line 2120 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
This method is called for parsing any top-level attribute object.
Definition at line 4014 of file qxsdschemaparser.cpp.
Referenced by parseSchema().
|
private |
This method is called for parsing any top-level complexType object.
Definition at line 2561 of file qxsdschemaparser.cpp.
Referenced by parseRedefine(), and parseSchema().
|
private |
This method is called for parsing any top-level element object.
Definition at line 4471 of file qxsdschemaparser.cpp.
Referenced by parseSchema().
|
private |
This method is called for parsing any top-level simpleType object.
Definition at line 1377 of file qxsdschemaparser.cpp.
Referenced by parseRedefine(), and parseSchema().
|
private |
This method is called for parsing any top-level import object.
Definition at line 652 of file qxsdschemaparser.cpp.
Referenced by parseSchema().
|
private |
This method is called for parsing any top-level include object.
Definition at line 580 of file qxsdschemaparser.cpp.
Referenced by parseSchema().
|
private |
This method is called for parsing a key object as child of an element object.
Definition at line 5050 of file qxsdschemaparser.cpp.
Referenced by parseGlobalElement(), and parseLocalElement().
|
private |
This method is called for parsing a keyref object as child of an element object.
Definition at line 5100 of file qxsdschemaparser.cpp.
Referenced by parseGlobalElement(), and parseLocalElement().
|
private |
This method is called for parsing a length object as child of a restriction object.
Definition at line 2182 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
This method is called for parsing a list object as child of a simpleType object.
Definition at line 1635 of file qxsdschemaparser.cpp.
Referenced by parseGlobalSimpleType(), and parseLocalSimpleType().
|
private |
This method is called for parsing an all object as descendant of a complexType object.
particle | The particle the all object belongs to. |
parent | The schema component the all object is part of. |
Definition at line 3651 of file qxsdschemaparser.cpp.
Referenced by parseComplexContentExtension(), parseComplexContentRestriction(), parseGlobalComplexType(), and parseLocalComplexType().
|
private |
This method is called for parsing any non-top-level attribute object as a descendant of a complexType object or an attributeGroup object.
parent | The parent component the attribute object is part of. |
Definition at line 4131 of file qxsdschemaparser.cpp.
Referenced by parseComplexContentExtension(), parseComplexContentRestriction(), parseGlobalComplexType(), parseLocalComplexType(), parseNamedAttributeGroup(), parseSimpleContentExtension(), and parseSimpleContentRestriction().
|
private |
This method is called for parsing a choice object as descendant of a complexType object or a choice object.
particle | The particle the choice object belongs to. |
parent | The schema component the choice object is part of. |
Definition at line 3797 of file qxsdschemaparser.cpp.
Referenced by parseChoice(), parseComplexContentExtension(), parseComplexContentRestriction(), parseGlobalComplexType(), parseLocalComplexType(), parseLocalSequence(), and parseSequence().
|
private |
This method is called for parsing any complexType object as descendant of an element object.
Definition at line 2735 of file qxsdschemaparser.cpp.
Referenced by parseAlternative(), parseGlobalElement(), and parseLocalElement().
|
private |
This method is called for parsing any non-top-level element object as a descendant of a complexType object or a group object.
particle | The particle the element object belongs to. |
parent | The parent component the element object is part of. |
Definition at line 4685 of file qxsdschemaparser.cpp.
Referenced by parseAll(), parseChoice(), parseLocalAll(), parseLocalChoice(), parseLocalSequence(), and parseSequence().
|
private |
This method is called for parsing a sequence object as descendant of a complexType object or a sequence object.
particle | The particle the sequence object belongs to. |
parent | The schema component the sequence object is part of. |
Definition at line 3940 of file qxsdschemaparser.cpp.
Referenced by parseChoice(), parseComplexContentExtension(), parseComplexContentRestriction(), parseGlobalComplexType(), parseLocalChoice(), parseLocalComplexType(), and parseSequence().
|
private |
This method is called for parsing any simpleType object as descendant of an element or complexType object.
Definition at line 1429 of file qxsdschemaparser.cpp.
Referenced by parseAlternative(), parseGlobalAttribute(), parseGlobalElement(), parseList(), parseLocalAttribute(), parseLocalElement(), parseSimpleContentRestriction(), parseSimpleRestriction(), and parseUnion().
|
private |
This method is called for parsing a maxExclusive object as child of a restriction object.
Definition at line 1930 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
This method is called for parsing a maxInclusive object as child of a restriction object.
Definition at line 1994 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
This method is called for parsing a maxLength object as child of a restriction object.
Definition at line 2306 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
This method is called for parsing a minExclusive object as child of a restriction object.
Definition at line 1802 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
This method is called for parsing a minInclusive object as child of a restriction object.
Definition at line 1866 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
This method is called for parsing a minLength object as child of a restriction object.
Definition at line 2244 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
A helper method that parses the minOccurs and maxOccurs constraints for the given particle
that has the given tagName
.
Definition at line 5679 of file qxsdschemaparser.cpp.
Referenced by parseAny(), parseLocalAll(), parseLocalChoice(), parseLocalElement(), parseLocalSequence(), and parseReferredGroup().
|
private |
This method is called for parsing a top-level attributeGroup object.
Definition at line 4369 of file qxsdschemaparser.cpp.
Referenced by parseRedefine(), and parseSchema().
|
private |
This method is called for parsing a top-level group object.
Definition at line 3488 of file qxsdschemaparser.cpp.
Referenced by parseRedefine(), and parseSchema().
|
private |
This method is called for parsing a top-level notation object.
Definition at line 5322 of file qxsdschemaparser.cpp.
Referenced by parseSchema().
|
private |
This method is called for parsing an openContent object.
Definition at line 3429 of file qxsdschemaparser.cpp.
Referenced by parseComplexContentExtension(), parseComplexContentRestriction(), parseGlobalComplexType(), and parseLocalComplexType().
|
private |
This method is called for parsing a pattern object as child of a restriction object.
Definition at line 2494 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
This method is called for parsing any top-level redefine object.
Definition at line 776 of file qxsdschemaparser.cpp.
Referenced by parseSchema().
|
private |
This method is called for parsing a non-top-level attributeGroup object that contains a ref attribute.
Definition at line 4425 of file qxsdschemaparser.cpp.
Referenced by parseComplexContentExtension(), parseComplexContentRestriction(), parseGlobalComplexType(), parseLocalComplexType(), parseNamedAttributeGroup(), parseSimpleContentExtension(), and parseSimpleContentRestriction().
|
private |
This method is called for parsing a non-top-level group object that contains a ref attribute.
Definition at line 3544 of file qxsdschemaparser.cpp.
Referenced by parseChoice(), parseComplexContentExtension(), parseComplexContentRestriction(), parseGlobalComplexType(), parseLocalChoice(), parseLocalComplexType(), parseLocalSequence(), and parseSequence().
|
private |
This method is called for parsing the top-level schema object.
Definition at line 377 of file qxsdschemaparser.cpp.
Referenced by parse().
|
private |
This method is called for parsing a selector object as child of an unique object, key object or keyref object,
ptr | The identity constraint it belongs to. |
Definition at line 5155 of file qxsdschemaparser.cpp.
Referenced by parseKey(), parseKeyRef(), and parseUnique().
|
private |
This method is called for parsing a sequence object as child of a top-level group object.
parent | The schema component the sequence object is part of. |
Definition at line 3871 of file qxsdschemaparser.cpp.
Referenced by parseNamedGroup().
|
private |
This method is called for parsing a simpleContent object as child of a complexType object.
Definition at line 2915 of file qxsdschemaparser.cpp.
Referenced by parseGlobalComplexType(), and parseLocalComplexType().
|
private |
This method is called for parsing an extension object as child of a simpleContent object.
Definition at line 3101 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContent().
|
private |
This method is called for parsing a restriction object as child of a simpleContent object.
Definition at line 2956 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContent().
|
private |
This method is called for parsing a restriction object as child of a simpleType object.
Definition at line 1475 of file qxsdschemaparser.cpp.
Referenced by parseGlobalSimpleType(), and parseLocalSimpleType().
|
private |
This method is called for parsing a totalDigits object as child of a restriction object.
Definition at line 2058 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
This method is called for parsing a union object as child of a simpleType object.
Definition at line 1722 of file qxsdschemaparser.cpp.
Referenced by parseGlobalSimpleType(), and parseLocalSimpleType().
|
private |
This method is called for parsing a unique object as child of an element object.
Definition at line 5000 of file qxsdschemaparser.cpp.
Referenced by parseGlobalElement(), and parseLocalElement().
|
private |
This method is called for parsing unknown object in the schema.
Definition at line 5658 of file qxsdschemaparser.cpp.
Referenced by parseAll(), parseAlternative(), parseAnnotation(), parseAny(), parseAnyAttribute(), parseAssertion(), parseChoice(), parseComplexContent(), parseComplexContentExtension(), parseComplexContentRestriction(), parseDefaultOpenContent(), parseEnumerationFacet(), parseField(), parseFractionDigitsFacet(), parseGlobalAttribute(), parseGlobalComplexType(), parseGlobalElement(), parseGlobalSimpleType(), parseImport(), parseInclude(), parseKey(), parseKeyRef(), parseLengthFacet(), parseList(), parseLocalAll(), parseLocalAttribute(), parseLocalChoice(), parseLocalComplexType(), parseLocalElement(), parseLocalSequence(), parseLocalSimpleType(), parseMaxExclusiveFacet(), parseMaxInclusiveFacet(), parseMaxLengthFacet(), parseMinExclusiveFacet(), parseMinInclusiveFacet(), parseMinLengthFacet(), parseNamedAttributeGroup(), parseNamedGroup(), parseNotation(), parseOpenContent(), parsePatternFacet(), parseRedefine(), parseReferredAttributeGroup(), parseReferredGroup(), parseSchema(), parseSelector(), parseSequence(), parseSimpleContent(), parseSimpleContentExtension(), parseSimpleContentRestriction(), parseSimpleRestriction(), parseTotalDigitsFacet(), parseUnion(), parseUnique(), and parseWhiteSpaceFacet().
|
private |
This method is called for parsing unknown object as descendant of the annotation object.
Definition at line 5639 of file qxsdschemaparser.cpp.
Referenced by parseAppInfo(), and parseDocumentation().
|
private |
This method is called for parsing a whiteSpace object as child of a restriction object.
Definition at line 2425 of file qxsdschemaparser.cpp.
Referenced by parseSimpleContentRestriction(), and parseSimpleRestriction().
|
inlineprivate |
A helper method that reads the block attribute and does correct handling of schema default definitions.
Definition at line 5842 of file qxsdschemaparser.cpp.
Referenced by parseGlobalComplexType(), parseGlobalElement(), and parseLocalElement().
|
inlineprivate |
A helper method that reads the final attribute and does correct handling of schema default definitions.
Definition at line 5779 of file qxsdschemaparser.cpp.
Referenced by parseGlobalComplexType(), parseGlobalElement(), and parseGlobalSimpleType().
|
inlineprivate |
A helper method that reads in a 'name' attribute and checks it for syntactic errors.
Definition at line 5746 of file qxsdschemaparser.cpp.
Referenced by parseGlobalAttribute(), parseGlobalComplexType(), parseGlobalElement(), parseGlobalSimpleType(), parseKey(), parseKeyRef(), parseLocalAttribute(), parseLocalElement(), parseNamedAttributeGroup(), parseNamedGroup(), parseNotation(), and parseUnique().
|
inlineprivate |
A helper method that reads in a namespace attribute and checks for syntactic errors.
Definition at line 5768 of file qxsdschemaparser.cpp.
Referenced by parseSchema().
|
inlineprivate |
A helper method that reads in an attribute that contains an QName and checks it for syntactic errors.
Definition at line 5757 of file qxsdschemaparser.cpp.
Referenced by parseAlternative(), parseComplexContentExtension(), parseComplexContentRestriction(), parseGlobalAttribute(), parseGlobalElement(), parseKeyRef(), parseList(), parseLocalAttribute(), parseLocalElement(), parseReferredAttributeGroup(), parseReferredGroup(), parseSchema(), parseSimpleContentExtension(), parseSimpleContentRestriction(), and parseSimpleRestriction().
|
private |
A helper method that reads an attribute that represents a xpath query and does basic validation.
Definition at line 5955 of file qxsdschemaparser.cpp.
Referenced by parseAlternative(), parseAssertion(), parseField(), and parseSelector().
|
private |
A helper method that reads all components for a xpath expression for the current scope.
Definition at line 5901 of file qxsdschemaparser.cpp.
Referenced by parseAlternative(), parseAssertion(), parseField(), and parseSelector().
|
private |
This method resolves the content type of the complexType
for the given effectiveMixed
value.
Definition at line 2882 of file qxsdschemaparser.cpp.
Referenced by parseGlobalComplexType(), and parseLocalComplexType().
void XsdSchemaParser::setDocumentURI | ( | const QUrl & | uri | ) |
Sets the document URI of the schema to parse.
Definition at line 308 of file qxsdschemaparser.cpp.
Referenced by QXmlSchemaPrivate::load(), parseImport(), parseInclude(), and parseRedefine().
void XsdSchemaParser::setImportedSchemas | ( | const NamespaceSet & | schemas | ) |
Sets which schemas
have been imported already, so the parser can detect circular imports.
Definition at line 282 of file qxsdschemaparser.cpp.
Referenced by parseImport(), and parseRedefine().
void XsdSchemaParser::setIncludedSchemas | ( | const NamespaceSet & | schemas | ) |
Sets which schemas
have been included already, so the parser can detect multiple includes of the same schema.
Definition at line 272 of file qxsdschemaparser.cpp.
Referenced by parseImport(), and parseRedefine().
void XsdSchemaParser::setRedefinedSchemas | ( | const NamespaceSet & | schemas | ) |
Sets which schemas
have been redefined already, so the parser can detect multiple redefines of the same schema.
Definition at line 292 of file qxsdschemaparser.cpp.
Referenced by parseImport(), and parseRedefine().
void XsdSchemaParser::setTargetNamespace | ( | const QString & | targetNamespace | ) |
Sets the target namespace of the schema to parse.
Definition at line 297 of file qxsdschemaparser.cpp.
Referenced by QXmlSchemaPrivate::load(), and parseImport().
|
private |
Sets the target namespace of the schema to parse.
Definition at line 302 of file qxsdschemaparser.cpp.
Referenced by parseRedefine().
|
private |
Sets up a list of names of known builtin types.
Definition at line 846 of file qxsdschemaparser_setup.cpp.
Referenced by XsdSchemaParser().
|
private |
Sets up the state machines for validating the right occurrence of xml elements.
Definition at line 50 of file qxsdschemaparser_setup.cpp.
Referenced by XsdSchemaParser().
|
inlineprivate |
A helper method that reads in an "id" attribute, checks it for syntactic errors and tests whether a component with the same id has already been parsed.
Definition at line 5990 of file qxsdschemaparser.cpp.
Referenced by parseAll(), parseAlternative(), parseAnnotation(), parseAny(), parseAnyAttribute(), parseAssertion(), parseChoice(), parseComplexContent(), parseComplexContentExtension(), parseComplexContentRestriction(), parseDefaultOpenContent(), parseEnumerationFacet(), parseField(), parseFractionDigitsFacet(), parseGlobalAttribute(), parseGlobalComplexType(), parseGlobalElement(), parseGlobalSimpleType(), parseImport(), parseInclude(), parseKey(), parseKeyRef(), parseLengthFacet(), parseList(), parseLocalAll(), parseLocalAttribute(), parseLocalChoice(), parseLocalComplexType(), parseLocalElement(), parseLocalSequence(), parseLocalSimpleType(), parseMaxExclusiveFacet(), parseMaxInclusiveFacet(), parseMaxLengthFacet(), parseMinExclusiveFacet(), parseMinInclusiveFacet(), parseMinLengthFacet(), parseNamedAttributeGroup(), parseNamedGroup(), parseNotation(), parseOpenContent(), parsePatternFacet(), parseRedefine(), parseReferredAttributeGroup(), parseReferredGroup(), parseSchema(), parseSelector(), parseSequence(), parseSimpleContent(), parseSimpleContentExtension(), parseSimpleContentRestriction(), parseSimpleRestriction(), parseTotalDigitsFacet(), parseUnion(), parseUnique(), and parseWhiteSpaceFacet().
|
friend |
Definition at line 93 of file qxsdschemaparser_p.h.
|
friend |
Definition at line 94 of file qxsdschemaparser_p.h.
|
private |
Definition at line 715 of file qxsdschemaparser_p.h.
Referenced by parseLocalAttribute(), and parseSchema().
|
private |
Definition at line 717 of file qxsdschemaparser_p.h.
Referenced by parseSchema(), and readBlockingConstraintAttribute().
Definition at line 731 of file qxsdschemaparser_p.h.
Referenced by addType(), and setupBuiltinTypeNames().
|
private |
Definition at line 730 of file qxsdschemaparser_p.h.
Referenced by addAnonymousType(), addAttribute(), addAttributeGroup(), addElement(), addElementGroup(), addIdentityConstraint(), addNotation(), addType(), parse(), and parseLocalAttribute().
|
private |
Definition at line 707 of file qxsdschemaparser_p.h.
Referenced by parseImport(), parseInclude(), and parseRedefine().
|
private |
Definition at line 720 of file qxsdschemaparser_p.h.
Referenced by parseSchema().
|
private |
Definition at line 721 of file qxsdschemaparser_p.h.
Referenced by parse(), parseDefaultOpenContent(), and parseOpenContent().
|
private |
Definition at line 722 of file qxsdschemaparser_p.h.
Referenced by parse(), and parseDefaultOpenContent().
|
private |
Definition at line 727 of file qxsdschemaparser_p.h.
Referenced by currentSourceLocation(), documentURI(), parseImport(), parseInclude(), parseRedefine(), readXPathAttribute(), and setDocumentURI().
|
private |
Definition at line 716 of file qxsdschemaparser_p.h.
Referenced by parseLocalElement(), and parseSchema().
|
private |
Definition at line 718 of file qxsdschemaparser_p.h.
Referenced by parseSchema(), and readDerivationConstraintAttribute().
|
private |
Definition at line 728 of file qxsdschemaparser_p.h.
Referenced by validateIdAttribute(), and XsdSchemaParser().
|
private |
Definition at line 725 of file qxsdschemaparser_p.h.
Referenced by addImportedSchemas(), parseImport(), parseInclude(), parseRedefine(), setDocumentURI(), and setImportedSchemas().
|
private |
Definition at line 724 of file qxsdschemaparser_p.h.
Referenced by addIncludedSchemas(), parseImport(), parseInclude(), parseRedefine(), setDocumentURI(), and setIncludedSchemas().
|
private |
Definition at line 709 of file qxsdschemaparser_p.h.
Referenced by addAttribute(), addAttributeGroup(), addElement(), addElementGroup(), addFacet(), addIdentityConstraint(), addNotation(), addType(), attributeContentError(), parseAll(), parseAlternative(), parseAnnotation(), parseAny(), parseAnyAttribute(), parseAssertion(), parseChoice(), parseComplexContent(), parseComplexContentExtension(), parseComplexContentRestriction(), parseDefaultOpenContent(), parseEnumerationFacet(), parseField(), parseFractionDigitsFacet(), parseGlobalAttribute(), parseGlobalComplexType(), parseGlobalElement(), parseGlobalSimpleType(), parseImport(), parseInclude(), parseKey(), parseKeyRef(), parseLengthFacet(), parseList(), parseLocalAll(), parseLocalAttribute(), parseLocalChoice(), parseLocalComplexType(), parseLocalElement(), parseLocalSequence(), parseLocalSimpleType(), parseMaxExclusiveFacet(), parseMaxInclusiveFacet(), parseMaxLengthFacet(), parseMinExclusiveFacet(), parseMinInclusiveFacet(), parseMinLengthFacet(), parseMinMaxConstraint(), parseNamedAttributeGroup(), parseNamedGroup(), parseNotation(), parseOpenContent(), parsePatternFacet(), parseRedefine(), parseReferredAttributeGroup(), parseReferredGroup(), parseSchema(), parseSelector(), parseSequence(), parseSimpleContent(), parseSimpleContentExtension(), parseSimpleContentRestriction(), parseSimpleRestriction(), parseTotalDigitsFacet(), parseUnion(), parseUnique(), parseWhiteSpaceFacet(), readXPathAttribute(), readXPathExpression(), setTargetNamespaceExtended(), setupBuiltinTypeNames(), setupStateMachines(), and validateIdAttribute().
|
private |
Definition at line 710 of file qxsdschemaparser_p.h.
Referenced by convertName(), QPatternist::ElementNamespaceHandler::ElementNamespaceHandler(), parseEnumerationFacet(), parseUnknown(), parseUnknownDocumentation(), readXPathAttribute(), readXPathExpression(), setTargetNamespaceExtended(), and QPatternist::ElementNamespaceHandler::~ElementNamespaceHandler().
|
private |
Definition at line 708 of file qxsdschemaparser_p.h.
Referenced by parseImport(), parseInclude(), parseLocalComplexType(), parseLocalSimpleType(), parseRedefine(), and XsdSchemaParser().
|
private |
Definition at line 726 of file qxsdschemaparser_p.h.
Referenced by addRedefinedSchemas(), parseImport(), parseInclude(), parseRedefine(), setDocumentURI(), and setRedefinedSchemas().
|
private |
Definition at line 712 of file qxsdschemaparser_p.h.
Referenced by addAnonymousType(), addAttribute(), addAttributeGroup(), addElement(), addElementGroup(), addIdentityConstraint(), addNotation(), addType(), parseImport(), parseInclude(), parseRedefine(), parseSchema(), and XsdSchemaParser().
|
private |
Definition at line 711 of file qxsdschemaparser_p.h.
Referenced by parse(), parseAlternative(), parseChoice(), parseComplexContentExtension(), parseComplexContentRestriction(), parseEnumerationFacet(), parseGlobalAttribute(), parseGlobalElement(), parseKeyRef(), parseList(), parseLocalAttribute(), parseLocalChoice(), parseLocalElement(), parseLocalSequence(), parseRedefine(), parseSequence(), parseSimpleContentExtension(), parseSimpleContentRestriction(), parseSimpleRestriction(), parseUnion(), resolveComplexContentType(), and XsdSchemaParser().
|
private |
Definition at line 729 of file qxsdschemaparser_p.h.
Referenced by setupStateMachines(), and QPatternist::TagValidationHandler::TagValidationHandler().
|
private |
Definition at line 714 of file qxsdschemaparser_p.h.
Referenced by parseAny(), parseAnyAttribute(), parseGlobalAttribute(), parseGlobalComplexType(), parseGlobalElement(), parseGlobalSimpleType(), parseImport(), parseInclude(), parseKey(), parseKeyRef(), parseLocalAttribute(), parseLocalComplexType(), parseLocalElement(), parseLocalSimpleType(), parseNamedAttributeGroup(), parseNamedGroup(), parseNotation(), parseRedefine(), parseSchema(), parseUnique(), readXPathExpression(), setTargetNamespace(), and setTargetNamespaceExtended().
|
private |
Definition at line 719 of file qxsdschemaparser_p.h.
Referenced by parseSchema(), and readXPathExpression().