61 , m_defaultMode(defaultMode)
64 "Either a mode, or the default mode must be supplied.");
107 for(
int i = 0; i < count; ++i)
110 if(candidate->matchPattern()->evaluateEBV(context))
114 if( candidate->id() !=
id 115 && candidate->priority() == priority
116 && candidate->templateTarget()->importPrecedence ==
119 context->
error(QtXmlPatterns::tr(
"Ambiguous rule match."),
127 result = candidate->templateTarget();
128 priority = candidate->priority();
129 id = candidate->id();
153 pDebug() <<
"No template match, using builtin template for element() | document-node()";
161 return makeSequenceMappingIterator<Item>(
ConstPtr(
this), focusIterator, focus);
183 return visitor->visit(
this);
virtual Expression::Ptr body() const
Returns the body of the function/template/component that is being called.
virtual Expression::Ptr compress(const StaticContext::Ptr &context)
The QXmlNodeModelIndex class identifies a node in an XML node model subclassed from QAbstractXmlNodeM...
virtual ExpressionVisitorResult::Ptr accept(const ExpressionVisitor::Ptr &visitor) const
#define QT_END_NAMESPACE
This macro expands to.
const ImportPrecedence importPrecedence
virtual bool configureRecursion(const CallTargetDescription::Ptr &sign)
QExplicitlySharedDataPointer< const ApplyTemplate > ConstPtr
static const SequenceType::Ptr ZeroOrMoreItems
int count(const T &t) const
Returns the number of occurrences of value in the vector.
Base class for classes that invokes templates, such as CallTemplate and ApplyTemplate.
virtual CallTargetDescription::Ptr callTargetDescription() const
Item::Iterator::Ptr mapToSequence(const Item &item, const DynamicContext::Ptr &context) const
static const EmptyIterator< Item >::Ptr emptyIterator
TemplatePattern::Vector templatePatterns
const TemplateMode::Ptr m_mode
virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const
DynamicContext::Ptr createFocus()
virtual Item contextItem() const =0
#define QT_BEGIN_NAMESPACE
This macro expands to.
void error(const QString &message, const ReportContext::ErrorCode errorCode, const QSourceLocation &sourceLocation)
virtual Properties properties() const
The namespace for the internal API of QtXmlPatterns.
virtual void setFocusIterator(const Item::Iterator::Ptr &it)=0
Template::Ptr findTemplate(const DynamicContext::Ptr &context, const TemplateMode::Ptr &templateMode) const
TemplateMode::Ptr m_defaultMode
virtual SequenceType::Ptr staticType() const
const T & at(int i) const
Returns the item at index position i in the vector.
QExplicitlySharedDataPointer< Expression > Ptr
A smart pointer wrapping mutable Expression instances.
#define Q_ASSERT_X(cond, where, what)
Contains functions used for formatting arguments, such as keywords and paths, in translated strings...
Represents an item in the XPath 2.0 Data Model.
NodeKind
Identifies a kind of node.
TemplateMode::Ptr effectiveMode(const DynamicContext::Ptr &context) const
DynamicContext::Ptr createContext(const TemplateInvoker *const invoker, const DynamicContext::Ptr &context, const bool isCallTemplate) const
void reset()
Resets this to be null.
Item mapToItem(const QXmlNodeModelIndex &node, const DynamicContext::Ptr &context) const
The QFlags class provides a type-safe way of storing OR-combinations of enum values.
ApplyTemplate(const TemplateMode::Ptr &mode, const WithParam::Hash &withParams, const TemplateMode::Ptr &defaultMode)
mode may be null. If it is, ApplyTemplate interprets that as that it should use the #current mode...
virtual QExplicitlySharedDataPointer< TemplateMode > currentTemplateMode() const =0
Returns the current template mode that is in effect.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
QExplicitlySharedDataPointer< CallTargetDescription > Ptr
Expression::Ptr compress(const StaticContext::Ptr &context)
virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const