Qt 4.8
|
The schema instance reader. More...
#include <qxsdinstancereader_p.h>
Public Types | |
typedef QExplicitlySharedDataPointer< XsdInstanceReader > | Ptr |
Public Functions | |
XsdInstanceReader (const QAbstractXmlNodeModel *model, const XsdSchemaContext::Ptr &context) | |
Protected Functions | |
bool | atEnd () const |
QString | attribute (const QXmlName &name) const |
QXmlItem | attributeItem (const QXmlName &name) const |
QSet< QXmlName > | attributeNames () const |
QXmlName | convertToQName (const QString &name) const |
bool | hasAttribute (const QXmlName &name) const |
bool | hasChildElement () const |
bool | hasChildText () const |
bool | isEndElement () const |
bool | isStartElement () const |
QXmlItem | item () const |
QXmlName | name () const |
QVector< QXmlName > | namespaceBindings (const QXmlNodeModelIndex &index) const |
void | readNext () |
QSourceLocation | sourceLocation () const |
QString | text () const |
Protected Variables | |
XsdSchemaContext::Ptr | m_context |
Properties | |
QHash< QXmlName, QXmlItem > | m_cachedAttributeItems |
QHash< QXmlName, QString > | m_cachedAttributes |
QXmlItem | m_cachedItem |
QSourceLocation | m_cachedSourceLocation |
PullBridge | m_model |
The schema instance reader.
This class reads in a xml instance document from a QAbstractXmlNodeModel and provides a QXmlStreamReader like interface with some additional context information.
Definition at line 75 of file qxsdinstancereader_p.h.
Definition at line 78 of file qxsdinstancereader_p.h.
XsdInstanceReader::XsdInstanceReader | ( | const QAbstractXmlNodeModel * | model, |
const XsdSchemaContext::Ptr & | context | ||
) |
Creates a new instance reader that will read the data from the given model
.
model | The model the data are read from. |
context | The context that is used for error reporting etc. |
Definition at line 48 of file qxsdinstancereader.cpp.
|
protected |
Returns true
if the end of the document is reached, false
otherwise.
Definition at line 54 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::read().
Returns the attribute with the given name
of the current node.
Definition at line 145 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::qNameAttribute(), QPatternist::XsdValidatingInstanceReader::validate(), QPatternist::XsdValidatingInstanceReader::validateElement(), and QPatternist::XsdValidatingInstanceReader::validateElementComplexType().
Returns the QXmlItem for the attribute with the given name
at the current position.
Definition at line 181 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::validateAttribute().
Returns the list of attribute names of the current node.
Definition at line 152 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::validateElementComplexType(), and QPatternist::XsdValidatingInstanceReader::validateElementSimpleType().
Converts a qualified name into a QXmlName according to the namespace mappings of the current node.
Definition at line 118 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::selectNodeSets(), QPatternist::XsdValidatingInstanceReader::validate(), and QPatternist::XsdValidatingInstanceReader::validateElement().
|
protected |
Returns whether the current node has an attribute with the given name
.
Definition at line 140 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::validate(), and QPatternist::XsdValidatingInstanceReader::validateElement().
|
protected |
Returns whether the current node has an element node among its children.
Definition at line 97 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::validateElement(), QPatternist::XsdValidatingInstanceReader::validateElementComplexType(), and QPatternist::XsdValidatingInstanceReader::validateElementSimpleType().
|
protected |
Returns whether the current node has a text node among its children.
Definition at line 81 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::validateElement(), QPatternist::XsdValidatingInstanceReader::validateElementComplexType(), and QPatternist::XsdValidatingInstanceReader::validateElementSimpleType().
|
protected |
Returns whether the current node is an end element.
Definition at line 76 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::read().
|
protected |
Returns whether the current node is a start element.
Definition at line 71 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::read().
|
protected |
Returns the QXmlItem for the current position.
Definition at line 176 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::read(), QPatternist::XsdValidatingInstanceReader::selectNodeSets(), QPatternist::XsdValidatingInstanceReader::validate(), QPatternist::XsdValidatingInstanceReader::validateElementComplexType(), and QPatternist::XsdValidatingInstanceReader::validateElementSimpleType().
|
protected |
Returns the name of the current node.
Definition at line 113 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::anyType(), QPatternist::XsdValidatingInstanceReader::read(), QPatternist::XsdValidatingInstanceReader::selectNodeSets(), QPatternist::XsdValidatingInstanceReader::validate(), and QPatternist::XsdValidatingInstanceReader::validateAttributeWildcard().
|
protected |
Returns the namespace bindings for the given node model index
.
Definition at line 191 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::validateAttribute(), QPatternist::XsdValidatingInstanceReader::validateElementComplexType(), and QPatternist::XsdValidatingInstanceReader::validateElementSimpleType().
|
protected |
Reads the next node from the document.
Definition at line 59 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::read().
|
protected |
Returns a source location object for the current position.
Definition at line 186 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::error(), QPatternist::XsdValidatingInstanceReader::validateAttribute(), QPatternist::XsdValidatingInstanceReader::validateElementComplexType(), QPatternist::XsdValidatingInstanceReader::validateElementSimpleType(), QPatternist::XsdValidatingInstanceReader::validateKeyIdentityConstraint(), QPatternist::XsdValidatingInstanceReader::validateKeyRefIdentityConstraint(), and QPatternist::XsdValidatingInstanceReader::validateUniqueIdentityConstraint().
|
protected |
Returns the concatenated text of all direct child text nodes.
Definition at line 157 of file qxsdinstancereader.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::validateElementComplexType(), and QPatternist::XsdValidatingInstanceReader::validateElementSimpleType().
Definition at line 179 of file qxsdinstancereader_p.h.
Referenced by attributeItem(), and readNext().
Definition at line 178 of file qxsdinstancereader_p.h.
Referenced by attribute(), attributeNames(), hasAttribute(), and readNext().
|
private |
Definition at line 181 of file qxsdinstancereader_p.h.
Referenced by convertToQName(), item(), and readNext().
|
private |
Definition at line 180 of file qxsdinstancereader_p.h.
Referenced by readNext(), and sourceLocation().
|
protected |
The shared schema context.
Definition at line 174 of file qxsdinstancereader_p.h.
Referenced by convertToQName(), QPatternist::XsdValidatingInstanceReader::error(), QPatternist::XsdValidatingInstanceReader::loadSchema(), QPatternist::XsdValidatingInstanceReader::typeByName(), QPatternist::XsdValidatingInstanceReader::validateAttribute(), QPatternist::XsdValidatingInstanceReader::validateElementComplexType(), QPatternist::XsdValidatingInstanceReader::validateElementSimpleType(), QPatternist::XsdValidatingInstanceReader::validateKeyRefIdentityConstraint(), QPatternist::XsdValidatingInstanceReader::validateUniqueIdentityConstraint(), and QPatternist::XsdValidatingInstanceReader::XsdValidatingInstanceReader().
|
private |
Definition at line 177 of file qxsdinstancereader_p.h.
Referenced by atEnd(), hasChildElement(), hasChildText(), isEndElement(), isStartElement(), name(), readNext(), and text().