52 #ifndef Patternist_DerivedString_H 53 #define Patternist_DerivedString_H 57 #include "private/qxmlutils_p.h" 94 template<TypeOfDerivedString DerivedType>
148 const QChar first(input.
at(0));
150 if(first.isLetter() ||
154 const int len = input.
length();
161 for(
int i = 1; i < len; ++i)
182 const int len = input.
length();
187 for(
int i = 0; i < len; ++i)
212 const int len = retval.
length();
215 for(
int i = 0; i < len; ++i)
219 if(ati.isSpace() && ati != space)
268 if(validate.exactMatch(simplified))
271 return error(np, simplified);
289 return error(np, simplified);
327 return m_value.
length() > 0;
static AtomicValue::Ptr fromValue(const QString &value)
static const AtomicType::Ptr xsID
QExplicitlySharedDataPointer< AtomicValue > Ptr
bool isLetter() const
Returns true if the character is a letter (Letter_* categories); otherwise returns false...
#define QT_END_NAMESPACE
This macro expands to.
const QChar at(int i) const
Returns the character at the given index position in the string.
The QRegExp class provides pattern matching using regular expressions.
static ItemType::Ptr itemType()
QString formatType(const NamePool::Ptr &np, const T &type)
Formats ItemType and SequenceType.
int length() const
Returns the number of characters in this string.
static bool isValidName(const QString &input)
static AtomicValue::Ptr createError(const QString &description=QString(), const ReportContext::ErrorCode=ReportContext::FORG0001)
static const AtomicType::Ptr xsNormalizedString
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
static QString attributeNormalize(const QString &input)
Performs attribute value normalization as if input was not from a CDATA section.
The QChar class provides a 16-bit Unicode character.
static const AtomicType::Ptr xsName
static const AtomicType::Ptr xsIDREF
static const AtomicType::Ptr xsString
static const AtomicType::Ptr xsNMTOKEN
DerivedString(const QString &value)
#define QT_BEGIN_NAMESPACE
This macro expands to.
Base class for all classes representing atomic values.
QString trimmed() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
The namespace for the internal API of QtXmlPatterns.
virtual ItemType::Ptr type() const
static const AtomicType::Ptr xsENTITY
static QString formatData(const QString &data)
Represents instances of derived xs:string types, such as xs:normalizedString.
QExplicitlySharedDataPointer< ItemType > Ptr
#define Q_ASSERT_X(cond, where, what)
Contains functions used for formatting arguments, such as keywords and paths, in translated strings...
QString trimmed(QString source)
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 QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
static bool isValidNMTOKEN(const QString &input)
virtual QString stringValue() const
static const AtomicType::Ptr xsNCName
static bool isNameChar(const QChar &ch)
This is an incomplete test for whether ch conforms to the XML 1.0 NameChar production.
static AtomicValue::Ptr error(const NamePool::Ptr &np, const QString &invalidValue)
static const AtomicType::Ptr xsLanguage
virtual bool evaluateEBV(const QExplicitlySharedDataPointer< DynamicContext > &) const
static bool isNCName(const QStringRef &ncName)
Determines whether c is a valid instance of production [4]NCName in the XML 1.0 Namespaces specificat...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
bool isDigit() const
Returns true if the character is a decimal digit (Number_DecimalDigit); otherwise returns false...
static const AtomicType::Ptr xsToken
static AtomicValue::Ptr fromLexical(const NamePool::Ptr &np, const QString &lexical)