Qt 4.8
|
A value of type xs:anyURI
.
More...
#include <qanyuri_p.h>
Public Types | |
typedef QExplicitlySharedDataPointer< AnyURI > | Ptr |
Public Types inherited from QPatternist::AtomicString | |
typedef AtomicValue::Ptr | Ptr |
Public Types inherited from QPatternist::AtomicValue | |
typedef QList< AtomicValue::Ptr > | List |
typedef QExplicitlySharedDataPointer< AtomicValue > | Ptr |
Public Functions | |
QUrl | toQUrl () const |
Returns this xs:anyURI value in a QUrl. More... | |
virtual ItemType::Ptr | type () const |
Public Functions inherited from QPatternist::AtomicString | |
virtual bool | evaluateEBV (const QExplicitlySharedDataPointer< DynamicContext > &) const |
virtual QString | stringValue () const |
Public Functions inherited from QPatternist::AtomicValue | |
virtual bool | hasError () const |
virtual | ~AtomicValue () |
Public Functions inherited from QSharedData | |
QSharedData () | |
Constructs a QSharedData object with a reference count of 0. More... | |
QSharedData (const QSharedData &) | |
Constructs a QSharedData object with reference count 0. More... | |
Public Functions inherited from QPatternist::CppCastingHelper< AtomicValue > | |
const TCastTarget * | as () const |
TCastTarget * | as () |
Static Public Functions | |
template<const ReportContext::ErrorCode code, typename TReportContext > | |
static AnyURI::Ptr | fromLexical (const QString &value, const TReportContext &context, const SourceLocationReflection *const r) |
Constructs a xs:anyURI value from the lexical representation value . More... | |
static AnyURI::Ptr | fromLexical (const QString &value) |
static AnyURI::Ptr | fromValue (const QString &value) |
static AnyURI::Ptr | fromValue (const QUrl &uri) |
static bool | isValid (const QString &candidate) |
Return true if candidate is a valid xs:anyURI , otherwise false . More... | |
static AnyURI::Ptr | resolveURI (const QString &relative, const QString &base) |
template<const ReportContext::ErrorCode code, typename TReportContext > | |
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. More... | |
Static Public Functions inherited from QPatternist::AtomicString | |
static AtomicString::Ptr | fromValue (const QString &value) |
static AtomicString::Ptr | fromValue (const QUrl &value) |
Static Public Functions inherited from QPatternist::AtomicValue | |
static ItemType::Ptr | qtToXDMType (const QXmlItem &item) |
static QVariant | toQt (const AtomicValue *const value) |
static QVariant | toQt (const AtomicValue::Ptr &value) |
static Item | toXDM (const QVariant &value) |
Protected Functions | |
AnyURI (const QString &value) | |
Protected Functions inherited from QPatternist::AtomicString | |
AtomicString (const QString &value) | |
Protected Functions inherited from QPatternist::AtomicValue | |
AtomicValue () | |
Protected Functions inherited from QPatternist::CppCastingHelper< AtomicValue > | |
CppCastingHelper () | |
Friends | |
class | CommonValues |
Additional Inherited Members | |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Protected Variables inherited from QPatternist::AtomicString | |
const QString | m_value |
A value of type xs:anyURI
.
Due to bugs in QUrl and slight differences in behavior and interpretation, QUrl can never be used directly for dealing with URIs, values of type xs:anyURI
. Therefore, it's important to use the functionality this class provides, such as the functions toQUrl(), fromLexical(), isValid(), and resolveURI().
Definition at line 82 of file qanyuri_p.h.
Definition at line 85 of file qanyuri_p.h.
|
protected |
Definition at line 52 of file qanyuri.cpp.
Referenced by fromLexical(), and fromValue().
|
inlinestatic |
Constructs a xs:anyURI
value from the lexical representation value
.
If value
is not a valid lexical representation of xs:anyURI
, an error is issued via context
.
Definition at line 153 of file qanyuri_p.h.
Referenced by QPatternist::ToAnyURICaster::castFrom(), isValidUri(), QPatternist::XsdSchemaParser::parseAppInfo(), QPatternist::XsdSchemaParser::parseDocumentation(), QPatternist::XsdSchemaParser::parseNotation(), and QPatternist::XsdSchemaParser::readXPathExpression().
|
static |
If value
is not a valid lexical representation for xs:anyURI
, a ValidationError is returned.
Definition at line 78 of file qanyuri.cpp.
|
static |
Creates an instance representing value
.
value
must be a valid xs:anyURI
. If it is of interest to construct from a lexical representation, use fromLexical(). Definition at line 56 of file qanyuri.cpp.
Referenced by QPatternist::ResolveURIFN::evaluateSingleton(), QPatternist::UnparsedEntityURIFN::evaluateSingleton(), QPatternist::NamespaceURIFN::evaluateSingleton(), QPatternist::BaseURIFN::evaluateSingleton(), QPatternist::NamespaceURIFromQNameFN::evaluateSingleton(), QPatternist::DocumentURIFN::evaluateSingleton(), QPatternist::NamespaceURIForPrefixFN::evaluateSingleton(), fromLexical(), QPatternist::VariableLoader::itemForName(), resolveURI(), QPatternist::ResolveURIFN::typeCheck(), and QPatternist::StaticBaseURIFN::typeCheck().
|
static |
Definition at line 61 of file qanyuri.cpp.
|
static |
Return true
if candidate
is a valid xs:anyURI
, otherwise false
.
Definition at line 93 of file qanyuri.cpp.
Referenced by fromLexical(), toQUrl(), and QPatternist::yyparse().
|
static |
Creates an AnyURI instance representing an absolute URI which is created from resolving relative
against base
.
This function must be compatible with the resolution semantics specified for fn:resolve-uri. In fact, the implementation of fn:resolve-uri, ResourceURIFN, relies on this function.
Definition at line 66 of file qanyuri.cpp.
Referenced by fromLexical().
|
inlinestatic |
Treates value
as a lexical representation of xs:anyURI
but returns the value instance as a QUrl.
If value
is not a valid lexical representation of xs:anyURI
, an error is issued via context
.
If isValid
is passed, no error is raised and it is instead set appropriately.
Definition at line 108 of file qanyuri_p.h.
|
inline |
Returns this xs:anyURI
value in a QUrl.
Definition at line 187 of file qanyuri_p.h.
|
virtual |
Reimplemented from QPatternist::AtomicString.
Definition at line 73 of file qanyuri.cpp.
Referenced by fromLexical().
|
friend |
Definition at line 194 of file qanyuri_p.h.