diff options
Diffstat (limited to 'src/xmlpatterns')
-rw-r--r-- | src/xmlpatterns/parser/qxquerytokenizer.cpp | 12 | ||||
-rw-r--r-- | src/xmlpatterns/parser/qxslttokenizer.cpp | 7 |
2 files changed, 6 insertions, 13 deletions
diff --git a/src/xmlpatterns/parser/qxquerytokenizer.cpp b/src/xmlpatterns/parser/qxquerytokenizer.cpp index 69c24a4..5279a74 100644 --- a/src/xmlpatterns/parser/qxquerytokenizer.cpp +++ b/src/xmlpatterns/parser/qxquerytokenizer.cpp @@ -1691,19 +1691,15 @@ Tokenizer::Token XQueryTokenizer::nextToken() const QChar next(m_data.at(m_pos + 1)); if (!next.isSpace() && next != QLatin1Char('/') && next != QLatin1Char('>')) return Token(T_ERROR); // i18n Space must separate attributes - else if (result.isEmpty()) + + if (result.isEmpty()) { return tokenAndChangeState(state() == AposAttributeContent ? T_APOS : T_QUOTE, StartTag, 1); } - else - { - /* Don't consume the sep, but leave it so we next time return a token for it. */ - return Token(T_STRING_LITERAL, result); - } - ++m_pos; - continue; + /* Don't consume the sep, but leave it so we next time return a token for it. */ + return Token(T_STRING_LITERAL, result); } else if (curr == QLatin1Char('{')) { diff --git a/src/xmlpatterns/parser/qxslttokenizer.cpp b/src/xmlpatterns/parser/qxslttokenizer.cpp index 45d6223..5ad6713 100644 --- a/src/xmlpatterns/parser/qxslttokenizer.cpp +++ b/src/xmlpatterns/parser/qxslttokenizer.cpp @@ -1964,7 +1964,6 @@ bool XSLTTokenizer::insideSequenceConstructor(TokenSource::Queue *const to, default: unexpectedContent(); } - continue; } else { @@ -2001,11 +2000,9 @@ bool XSLTTokenizer::insideSequenceConstructor(TokenSource::Queue *const to, pushState(InsideSequenceConstructor); insideSequenceConstructor(to); Q_ASSERT(tokenType() == QXmlStreamReader::EndElement || hasError()); - continue; } - unexpectedContent(); - break; + continue; } case QXmlStreamReader::EndElement: { @@ -2640,7 +2637,7 @@ void XSLTTokenizer::queueSorting(const bool oneSortRequired, if(speciallyTreatWhitespace && isWhitespace()) continue; - if(QXmlStreamReader::Characters && whitespaceToSkip()) + if (whitespaceToSkip()) continue; /* We have an instruction which is a text node, we're done. */ |