52 #ifndef Patternist_QNameConstructor_H 53 #define Patternist_QNameConstructor_H 108 template<
typename TReportContext,
113 const TReportContext &context,
116 const bool asForAttribute =
false);
134 template<
typename TReportContext,
138 const TReportContext &context,
141 const bool asForAttribute)
152 : (nsResolver->lookupNamespaceURI(context->namePool()->allocatePrefix(prefix)));
156 context->error(QtXmlPatterns::tr(
"No namespace binding exists for " 164 return context->namePool()->allocateQName(context->namePool()->stringForNamespace(nsCode), local, prefix);
168 context->error(QtXmlPatterns::tr(
"%1 is an invalid %2")
#define QT_END_NAMESPACE
This macro expands to.
QString formatKeyword(const QString &keyword)
QString formatType(const NamePool::Ptr &np, const T &type)
Formats ItemType and SequenceType.
static QXmlName::NamespaceCode namespaceForPrefix(const QXmlName::PrefixCode prefix, const StaticContext::Ptr &context, const SourceLocationReflection *const r)
virtual ExpressionVisitorResult::Ptr accept(const ExpressionVisitor::Ptr &visitor) const
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.
virtual Item evaluateSingleton(const DynamicContext::Ptr &) const
virtual SequenceType::List expectedOperandTypes() const
#define QT_BEGIN_NAMESPACE
This macro expands to.
Creates an xs:QName value from a lexical QName using statically known namespace bindings.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
The namespace for the internal API of QtXmlPatterns.
static QString formatData(const QString &data)
const NamespaceResolver::Ptr m_nsResolver
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
static void splitQName(const QString &qName, QString &prefix, QString &localName)
Splits qName into localName and prefix.
QNameConstructor(const Expression::Ptr &source, const NamespaceResolver::Ptr &nsResolver)
static bool isQName(const QString &qName)
virtual const SourceLocationReflection * actualReflection() const
Returns this.
The QList class is a template class that provides lists.
Base class for all instances that represents something at a certain location.
virtual SequenceType::Ptr staticType() const
Base class for expressions that has exactly one operand.