59 , m_hasCreatedSorter(kind != RegularPath)
61 , m_checkXPTY0018(kind == RegularPath)
96 } hasFound = FoundNone;
100 Item next(result->next());
104 const FoundItem found = next.
isAtomicValue() ? FoundAtomicValue : FoundNode;
106 if(hasFound != FoundNone && hasFound != found)
109 context->
error(QtXmlPatterns::tr(
"The last step in a path must contain either nodes " 110 "or atomic values. It cannot be a mixture between the two."),
117 next = result->next();
158 while(source->next())
247 return makeGenericSequenceType(opType->itemType(),
253 return visitor->visit(
this);
virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context, const SequenceType::Ptr &reqType)
Item::Iterator::Ptr mapToSequence(const Item &item, const DynamicContext::Ptr &context) const
#define QT_END_NAMESPACE
This macro expands to.
virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const
static const SequenceType::Ptr ZeroOrMoreItems
Path(const Expression::Ptr &operand1, const Expression::Ptr &operand2, const Kind kind=RegularPath)
virtual ExpressionVisitorResult::Ptr accept(const ExpressionVisitor::Ptr &visitor) const
virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context, const SequenceType::Ptr &reqType)
static const SequenceType::Ptr ZeroOrMoreNodes
QAbstractXmlForwardIterator< T >::Ptr makeListIterator(const QList< T > &list)
virtual ItemType::Ptr newFocusType() const
virtual Expression::Ptr compress(const StaticContext::Ptr &context)
virtual Expression::Ptr compress(const StaticContext::Ptr &context)
virtual SequenceType::Ptr staticType() const
DynamicContext::Ptr createFocus()
void append(const T &t)
Inserts value at the end of the list.
#define QT_BEGIN_NAMESPACE
This macro expands to.
void error(const QString &message, const ReportContext::ErrorCode errorCode, const QSourceLocation &sourceLocation)
static const ItemType::Ptr item
The namespace for the internal API of QtXmlPatterns.
virtual void setFocusIterator(const Item::Iterator::Ptr &it)=0
virtual Cardinality cardinality() const =0
QExplicitlySharedDataPointer< const Path > ConstPtr
virtual SequenceType::List expectedOperandTypes() const
bool isAtomicValue() const
Determines whether this item is an atomic value, or a node.
virtual SequenceType::Ptr staticType() const =0
virtual Properties properties() const
Contains functions used for formatting arguments, such as keywords and paths, in translated strings...
Represents an item in the XPath 2.0 Data Model.
static Expression::Ptr applyFunctionConversion(const Expression::Ptr &operand, const SequenceType::Ptr &reqType, const StaticContext::Ptr &context, const ReportContext::ErrorCode code=ReportContext::XPTY0004, const Options=Options(AutomaticallyConvert|CheckFocus))
Builds a pipeline of artificial AST nodes that ensures operand conforms to the type reqType by applyi...
virtual Properties properties() const
virtual void evaluateToSequenceReceiver(const DynamicContext::Ptr &context) const
Expression::Ptr m_operand1
The QFlags class provides a type-safe way of storing OR-combinations of enum values.
virtual ItemType::Ptr itemType() const =0
Expression::Ptr m_operand2
bool is(const ID id) const
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
virtual void evaluateToSequenceReceiver(const DynamicContext::Ptr &context) const
static Expression::Ptr wrapAround(const Expression::Ptr &operand, const StaticContext::Ptr &context)
virtual void announceFocusType(const ItemType::Ptr &itemType)
virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const
virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const
virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const
Base class for expressions that has exactly two operands.