78 return cast(val, context);
88 context->
error(QtXmlPatterns::tr(
"Type error in cast, expected %1, " 117 context->
error(QtXmlPatterns::tr(
"When casting to %1 or types " 118 "derived from it, the source " 119 "value must be of the same type, " 120 "or it must be a string literal. " 121 "Type %2 is not allowed.")
201 return visitor->visit(
this);
static const AtomicType::Ptr xsDayTimeDuration
#define QT_END_NAMESPACE
This macro expands to.
Verifies that the sequence an Expression evaluates to conforms to a Cardinality.
QString formatType(const NamePool::Ptr &np, const T &type)
Formats ItemType and SequenceType.
Due to strong interdependencies, this file contains the definitions for the classes Item...
virtual SequenceType::Ptr staticType() const
virtual NamePool::Ptr namePool() const =0
virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context, const SequenceType::Ptr &reqType)
Item toItem(const QExplicitlySharedDataPointer< T > atomicValue)
static QXmlName expandQName(const QString &lexicalQName, const TReportContext &context, const NamespaceResolver::Ptr &nsResolver, const SourceLocationReflection *const r, const bool asForAttribute=false)
The QString class provides a Unicode character string.
static Expression::Ptr create(const Expression *const replacementFor, const StaticContext::Ptr &context)
Creates an EmptySequence that is a replacement for replacementFor.
static const SequenceType::Ptr ExactlyOneAtomicType
static const AtomicType::Ptr xsYearMonthDuration
virtual Item evaluateSingleton(const DynamicContext::Ptr &) const
virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context, const SequenceType::Ptr &reqType)
virtual Expression::Ptr compress(const StaticContext::Ptr &context)
void append(const T &t)
Inserts value at the end of the list.
static Cardinality empty()
#define QT_BEGIN_NAMESPACE
This macro expands to.
const TCastTarget * as() const
void error(const QString &message, const ReportContext::ErrorCode errorCode, const QSourceLocation &sourceLocation)
static QNameValue::Ptr fromValue(const NamePool::Ptr &np, const QXmlName name)
Base class for all classes representing atomic values.
CastAs(const Expression::Ptr &source, const SequenceType::Ptr &targetType)
virtual Expression::Ptr compress(const StaticContext::Ptr &context)
The namespace for the internal API of QtXmlPatterns.
virtual NamespaceResolver::Ptr namespaceBindings() const =0
virtual Cardinality cardinality() const =0
virtual SequenceType::List expectedOperandTypes() const
Expression::Ptr castToQName(const StaticContext::Ptr &context) const
Houses an AtomicValue, making it available as an Expression.
QExplicitlySharedDataPointer< Expression > Ptr
A smart pointer wrapping mutable Expression instances.
virtual SequenceType::Ptr staticType() const =0
The QXmlName class represents the name of an XML node, in an efficient, namespace-aware way...
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 const AtomicType::Ptr xsQName
virtual bool isAtomicType() const =0
static Cardinality exactlyOne()
Expression::Ptr m_operand
virtual ExpressionVisitorResult::Ptr accept(const ExpressionVisitor::Ptr &visitor) const
virtual bool xdtTypeMatches(const ItemType::Ptr &other) const =0
Returns true if other matches this type. That is, if other is equal to this type or a subtype of this...
virtual ItemType::Ptr itemType() const =0
bool isMatch(const Cardinality &other) const
static const SequenceType::Ptr ZeroOrOneAtomicType
bool is(const ID id) const
virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const
const SequenceType::Ptr m_targetType
The QList class is a template class that provides lists.
Base class for expressions that has exactly one operand.