Qt 4.8
|
A push interface for the XPath Data Model. Similar to SAX's ContentHandler. More...
#include <qsequencereceiver_p.h>
Public Types | |
typedef QExplicitlySharedDataPointer< QAbstractXmlReceiver > | Ptr |
Public Functions | |
virtual void | attribute (const QXmlName name, const QString &value)=0 |
Signals the presence of an attribute node. More... | |
virtual void | characters (const QString &value)=0 |
virtual void | comment (const QString &value)=0 |
virtual void | endDocument ()=0 |
virtual void | endElement ()=0 |
Signals the end of the current element. More... | |
virtual void | item (const Item &item)=0 |
Sends an Item to this QAbstractXmlReceiver that may be a QXmlNodeModelIndex or an AtomicValue. More... | |
virtual void | namespaceBinding (const QXmlName &nb)=0 |
Signals the presence of the namespace declaration nb . More... | |
virtual void | processingInstruction (const QXmlName name, const QString &value)=0 |
QAbstractXmlReceiver () | |
virtual void | startDocument ()=0 |
virtual void | startElement (const QXmlName name)=0 |
Signals the start of an element by name name . More... | |
virtual void | whitespaceOnly (const QStringRef &value) |
virtual | ~QAbstractXmlReceiver () |
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... | |
Protected Functions | |
void | sendAsNode (const Item &outputItem) |
Private Functions | |
template<const QXmlNodeModelIndex::Axis axis> | |
void | sendFromAxis (const QXmlNodeModelIndex &node) |
Additional Inherited Members | |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
A push interface for the XPath Data Model. Similar to SAX's ContentHandler.
Definition at line 72 of file qsequencereceiver_p.h.
Definition at line 75 of file qsequencereceiver_p.h.
|
inline |
Definition at line 77 of file qsequencereceiver_p.h.
|
virtual |
Definition at line 50 of file qsequencereceiver.cpp.
Referenced by QAbstractXmlReceiver().
|
pure virtual |
Signals the presence of an attribute node.
This function is guaranteed by the caller to always be called after a call to startElement() or attribute().
name | the name of the attribute. Guaranteed to always be non-null. |
value | the value of the attribute. Guaranteed to always be non-null. |
Implemented in QPatternist::DocumentProjector.
Referenced by QPatternist::DocumentContentValidator::attribute(), QPatternist::OutputValidator::attribute(), QPatternist::AccelTree::copyNodeTo(), QPatternist::AttributeConstructor::evaluateSingleton(), QPatternist::AttributeConstructor::evaluateToSequenceReceiver(), QAbstractXmlReceiver(), and sendAsNode().
|
pure virtual |
Sends a text node with value value
. Adjascent text nodes may be sent. There's no restrictions on value
, beyond that it must be valid XML characters. For instance, value
may contain only whitespace.
Implemented in QPatternist::DocumentProjector.
Referenced by QPatternist::DocumentContentValidator::characters(), QPatternist::OutputValidator::characters(), QAbstractXmlReceiver(), sendAsNode(), and whitespaceOnly().
|
pure virtual |
Implemented in QPatternist::AccelTreeBuilder< FromDocument >, QPatternist::AccelTreeBuilder< true >, QPatternist::OutputValidator, QPatternist::DocumentContentValidator, and QPatternist::DocumentProjector.
Referenced by QPatternist::DocumentContentValidator::comment(), QPatternist::OutputValidator::comment(), QPatternist::CommentConstructor::evaluateSingleton(), QPatternist::CommentConstructor::evaluateToSequenceReceiver(), QAbstractXmlReceiver(), and sendAsNode().
|
pure virtual |
End of a document node.
Implemented in QPatternist::AccelTreeBuilder< FromDocument >, QPatternist::AccelTreeBuilder< true >, QPatternist::OutputValidator, QPatternist::DocumentContentValidator, and QPatternist::DocumentProjector.
Referenced by QPatternist::AccelTree::copyNodeTo(), QPatternist::DocumentContentValidator::endDocument(), QPatternist::OutputValidator::endDocument(), and QAbstractXmlReceiver().
|
pure virtual |
Signals the end of the current element.
Implemented in QPatternist::AccelTreeBuilder< FromDocument >, QPatternist::AccelTreeBuilder< true >, QPatternist::OutputValidator, QPatternist::DocumentContentValidator, and QPatternist::DocumentProjector.
Referenced by QPatternist::AccelTree::copyNodeTo(), QPatternist::DocumentProjector::endElement(), QPatternist::DocumentContentValidator::endElement(), QPatternist::OutputValidator::endElement(), QAbstractXmlReceiver(), and sendAsNode().
|
pure virtual |
Sends an Item to this QAbstractXmlReceiver that may be a QXmlNodeModelIndex or an AtomicValue.
Implemented in QPatternist::AccelTreeBuilder< FromDocument >, QPatternist::AccelTreeBuilder< true >, QPatternist::OutputValidator, QPatternist::DocumentContentValidator, and QPatternist::DocumentProjector.
Referenced by QPatternist::AccelTree::copyNodeTo(), QPatternist::Literal::evaluateToSequenceReceiver(), QPatternist::Expression::evaluateToSequenceReceiver(), QPatternist::DocumentContentValidator::item(), QPatternist::OutputValidator::item(), and QAbstractXmlReceiver().
|
pure virtual |
Signals the presence of the namespace declaration nb
.
This event is received after
startElement(), as opposed to SAX, and before any attribute() events.
Implemented in QPatternist::AccelTreeBuilder< FromDocument >, QPatternist::AccelTreeBuilder< true >, QPatternist::OutputValidator, and QPatternist::DocumentContentValidator.
Referenced by QPatternist::AccelTree::copyNodeTo(), QPatternist::NamespaceConstructor::evaluateToSequenceReceiver(), QPatternist::DocumentContentValidator::namespaceBinding(), QPatternist::OutputValidator::namespaceBinding(), QAbstractXmlReceiver(), QPatternist::AccelTree::sendNamespaces(), and QAbstractXmlNodeModel::sendNamespaces().
|
pure virtual |
Implemented in QPatternist::DocumentProjector.
Referenced by QPatternist::ProcessingInstructionConstructor::evaluateSingleton(), QPatternist::ProcessingInstructionConstructor::evaluateToSequenceReceiver(), QPatternist::DocumentContentValidator::processingInstruction(), QPatternist::OutputValidator::processingInstruction(), QAbstractXmlReceiver(), and sendAsNode().
|
protected |
Treats outputItem
as an node and calls the appropriate function, such as attribute() or comment(), depending on its QXmlNodeModelIndex::NodeKind.
This a helper function sub-classes can use to multi-plex Nodes received via item().
outputItem | must be a QXmlNodeModelIndex. |
Definition at line 68 of file qsequencereceiver.cpp.
Referenced by QPatternist::DocumentContentValidator::item(), QPatternist::OutputValidator::item(), QAbstractXmlReceiver(), and sendFromAxis().
|
inlineprivate |
Call sendAsNode() for each child of node
. As consistent with the XPath Data Model, this does not include attribute nodes.
Definition at line 55 of file qsequencereceiver.cpp.
Referenced by QAbstractXmlReceiver().
|
pure virtual |
Start of a document node.
Implemented in QPatternist::AccelTreeBuilder< FromDocument >, QPatternist::AccelTreeBuilder< true >, QPatternist::OutputValidator, QPatternist::DocumentContentValidator, and QPatternist::DocumentProjector.
Referenced by QPatternist::AccelTree::copyNodeTo(), QAbstractXmlReceiver(), QPatternist::DocumentContentValidator::startDocument(), and QPatternist::OutputValidator::startDocument().
|
pure virtual |
Signals the start of an element by name name
.
Implemented in QPatternist::DocumentProjector.
Referenced by QPatternist::AccelTree::copyNodeTo(), QAbstractXmlReceiver(), sendAsNode(), QPatternist::DocumentProjector::startElement(), QPatternist::DocumentContentValidator::startElement(), and QPatternist::OutputValidator::startElement().
|
virtual |
This function may be called instead of characters() if, and only if, value
consists only of whitespace.
The caller gurantees that value
, is not empty.
By whitespace is meant a sequence of characters that are either spaces, tabs, or the two new line characters, in any order. In other words, the whole of Unicode's whitespace category is not considered whitespace.
However, there's no guarantee or requirement that whitespaceOnly() is called for text nodes containing whitespace only, characters() may be called just as well. This is why the default implementation for whitespaceOnly() calls characters().
Reimplemented in QPatternist::AccelTreeBuilder< FromDocument >, and QPatternist::AccelTreeBuilder< true >.
Definition at line 119 of file qsequencereceiver.cpp.
Referenced by QAbstractXmlReceiver().