52 #ifndef Patternist_AnyURI_H 53 #define Patternist_AnyURI_H 107 template<const ReportContext::ErrorCode code,
typename TReportContext>
109 const TReportContext &context,
112 const bool issueError =
true)
118 if(uri.isEmpty() || (uri.isValid() && (!simplified.startsWith(
QLatin1Char(
':')) || !uri.isRelative())))
152 template<const ReportContext::ErrorCode code,
typename TReportContext>
154 const TReportContext &context,
204 return formatURI(np->stringForNamespace(uri));
QExplicitlySharedDataPointer< AnyURI > Ptr
QUrl toQUrl() const
Returns this xs:anyURI value in a QUrl.
#define QT_END_NAMESPACE
This macro expands to.
QString formatType(const NamePool::Ptr &np, const T &type)
Formats ItemType and SequenceType.
virtual ItemType::Ptr type() const
Implements the value instance of the xs:string type.
static AnyURI::Ptr resolveURI(const QString &relative, const QString &base)
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
A value of type xs:anyURI.
static QString toString(Register *reg, int type, bool *ok=0)
#define QT_BEGIN_NAMESPACE
This macro expands to.
The namespace for the internal API of QtXmlPatterns.
static QUrl toQUrl(const QString &value, const TReportContext &context, const SourceLocationReflection *const r, bool *const isValid=0, const bool issueError=true)
Treates value as a lexical representation of xs:anyURI but returns the value instance as a QUrl...
static AnyURI::Ptr fromLexical(const QString &value, const TReportContext &context, const SourceLocationReflection *const r)
Constructs a xs:anyURI value from the lexical representation value.
#define Q_ASSERT_X(cond, where, what)
Contains functions used for formatting arguments, such as keywords and paths, in translated strings...
QString simplified() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end, and that has each sequence o...
static bool isValid(const QString &candidate)
Return true if candidate is a valid xs:anyURI, otherwise false.
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
AnyURI(const QString &value)
A collection of common values.
static QString formatURI(const NamePool::Ptr &np, const QXmlName::NamespaceCode &uri)
Formats uri, that's considered to be a URI, for display.
#define qPrintable(string)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
static const AtomicType::Ptr xsAnyURI
static AnyURI::Ptr fromValue(const QString &value)
Base class for all instances that represents something at a certain location.