Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/xmlpatterns/parser/TokenLookup.gperf

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4444 * @short This file is generated from TokenLookup.gperf and contains
    4545 * TokenLookup, a class housing a perfect hash function class for XQuery's keywords.
    46  * @author Frans Englich <fenglich@trolltech.com>
     46 * @author Frans Englich <frans.englich@nokia.com>
    4747 */
    4848
  • trunk/src/xmlpatterns/parser/createParser.sh

    r2 r561  
    11#!/bin/bash
     2#############################################################################
     3##
     4## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     5## All rights reserved.
     6## Contact: Nokia Corporation (qt-info@nokia.com)
     7##
     8## This file is the build configuration utility of the Qt Toolkit.
     9##
     10## $QT_BEGIN_LICENSE:LGPL$
     11## Commercial Usage
     12## Licensees holding valid Qt Commercial licenses may use this file in
     13## accordance with the Qt Commercial License Agreement provided with the
     14## Software or, alternatively, in accordance with the terms contained in
     15## a written agreement between you and Nokia.
     16##
     17## GNU Lesser General Public License Usage
     18## Alternatively, this file may be used under the terms of the GNU Lesser
     19## General Public License version 2.1 as published by the Free Software
     20## Foundation and appearing in the file LICENSE.LGPL included in the
     21## packaging of this file.  Please review the following information to
     22## ensure the GNU Lesser General Public License version 2.1 requirements
     23## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
     24##
     25## In addition, as a special exception, Nokia gives you certain additional
     26## rights.  These rights are described in the Nokia Qt LGPL Exception
     27## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
     28##
     29## GNU General Public License Usage
     30## Alternatively, this file may be used under the terms of the GNU
     31## General Public License version 3.0 as published by the Free Software
     32## Foundation and appearing in the file LICENSE.GPL included in the
     33## packaging of this file.  Please review the following information to
     34## ensure the GNU General Public License version 3.0 requirements will be
     35## met: http://www.gnu.org/copyleft/gpl.html.
     36##
     37## If you have questions regarding the use of this file, please contact
     38## Nokia at qt-info@nokia.com.
     39## $QT_END_LICENSE$
     40##
     41#############################################################################
    242
    343files="qquerytransformparser_p.h qquerytransformparser.cpp"
  • trunk/src/xmlpatterns/parser/createTokenLookup.sh

    r2 r561  
     1#!/bin/sh
     2#############################################################################
     3##
     4## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     5## All rights reserved.
     6## Contact: Nokia Corporation (qt-info@nokia.com)
     7##
     8## This file is the build configuration utility of the Qt Toolkit.
     9##
     10## $QT_BEGIN_LICENSE:LGPL$
     11## Commercial Usage
     12## Licensees holding valid Qt Commercial licenses may use this file in
     13## accordance with the Qt Commercial License Agreement provided with the
     14## Software or, alternatively, in accordance with the terms contained in
     15## a written agreement between you and Nokia.
     16##
     17## GNU Lesser General Public License Usage
     18## Alternatively, this file may be used under the terms of the GNU Lesser
     19## General Public License version 2.1 as published by the Free Software
     20## Foundation and appearing in the file LICENSE.LGPL included in the
     21## packaging of this file.  Please review the following information to
     22## ensure the GNU Lesser General Public License version 2.1 requirements
     23## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
     24##
     25## In addition, as a special exception, Nokia gives you certain additional
     26## rights.  These rights are described in the Nokia Qt LGPL Exception
     27## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
     28##
     29## GNU General Public License Usage
     30## Alternatively, this file may be used under the terms of the GNU
     31## General Public License version 3.0 as published by the Free Software
     32## Foundation and appearing in the file LICENSE.GPL included in the
     33## packaging of this file.  Please review the following information to
     34## ensure the GNU General Public License version 3.0 requirements will be
     35## met: http://www.gnu.org/copyleft/gpl.html.
     36##
     37## If you have questions regarding the use of this file, please contact
     38## Nokia at qt-info@nokia.com.
     39## $QT_END_LICENSE$
     40##
     41#############################################################################
     42
    143outFile="qtokenlookup.cpp"
     44
     45license=`cat <<EOF
     46/****************************************************************************
     47**
     48** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     49** All rights reserved.
     50** Contact: Nokia Corporation (qt-info@nokia.com)
     51**
     52** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     53**
     54** \\$QT_BEGIN_LICENSE:LGPL\\$
     55** No Commercial Usage
     56** This file contains pre-release code and may not be distributed.
     57** You may use this file in accordance with the terms and conditions
     58** contained in the either Technology Preview License Agreement or the
     59** Beta Release License Agreement.
     60**
     61** GNU Lesser General Public License Usage
     62** Alternatively, this file may be used under the terms of the GNU Lesser
     63** General Public License version 2.1 as published by the Free Software
     64** Foundation and appearing in the file LICENSE.LGPL included in the
     65** packaging of this file.  Please review the following information to
     66** ensure the GNU Lesser General Public License version 2.1 requirements
     67** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
     68**
     69** In addition, as a special exception, Nokia gives you certain
     70** additional rights. These rights are described in the Nokia Qt LGPL
     71** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
     72** package.
     73**
     74** GNU General Public License Usage
     75** Alternatively, this file may be used under the terms of the GNU
     76** General Public License version 3.0 as published by the Free Software
     77** Foundation and appearing in the file LICENSE.GPL included in the
     78** packaging of this file.  Please review the following information to
     79** ensure the GNU General Public License version 3.0 requirements will be
     80** met: http://www.gnu.org/copyleft/gpl.html.
     81**
     82** If you are unsure which license is appropriate for your use, please
     83** contact the sales department at http://qt.nokia.com/contact.
     84** \\$QT_END_LICENSE\\$
     85**
     86****************************************************************************/
     87EOF`
     88echo "$license" > $outFile
    289
    390# Watch out, the --output option is not supported in the
    491# gperf version that apt-get pulls in on Mac OS X.
    5 gperf TokenLookup.gperf > $outFile
     92gperf TokenLookup.gperf >> $outFile
  • trunk/src/xmlpatterns/parser/createXSLTTokenLookup.sh

    r2 r561  
    11#!/bin/sh
     2#############################################################################
     3##
     4## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     5## All rights reserved.
     6## Contact: Nokia Corporation (qt-info@nokia.com)
     7##
     8## This file is the build configuration utility of the Qt Toolkit.
     9##
     10## $QT_BEGIN_LICENSE:LGPL$
     11## Commercial Usage
     12## Licensees holding valid Qt Commercial licenses may use this file in
     13## accordance with the Qt Commercial License Agreement provided with the
     14## Software or, alternatively, in accordance with the terms contained in
     15## a written agreement between you and Nokia.
     16##
     17## GNU Lesser General Public License Usage
     18## Alternatively, this file may be used under the terms of the GNU Lesser
     19## General Public License version 2.1 as published by the Free Software
     20## Foundation and appearing in the file LICENSE.LGPL included in the
     21## packaging of this file.  Please review the following information to
     22## ensure the GNU Lesser General Public License version 2.1 requirements
     23## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
     24##
     25## In addition, as a special exception, Nokia gives you certain additional
     26## rights.  These rights are described in the Nokia Qt LGPL Exception
     27## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
     28##
     29## GNU General Public License Usage
     30## Alternatively, this file may be used under the terms of the GNU
     31## General Public License version 3.0 as published by the Free Software
     32## Foundation and appearing in the file LICENSE.GPL included in the
     33## packaging of this file.  Please review the following information to
     34## ensure the GNU General Public License version 3.0 requirements will be
     35## met: http://www.gnu.org/copyleft/gpl.html.
     36##
     37## If you have questions regarding the use of this file, please contact
     38## Nokia at qt-info@nokia.com.
     39## $QT_END_LICENSE$
     40##
     41#############################################################################
     42
    243xmllint --noout --schema ../qtokenautomaton/qtokenautomaton.xsd qxslttokenlookup.xml
    344java net.sf.saxon.Transform -xsl:../qtokenautomaton/qautomaton2cpp.xsl qxslttokenlookup.xml
  • trunk/src/xmlpatterns/parser/qmaintainingreader.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    148148    if(m_elementDescriptions.contains(elementName))
    149149    {
    150         const ElementDescription<TokenLookupClass, LookupKey> &desc = m_elementDescriptions.value(elementName);
     150        // QHash::value breaks in Metrowerks Compiler
     151        const ElementDescription<TokenLookupClass, LookupKey> &desc = *m_elementDescriptions.find(elementName);
    151152        const int attCount = m_currentAttributes.count();
    152153
     
    173174
    174175                    for(int i = 0; i < totalCount; ++i)
    175                         allowed.append(formatKeyword(toString(all.at(i))));
     176                        allowed.append(QPatternist::formatKeyword(TokenLookupClass::toString(all.at(i))));
    176177
    177178                    /* Note, we can't run toString() on attrName, because we're in this branch,
     
    230231        {
    231232            error(QtXmlPatterns::tr("The attribute %1 must appear on element %2.")
    232                              .arg(formatKeyword(toString(*requiredButMissing.constBegin())),
     233                             .arg(QPatternist::formatKeyword(TokenLookupClass::toString(*requiredButMissing.constBegin())),
    233234                                  formatKeyword(name())),
    234235                  ReportContext::XTSE0010);
  • trunk/src/xmlpatterns/parser/qmaintainingreader_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6060
    6161#include "qxpathhelper_p.h"
     62#include "qxslttokenlookup_p.h"
    6263
    6364class QUrl;
     
    7677     * of this.
    7778     *
    78      * @author Frans Englich <fenglich@trolltech.com>
     79     * @author Frans Englich <frans.englich@nokia.com>
    7980     * @since 4.5
    8081     */
     
    104105     * not equal element name.
    105106     *
    106      * @author Frans Englich <fenglich@trolltech.com>
     107     * @author Frans Englich <frans.englich@nokia.com>
    107108     * @since 4.5
    108109     */
  • trunk/src/xmlpatterns/parser/qparsercontext.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/xmlpatterns/parser/qparsercontext_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    8383     * needed to create the expression.
    8484     *
    85      * @author Frans Englich <fenglich@trolltech.com>
     85     * @author Frans Englich <frans.englich@nokia.com>
    8686     */
    8787    class ParserContext : public QSharedData
  • trunk/src/xmlpatterns/parser/qquerytransformparser.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    41 
    42 //
    43 //  W A R N I N G
    44 //  -------------
    45 //
    46 // This file is not part of the Qt API.  It exists purely as an
    47 // implementation detail.  This header file may change from version to
    48 // version without notice, or even be removed.
    49 //
    50 // We mean it.
    5141
    5242/* A Bison parser, made by GNU Bison 2.3a.  */
     
    123113/* Line 164 of yacc.c.  */
    124114#line 22 "querytransformparser.ypp"
    125 
    126 /****************************************************************************
    127 **
    128 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    129 ** Contact: Qt Software Information (qt-info@nokia.com)
    130 **
    131 ** This file is part of the QtXmlPatterns module of the Qt Toolkit.
    132 **
    133 ** $QT_BEGIN_LICENSE:LGPL$
    134 ** Commercial Usage
    135 ** Licensees holding valid Qt Commercial licenses may use this file in
    136 ** accordance with the Qt Commercial License Agreement provided with the
    137 ** Software or, alternatively, in accordance with the terms contained in
    138 ** a written agreement between you and Nokia.
    139 **
    140 ** GNU Lesser General Public License Usage
    141 ** Alternatively, this file may be used under the terms of the GNU Lesser
    142 ** General Public License version 2.1 as published by the Free Software
    143 ** Foundation and appearing in the file LICENSE.LGPL included in the
    144 ** packaging of this file.  Please review the following information to
    145 ** ensure the GNU Lesser General Public License version 2.1 requirements
    146 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    147 **
    148 ** In addition, as a special exception, Nokia gives you certain
    149 ** additional rights. These rights are described in the Nokia Qt LGPL
    150 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    151 ** package.
    152 **
    153 ** GNU General Public License Usage
    154 ** Alternatively, this file may be used under the terms of the GNU
    155 ** General Public License version 3.0 as published by the Free Software
    156 ** Foundation and appearing in the file LICENSE.GPL included in the
    157 ** packaging of this file.  Please review the following information to
    158 ** ensure the GNU General Public License version 3.0 requirements will be
    159 ** met: http://www.gnu.org/copyleft/gpl.html.
    160 **
    161 ** If you are unsure which license is appropriate for your use, please
    162 ** contact the sales department at qt-sales@nokia.com.
    163 ** $QT_END_LICENSE$
    164 **
    165 ****************************************************************************/
    166 
    167 //
    168 //  W A R N I N G
    169 //  -------------
    170 //
    171 // This file is not part of the Qt API.  It exists purely as an
    172 // implementation detail.  This header file may change from version to
    173 // version without notice, or even be removed.
    174 //
    175 // We mean it.
    176115
    177116#include <limits>
     
    301240
    302241/**
     242 * @internal
     243 * @relates QXmlQuery
     244 */
     245typedef QFlags<QXmlQuery::QueryLanguage> QueryLanguages;
     246
     247/**
    303248 * @short Flags invalid expressions and declarations in the currently
    304249 * parsed language.
    305250 *
    306  * Since this grammar is used for several languages: XQuery 1.0, XSL-T 2.0 and
    307  * XPath 2.0 inside XSL-T, it is the union of all the constructs in these
     251 * Since this grammar is used for several languages: XQuery 1.0, XSL-T 2.0, and
     252 * XPath 2.0 inside XSL-T, and field and selector patterns in W3C XML Schema's
     253 * identity constraints, it is the union of all the constructs in these
    308254 * languages. However, when dealing with each language individually, we
    309255 * regularly need to disallow some expressions, such as direct element
     
    316262 * used for internal purposes.
    317263 *
    318  * Hence, this function is called from each expression and declaration which is
    319  * unavailable in XPath.
     264 * Hence, this function is called from each expression and declaration with @p
     265 * allowedLanguages stating what languages it is allowed in.
    320266 *
    321267 * If @p isInternal is @c true, no error is raised. Otherwise, if the current
    322  * language is not XQuery, an error is raised.
     268 * language is not in @p allowedLanguages, an error is raised.
    323269 */
    324 static void disallowedConstruct(const ParserContext *const parseInfo,
    325                                 const YYLTYPE &sourceLocator,
    326                                 const bool isInternal = false)
     270static void allowedIn(const QueryLanguages allowedLanguages,
     271                      const ParserContext *const parseInfo,
     272                      const YYLTYPE &sourceLocator,
     273                      const bool isInternal = false)
    327274{
    328     if(!isInternal && parseInfo->languageAccent != QXmlQuery::XQuery10)
    329     {
    330         parseInfo->staticContext->error(QtXmlPatterns::tr("A construct was encountered which only is allowed in XQuery."),
     275    /* We treat XPath 2.0 as a subset of XSL-T 2.0, so if XPath 2.0 is allowed
     276     * and XSL-T is the language, it's ok. */
     277    if(!isInternal &&
     278       (!allowedLanguages.testFlag(parseInfo->languageAccent) && !(allowedLanguages.testFlag(QXmlQuery::XPath20) && parseInfo->languageAccent == QXmlQuery::XSLT20)))
     279    {
     280
     281        QString langName;
     282
     283        switch(parseInfo->languageAccent)
     284        {
     285            case QXmlQuery::XPath20:
     286                langName = QLatin1String("XPath 2.0");
     287                break;
     288            case QXmlQuery::XSLT20:
     289                langName = QLatin1String("XSL-T 2.0");
     290                break;
     291            case QXmlQuery::XQuery10:
     292                langName = QLatin1String("XQuery 1.0");
     293                break;
     294            case QXmlQuery::XmlSchema11IdentityConstraintSelector:
     295                langName = QtXmlPatterns::tr("W3C XML Schema identity constraint selector");
     296                break;
     297            case QXmlQuery::XmlSchema11IdentityConstraintField:
     298                langName = QtXmlPatterns::tr("W3C XML Schema identity constraint field");
     299                break;
     300        }
     301
     302        parseInfo->staticContext->error(QtXmlPatterns::tr("A construct was encountered "
     303                                                          "which is disallowed in the current language(%1).").arg(langName),
    331304                                        ReportContext::XPST0003,
    332305                                        fromYYLTYPE(sourceLocator, parseInfo));
     
    446419    if(e)
    447420    {
    448         parseInfo->staticContext->error(QtXmlPatterns::tr("A template by name %1 "
     421        parseInfo->staticContext->error(QtXmlPatterns::tr("A template with name %1 "
    449422                                                          "has already been declared.")
    450423                                        .arg(formatKeyword(parseInfo->staticContext->namePool(),
     
    910883                                const YYLTYPE &location)
    911884{
    912     parseInfo->staticContext->error(QtXmlPatterns::tr("No variable by name %1 exists")
     885    parseInfo->staticContext->error(QtXmlPatterns::tr("No variable with name %1 exists")
    913886                                       .arg(formatKeyword(parseInfo->staticContext->namePool(), variableName)),
    914887                                    ReportContext::XPST0008, fromYYLTYPE(location, parseInfo));
     
    13671340
    13681341/* Line 221 of yacc.c.  */
    1369 #line 1289 "qquerytransformparser.cpp"
     1342#line 1323 "qquerytransformparser.cpp"
    13701343
    13711344#ifdef short
     
    18511824static const yytype_uint16 yyrline[] =
    18521825{
    1853        0,  1341,  1341,  1342,  1344,  1345,  1376,  1377,  1393,  1491,
    1854     1493,  1499,  1501,  1508,  1514,  1520,  1527,  1530,  1534,  1538,
    1855     1558,  1572,  1576,  1570,  1639,  1643,  1660,  1663,  1665,  1670,
    1856     1671,  1675,  1676,  1680,  1684,  1688,  1690,  1691,  1693,  1695,
    1857     1741,  1755,  1760,  1765,  1766,  1768,  1783,  1798,  1808,  1823,
    1858     1827,  1832,  1846,  1850,  1855,  1869,  1874,  1879,  1884,  1889,
    1859     1905,  1928,  1936,  1937,  1938,  1940,  1957,  1958,  1960,  1961,
    1860     1963,  1964,  1966,  2021,  2025,  2031,  2034,  2039,  2053,  2057,
    1861     2063,  2062,  2171,  2174,  2180,  2201,  2207,  2211,  2213,  2218,
    1862     2228,  2229,  2234,  2235,  2244,  2314,  2325,  2326,  2330,  2335,
    1863     2404,  2405,  2409,  2414,  2458,  2459,  2464,  2471,  2477,  2478,
    1864     2479,  2480,  2481,  2482,  2488,  2493,  2499,  2502,  2507,  2513,
    1865     2519,  2523,  2548,  2549,  2553,  2557,  2551,  2598,  2601,  2596,
    1866     2617,  2618,  2619,  2622,  2626,  2634,  2633,  2647,  2646,  2655,
    1867     2656,  2657,  2659,  2667,  2678,  2681,  2683,  2688,  2695,  2702,
    1868     2708,  2728,  2733,  2739,  2742,  2744,  2745,  2752,  2758,  2762,
    1869     2767,  2768,  2771,  2775,  2770,  2784,  2788,  2783,  2796,  2799,
    1870     2803,  2798,  2812,  2816,  2811,  2824,  2826,  2854,  2853,  2865,
    1871     2873,  2864,  2884,  2885,  2888,  2892,  2897,  2902,  2901,  2917,
    1872     2922,  2923,  2928,  2929,  2934,  2935,  2936,  2937,  2939,  2940,
    1873     2945,  2946,  2951,  2952,  2954,  2955,  2960,  2961,  2962,  2963,
    1874     2965,  2966,  2971,  2972,  2977,  2978,  2980,  2984,  2989,  2990,
    1875     2996,  2997,  3002,  3003,  3008,  3009,  3014,  3015,  3020,  3024,
    1876     3029,  3030,  3031,  3033,  3038,  3039,  3040,  3041,  3042,  3043,
    1877     3045,  3050,  3051,  3052,  3053,  3054,  3055,  3057,  3062,  3063,
    1878     3064,  3066,  3080,  3081,  3082,  3084,  3100,  3104,  3109,  3110,
    1879     3112,  3117,  3118,  3120,  3126,  3130,  3136,  3139,  3140,  3144,
    1880     3153,  3158,  3162,  3163,  3168,  3167,  3182,  3189,  3188,  3203,
    1881     3211,  3211,  3220,  3222,  3225,  3230,  3232,  3236,  3302,  3305,
    1882     3311,  3314,  3323,  3327,  3331,  3336,  3337,  3342,  3343,  3346,
    1883     3345,  3375,  3377,  3378,  3380,  3394,  3395,  3396,  3397,  3398,
    1884     3399,  3400,  3401,  3402,  3403,  3404,  3405,  3408,  3407,  3417,
    1885     3428,  3433,  3435,  3440,  3441,  3443,  3447,  3449,  3453,  3462,
    1886     3468,  3469,  3474,  3475,  3476,  3477,  3478,  3479,  3480,  3481,
    1887     3491,  3492,  3497,  3501,  3506,  3511,  3516,  3521,  3525,  3530,
    1888     3535,  3540,  3569,  3573,  3580,  3582,  3586,  3588,  3589,  3590,
    1889     3624,  3633,  3622,  3874,  3878,  3898,  3901,  3907,  3912,  3917,
    1890     3923,  3926,  3936,  3943,  3947,  3953,  3967,  3973,  3990,  3995,
    1891     4008,  4009,  4010,  4011,  4012,  4013,  4014,  4016,  4024,  4023,
    1892     4063,  4066,  4071,  4086,  4091,  4098,  4110,  4114,  4110,  4120,
    1893     4122,  4126,  4128,  4143,  4147,  4156,  4161,  4165,  4171,  4174,
    1894     4179,  4184,  4189,  4190,  4191,  4192,  4194,  4195,  4196,  4197,
    1895     4202,  4238,  4239,  4240,  4241,  4242,  4243,  4244,  4246,  4251,
    1896     4256,  4262,  4263,  4265,  4270,  4275,  4280,  4285,  4301,  4302,
    1897     4304,  4309,  4314,  4318,  4330,  4343,  4353,  4358,  4363,  4368,
    1898     4382,  4396,  4397,  4399,  4409,  4411,  4416,  4423,  4430,  4432,
    1899     4434,  4435,  4437,  4441,  4446,  4447,  4449,  4455,  4457,  4459,
    1900     4460,  4462,  4474
     1826       0,  1375,  1375,  1376,  1378,  1379,  1410,  1411,  1427,  1525,
     1827    1527,  1533,  1535,  1542,  1548,  1554,  1561,  1564,  1568,  1572,
     1828    1592,  1606,  1610,  1604,  1673,  1677,  1694,  1697,  1699,  1704,
     1829    1705,  1709,  1710,  1714,  1718,  1722,  1724,  1725,  1727,  1729,
     1830    1775,  1789,  1794,  1799,  1800,  1802,  1817,  1832,  1842,  1857,
     1831    1861,  1866,  1880,  1884,  1889,  1903,  1908,  1913,  1918,  1923,
     1832    1939,  1962,  1970,  1971,  1972,  1974,  1991,  1992,  1994,  1995,
     1833    1997,  1998,  2000,  2055,  2059,  2065,  2068,  2073,  2087,  2091,
     1834    2097,  2096,  2205,  2208,  2214,  2235,  2241,  2245,  2247,  2252,
     1835    2262,  2263,  2268,  2269,  2278,  2348,  2359,  2360,  2364,  2369,
     1836    2438,  2439,  2443,  2448,  2492,  2493,  2498,  2505,  2511,  2512,
     1837    2513,  2514,  2515,  2516,  2522,  2527,  2533,  2536,  2541,  2547,
     1838    2553,  2557,  2582,  2583,  2587,  2591,  2585,  2632,  2635,  2630,
     1839    2651,  2652,  2653,  2656,  2660,  2668,  2667,  2681,  2680,  2689,
     1840    2690,  2691,  2693,  2701,  2712,  2715,  2717,  2722,  2729,  2736,
     1841    2742,  2762,  2767,  2773,  2776,  2778,  2779,  2786,  2792,  2796,
     1842    2801,  2802,  2805,  2809,  2804,  2819,  2823,  2818,  2831,  2834,
     1843    2838,  2833,  2848,  2852,  2847,  2860,  2862,  2890,  2889,  2901,
     1844    2909,  2900,  2920,  2921,  2924,  2928,  2933,  2938,  2937,  2953,
     1845    2959,  2960,  2966,  2967,  2973,  2974,  2975,  2976,  2978,  2979,
     1846    2985,  2986,  2992,  2993,  2995,  2996,  3002,  3003,  3004,  3005,
     1847    3007,  3008,  3018,  3019,  3025,  3026,  3028,  3032,  3037,  3038,
     1848    3045,  3046,  3052,  3053,  3059,  3060,  3066,  3067,  3073,  3077,
     1849    3082,  3083,  3084,  3086,  3092,  3093,  3094,  3095,  3096,  3097,
     1850    3099,  3104,  3105,  3106,  3107,  3108,  3109,  3111,  3116,  3117,
     1851    3118,  3120,  3134,  3135,  3136,  3138,  3155,  3159,  3164,  3165,
     1852    3167,  3172,  3173,  3175,  3181,  3185,  3191,  3194,  3195,  3199,
     1853    3208,  3213,  3217,  3218,  3223,  3222,  3237,  3245,  3244,  3260,
     1854    3268,  3268,  3277,  3279,  3282,  3287,  3289,  3293,  3359,  3362,
     1855    3368,  3371,  3380,  3384,  3388,  3393,  3394,  3399,  3400,  3403,
     1856    3402,  3432,  3434,  3435,  3437,  3481,  3482,  3483,  3484,  3485,
     1857    3486,  3487,  3488,  3489,  3490,  3491,  3492,  3495,  3494,  3505,
     1858    3516,  3521,  3523,  3528,  3529,  3534,  3538,  3540,  3544,  3553,
     1859    3560,  3561,  3567,  3568,  3569,  3570,  3571,  3572,  3573,  3574,
     1860    3584,  3585,  3590,  3595,  3601,  3607,  3612,  3617,  3622,  3628,
     1861    3633,  3638,  3668,  3672,  3679,  3681,  3685,  3690,  3691,  3692,
     1862    3726,  3735,  3724,  3976,  3980,  4000,  4003,  4009,  4014,  4019,
     1863    4025,  4028,  4038,  4045,  4049,  4055,  4069,  4075,  4092,  4097,
     1864    4110,  4111,  4112,  4113,  4114,  4115,  4116,  4118,  4126,  4125,
     1865    4165,  4168,  4173,  4188,  4193,  4200,  4212,  4216,  4212,  4222,
     1866    4224,  4228,  4230,  4245,  4249,  4258,  4263,  4267,  4273,  4276,
     1867    4281,  4286,  4291,  4292,  4293,  4294,  4296,  4297,  4298,  4299,
     1868    4304,  4340,  4341,  4342,  4343,  4344,  4345,  4346,  4348,  4353,
     1869    4358,  4364,  4365,  4367,  4372,  4377,  4382,  4387,  4403,  4404,
     1870    4406,  4411,  4416,  4420,  4432,  4445,  4455,  4460,  4465,  4470,
     1871    4484,  4498,  4499,  4501,  4511,  4513,  4518,  4525,  4532,  4534,
     1872    4536,  4537,  4539,  4543,  4548,  4549,  4551,  4557,  4559,  4561,
     1873    4565,  4570,  4582
    19011874};
    19021875#endif
     
    37303703        case 5:
    37313704/* Line 1269 of yacc.c.  */
    3732 #line 1346 "querytransformparser.ypp"
     3705#line 1380 "querytransformparser.ypp"
    37333706    {
    37343707
     
    37643737  case 7:
    37653738/* Line 1269 of yacc.c.  */
    3766 #line 1378 "querytransformparser.ypp"
     3739#line 1412 "querytransformparser.ypp"
    37673740    {
    37683741        const QRegExp encNameRegExp(QLatin1String("[A-Za-z][A-Za-z0-9._\\-]*"));
     
    37833756  case 8:
    37843757/* Line 1269 of yacc.c.  */
    3785 #line 1394 "querytransformparser.ypp"
     3758#line 1428 "querytransformparser.ypp"
    37863759    {
    37873760        /* In XSL-T, we can have dangling variable references, so resolve them
     
    38843857  case 10:
    38853858/* Line 1269 of yacc.c.  */
    3886 #line 1494 "querytransformparser.ypp"
     3859#line 1528 "querytransformparser.ypp"
    38873860    {
    38883861        // TODO add to namespace context
     
    38933866  case 12:
    38943867/* Line 1269 of yacc.c.  */
    3895 #line 1502 "querytransformparser.ypp"
    3896     {
    3897         disallowedConstruct(parseInfo, (yyloc));
     3868#line 1536 "querytransformparser.ypp"
     3869    {
     3870        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    38983871        if(parseInfo->hasSecondPrologPart)
    38993872            parseInfo->staticContext->error(QtXmlPatterns::tr("A default namespace declaration must occur before function, "
     
    39043877  case 13:
    39053878/* Line 1269 of yacc.c.  */
    3906 #line 1509 "querytransformparser.ypp"
     3879#line 1543 "querytransformparser.ypp"
    39073880    {
    39083881        if(parseInfo->hasSecondPrologPart)
     
    39143887  case 14:
    39153888/* Line 1269 of yacc.c.  */
    3916 #line 1515 "querytransformparser.ypp"
     3889#line 1549 "querytransformparser.ypp"
    39173890    {
    39183891        if(parseInfo->hasSecondPrologPart)
     
    39243897  case 15:
    39253898/* Line 1269 of yacc.c.  */
    3926 #line 1521 "querytransformparser.ypp"
    3927     {
    3928         disallowedConstruct(parseInfo, (yyloc));
     3899#line 1555 "querytransformparser.ypp"
     3900    {
     3901        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    39293902        if(parseInfo->hasSecondPrologPart)
    39303903            parseInfo->staticContext->error(QtXmlPatterns::tr("Module imports must occur before function, "
     
    39353908  case 17:
    39363909/* Line 1269 of yacc.c.  */
    3937 #line 1531 "querytransformparser.ypp"
     3910#line 1565 "querytransformparser.ypp"
    39383911    {
    39393912        parseInfo->hasSecondPrologPart = true;
     
    39433916  case 18:
    39443917/* Line 1269 of yacc.c.  */
    3945 #line 1535 "querytransformparser.ypp"
     3918#line 1569 "querytransformparser.ypp"
    39463919    {
    39473920        parseInfo->hasSecondPrologPart = true;
     
    39513924  case 19:
    39523925/* Line 1269 of yacc.c.  */
    3953 #line 1539 "querytransformparser.ypp"
    3954     {
    3955         disallowedConstruct(parseInfo, (yyloc));
     3926#line 1573 "querytransformparser.ypp"
     3927    {
     3928        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    39563929        parseInfo->hasSecondPrologPart = true;
    39573930    }
     
    39603933  case 20:
    39613934/* Line 1269 of yacc.c.  */
    3962 #line 1562 "querytransformparser.ypp"
     3935#line 1596 "querytransformparser.ypp"
    39633936    {
    39643937        Template::Ptr temp(create(new Template(parseInfo->currentImportPrecedence, (yyvsp[(5) - (7)].sequenceType)), (yyloc), parseInfo));
     
    39733946  case 21:
    39743947/* Line 1269 of yacc.c.  */
    3975 #line 1572 "querytransformparser.ypp"
     3948#line 1606 "querytransformparser.ypp"
    39763949    {
    39773950    parseInfo->isParsingPattern = true;
     
    39813954  case 22:
    39823955/* Line 1269 of yacc.c.  */
    3983 #line 1576 "querytransformparser.ypp"
     3956#line 1610 "querytransformparser.ypp"
    39843957    {
    39853958    parseInfo->isParsingPattern = false;
     
    39893962  case 23:
    39903963/* Line 1269 of yacc.c.  */
    3991 #line 1585 "querytransformparser.ypp"
     3964#line 1619 "querytransformparser.ypp"
    39923965    {
    39933966        /* In this grammar branch, we're guaranteed to be a template rule, but
     
    40464019  case 24:
    40474020/* Line 1269 of yacc.c.  */
    4048 #line 1639 "querytransformparser.ypp"
     4021#line 1673 "querytransformparser.ypp"
    40494022    {
    40504023        (yyval.enums.Double) = std::numeric_limits<xsDouble>::quiet_NaN();
     
    40544027  case 25:
    40554028/* Line 1269 of yacc.c.  */
    4056 #line 1644 "querytransformparser.ypp"
     4029#line 1678 "querytransformparser.ypp"
    40574030    {
    40584031        const AtomicValue::Ptr val(Decimal::fromLexical((yyvsp[(2) - (2)].sval)));
    40594032        if(val->hasError())
    40604033        {
    4061             parseInfo->staticContext->error(QtXmlPatterns::tr("The value of attribute %1 must of type %2, which %3 isn't.")
     4034            parseInfo->staticContext->error(QtXmlPatterns::tr("The value of attribute %1 must be of type %2, which %3 isn't.")
    40624035                                                             .arg(formatKeyword(QLatin1String("priority")),
    40634036                                                                  formatType(parseInfo->staticContext->namePool(), BuiltinTypes::xsDecimal),
     
    40734046  case 26:
    40744047/* Line 1269 of yacc.c.  */
    4075 #line 1660 "querytransformparser.ypp"
     4048#line 1694 "querytransformparser.ypp"
    40764049    {
    40774050        (yyval.qName) = QXmlName();
     
    40814054  case 28:
    40824055/* Line 1269 of yacc.c.  */
    4083 #line 1666 "querytransformparser.ypp"
     4056#line 1700 "querytransformparser.ypp"
    40844057    {
    40854058        (yyval.qName) = (yyvsp[(2) - (2)].qName);
     
    40894062  case 30:
    40904063/* Line 1269 of yacc.c.  */
    4091 #line 1672 "querytransformparser.ypp"
    4092     {
    4093         disallowedConstruct(parseInfo, (yyloc));
     4064#line 1706 "querytransformparser.ypp"
     4065    {
     4066        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    40944067    }
    40954068    break;
     
    40974070  case 32:
    40984071/* Line 1269 of yacc.c.  */
    4099 #line 1677 "querytransformparser.ypp"
    4100     {
    4101         disallowedConstruct(parseInfo, (yyloc));
     4072#line 1711 "querytransformparser.ypp"
     4073    {
     4074        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    41024075    }
    41034076    break;
     
    41054078  case 33:
    41064079/* Line 1269 of yacc.c.  */
    4107 #line 1681 "querytransformparser.ypp"
    4108     {
    4109         disallowedConstruct(parseInfo, (yyloc));
     4080#line 1715 "querytransformparser.ypp"
     4081    {
     4082        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    41104083    }
    41114084    break;
     
    41134086  case 34:
    41144087/* Line 1269 of yacc.c.  */
    4115 #line 1685 "querytransformparser.ypp"
    4116     {
    4117         disallowedConstruct(parseInfo, (yyloc));
     4088#line 1719 "querytransformparser.ypp"
     4089    {
     4090        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    41184091    }
    41194092    break;
     
    41214094  case 39:
    41224095/* Line 1269 of yacc.c.  */
    4123 #line 1696 "querytransformparser.ypp"
     4096#line 1730 "querytransformparser.ypp"
    41244097    {
    41254098        if(!(yyvsp[(6) - (7)].enums.Bool))
    4126             disallowedConstruct(parseInfo, (yyloc));
     4099            allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    41274100
    41284101        if((yyvsp[(3) - (7)].sval) == QLatin1String("xmlns"))
     
    41354108        {
    41364109             parseInfo->staticContext->error(QtXmlPatterns::tr(
    4137                                             "The prefix %1 can not be bound. By default, it is already bound "
     4110                                            "The prefix %1 cannot be bound. By default, it is already bound "
    41384111                                            "to the namespace %2.")
    41394112                                             .arg(formatKeyword("xml"))
     
    41704143  case 40:
    41714144/* Line 1269 of yacc.c.  */
    4172 #line 1742 "querytransformparser.ypp"
     4145#line 1776 "querytransformparser.ypp"
    41734146    {
    41744147        if(parseInfo->hasDeclaration(ParserContext::BoundarySpaceDecl))
     
    41874160  case 41:
    41884161/* Line 1269 of yacc.c.  */
    4189 #line 1756 "querytransformparser.ypp"
     4162#line 1790 "querytransformparser.ypp"
    41904163    {
    41914164        (yyval.enums.boundarySpacePolicy) = StaticContext::BSPStrip;
     
    41954168  case 42:
    41964169/* Line 1269 of yacc.c.  */
    4197 #line 1761 "querytransformparser.ypp"
     4170#line 1795 "querytransformparser.ypp"
    41984171    {
    41994172        (yyval.enums.boundarySpacePolicy) = StaticContext::BSPPreserve;
     
    42034176  case 45:
    42044177/* Line 1269 of yacc.c.  */
    4205 #line 1770 "querytransformparser.ypp"
     4178#line 1804 "querytransformparser.ypp"
    42064179    {
    42074180        if(parseInfo->hasDeclaration(ParserContext::DeclareDefaultElementNamespace))
     
    42204193  case 46:
    42214194/* Line 1269 of yacc.c.  */
    4222 #line 1785 "querytransformparser.ypp"
     4195#line 1819 "querytransformparser.ypp"
    42234196    {
    42244197        if(parseInfo->hasDeclaration(ParserContext::DeclareDefaultFunctionNamespace))
     
    42374210  case 47:
    42384211/* Line 1269 of yacc.c.  */
    4239 #line 1799 "querytransformparser.ypp"
     4212#line 1833 "querytransformparser.ypp"
    42404213    {
    42414214        if((yyvsp[(3) - (5)].qName).prefix() == StandardPrefixes::empty)
     
    42504223  case 48:
    42514224/* Line 1269 of yacc.c.  */
    4252 #line 1809 "querytransformparser.ypp"
    4253     {
    4254         disallowedConstruct(parseInfo, (yyloc));
     4225#line 1843 "querytransformparser.ypp"
     4226    {
     4227        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    42554228        if(parseInfo->hasDeclaration(ParserContext::OrderingModeDecl))
    42564229        {
     
    42684241  case 49:
    42694242/* Line 1269 of yacc.c.  */
    4270 #line 1824 "querytransformparser.ypp"
     4243#line 1858 "querytransformparser.ypp"
    42714244    {
    42724245        (yyval.enums.orderingMode) = StaticContext::Ordered;
     
    42764249  case 50:
    42774250/* Line 1269 of yacc.c.  */
    4278 #line 1828 "querytransformparser.ypp"
     4251#line 1862 "querytransformparser.ypp"
    42794252    {
    42804253        (yyval.enums.orderingMode) = StaticContext::Unordered;
     
    42844257  case 51:
    42854258/* Line 1269 of yacc.c.  */
    4286 #line 1833 "querytransformparser.ypp"
     4259#line 1867 "querytransformparser.ypp"
    42874260    {
    42884261        if(parseInfo->hasDeclaration(ParserContext::EmptyOrderDecl))
     
    43014274  case 52:
    43024275/* Line 1269 of yacc.c.  */
    4303 #line 1847 "querytransformparser.ypp"
     4276#line 1881 "querytransformparser.ypp"
    43044277    {
    43054278        (yyval.enums.orderingEmptySequence) = StaticContext::Least;
     
    43094282  case 53:
    43104283/* Line 1269 of yacc.c.  */
    4311 #line 1851 "querytransformparser.ypp"
     4284#line 1885 "querytransformparser.ypp"
    43124285    {
    43134286        (yyval.enums.orderingEmptySequence) = StaticContext::Greatest;
     
    43174290  case 54:
    43184291/* Line 1269 of yacc.c.  */
    4319 #line 1857 "querytransformparser.ypp"
     4292#line 1891 "querytransformparser.ypp"
    43204293    {
    43214294        if(parseInfo->hasDeclaration(ParserContext::CopyNamespacesDecl))
     
    43334306  case 55:
    43344307/* Line 1269 of yacc.c.  */
    4335 #line 1870 "querytransformparser.ypp"
     4308#line 1904 "querytransformparser.ypp"
    43364309    {
    43374310        parseInfo->preserveNamespacesMode = true;
     
    43414314  case 56:
    43424315/* Line 1269 of yacc.c.  */
    4343 #line 1875 "querytransformparser.ypp"
     4316#line 1909 "querytransformparser.ypp"
    43444317    {
    43454318        parseInfo->preserveNamespacesMode = false;
     
    43494322  case 57:
    43504323/* Line 1269 of yacc.c.  */
    4351 #line 1880 "querytransformparser.ypp"
     4324#line 1914 "querytransformparser.ypp"
    43524325    {
    43534326        parseInfo->inheritNamespacesMode = true;
     
    43574330  case 58:
    43584331/* Line 1269 of yacc.c.  */
    4359 #line 1885 "querytransformparser.ypp"
     4332#line 1919 "querytransformparser.ypp"
    43604333    {
    43614334        parseInfo->inheritNamespacesMode = false;
     
    43654338  case 59:
    43664339/* Line 1269 of yacc.c.  */
    4367 #line 1890 "querytransformparser.ypp"
     4340#line 1924 "querytransformparser.ypp"
    43684341    {
    43694342        if(parseInfo->hasDeclaration(ParserContext::DefaultCollationDecl))
     
    43844357  case 60:
    43854358/* Line 1269 of yacc.c.  */
    4386 #line 1906 "querytransformparser.ypp"
    4387     {
    4388         disallowedConstruct(parseInfo, (yyloc), (yyvsp[(3) - (5)].enums.Bool));
     4359#line 1940 "querytransformparser.ypp"
     4360    {
     4361        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20), parseInfo, (yyloc), (yyvsp[(3) - (5)].enums.Bool));
    43894362        if(parseInfo->hasDeclaration(ParserContext::BaseURIDecl))
    43904363        {
     
    44104383  case 61:
    44114384/* Line 1269 of yacc.c.  */
    4412 #line 1929 "querytransformparser.ypp"
     4385#line 1963 "querytransformparser.ypp"
    44134386    {
    44144387        parseInfo->staticContext->error(QtXmlPatterns::tr("The Schema Import feature is not supported, "
     
    44214394  case 65:
    44224395/* Line 1269 of yacc.c.  */
    4423 #line 1941 "querytransformparser.ypp"
     4396#line 1975 "querytransformparser.ypp"
    44244397    {
    44254398        if((yyvsp[(4) - (6)].sval).isEmpty())
     
    44414414  case 72:
    44424415/* Line 1269 of yacc.c.  */
    4443 #line 1968 "querytransformparser.ypp"
    4444     {
    4445         disallowedConstruct(parseInfo, (yyloc), (yyvsp[(3) - (9)].enums.Bool));
     4416#line 2002 "querytransformparser.ypp"
     4417    {
     4418        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(3) - (9)].enums.Bool));
    44464419        if(variableByName((yyvsp[(5) - (9)].qName), parseInfo))
    44474420        {
    4448             parseInfo->staticContext->error(QtXmlPatterns::tr("A variable by name %1 has already "
     4421            parseInfo->staticContext->error(QtXmlPatterns::tr("A variable with name %1 has already "
    44494422                                                              "been declared.")
    44504423                                               .arg(formatKeyword(parseInfo->staticContext->namePool()->toLexical((yyvsp[(5) - (9)].qName)))),
     
    44864459                {
    44874460                    parseInfo->staticContext->error(QtXmlPatterns::tr("No value is available for the external "
    4488                                                                       "variable by name %1.")
     4461                                                                      "variable with name %1.")
    44894462                                                       .arg(formatKeyword(parseInfo->staticContext->namePool(), (yyvsp[(5) - (9)].qName))),
    44904463                                                    parseInfo->isXSLT() ? ReportContext::XTDE0050 : ReportContext::XPDY0002,
     
    44984471  case 73:
    44994472/* Line 1269 of yacc.c.  */
    4500 #line 2022 "querytransformparser.ypp"
     4473#line 2056 "querytransformparser.ypp"
    45014474    {
    45024475        (yyval.expr).reset();
     
    45064479  case 74:
    45074480/* Line 1269 of yacc.c.  */
    4508 #line 2026 "querytransformparser.ypp"
     4481#line 2060 "querytransformparser.ypp"
    45094482    {
    45104483        (yyval.expr) = (yyvsp[(2) - (2)].expr);
     
    45144487  case 75:
    45154488/* Line 1269 of yacc.c.  */
    4516 #line 2031 "querytransformparser.ypp"
     4489#line 2065 "querytransformparser.ypp"
    45174490    {
    45184491        (yyval.expr).reset();
     
    45224495  case 76:
    45234496/* Line 1269 of yacc.c.  */
    4524 #line 2035 "querytransformparser.ypp"
     4497#line 2069 "querytransformparser.ypp"
    45254498    {
    45264499        (yyval.expr) = (yyvsp[(2) - (2)].expr);
     
    45304503  case 77:
    45314504/* Line 1269 of yacc.c.  */
    4532 #line 2040 "querytransformparser.ypp"
     4505#line 2074 "querytransformparser.ypp"
    45334506    {
    45344507        if(parseInfo->hasDeclaration(ParserContext::ConstructionDecl))
     
    45474520  case 78:
    45484521/* Line 1269 of yacc.c.  */
    4549 #line 2054 "querytransformparser.ypp"
     4522#line 2088 "querytransformparser.ypp"
    45504523    {
    45514524        (yyval.enums.constructionMode) = StaticContext::CMStrip;
     
    45554528  case 79:
    45564529/* Line 1269 of yacc.c.  */
    4557 #line 2058 "querytransformparser.ypp"
     4530#line 2092 "querytransformparser.ypp"
    45584531    {
    45594532        (yyval.enums.constructionMode) = StaticContext::CMPreserve;
     
    45634536  case 80:
    45644537/* Line 1269 of yacc.c.  */
    4565 #line 2063 "querytransformparser.ypp"
     4538#line 2097 "querytransformparser.ypp"
    45664539    {
    45674540                (yyval.enums.slot) = parseInfo->currentExpressionSlot() - (yyvsp[(6) - (7)].functionArguments).count();
     
    45714544  case 81:
    45724545/* Line 1269 of yacc.c.  */
    4573 #line 2067 "querytransformparser.ypp"
     4546#line 2101 "querytransformparser.ypp"
    45744547    {
    45754548        if(!(yyvsp[(3) - (11)].enums.Bool))
    4576             disallowedConstruct(parseInfo, (yyloc), (yyvsp[(3) - (11)].enums.Bool));
     4549            allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(3) - (11)].enums.Bool));
    45774550
    45784551        /* If FunctionBody is null, it is 'external', otherwise the value is the body. */
     
    46784651  case 82:
    46794652/* Line 1269 of yacc.c.  */
    4680 #line 2171 "querytransformparser.ypp"
     4653#line 2205 "querytransformparser.ypp"
    46814654    {
    46824655        (yyval.functionArguments) = FunctionArgument::List();
     
    46864659  case 83:
    46874660/* Line 1269 of yacc.c.  */
    4688 #line 2175 "querytransformparser.ypp"
     4661#line 2209 "querytransformparser.ypp"
    46894662    {
    46904663        FunctionArgument::List l;
     
    46964669  case 84:
    46974670/* Line 1269 of yacc.c.  */
    4698 #line 2181 "querytransformparser.ypp"
     4671#line 2215 "querytransformparser.ypp"
    46994672    {
    47004673        FunctionArgument::List::const_iterator it((yyvsp[(1) - (3)].functionArguments).constBegin());
     
    47054678            if((*it)->name() == (yyvsp[(3) - (3)].functionArgument)->name())
    47064679            {
    4707                 parseInfo->staticContext->error(QtXmlPatterns::tr("An argument by name %1 has already "
     4680                parseInfo->staticContext->error(QtXmlPatterns::tr("An argument with name %1 has already "
    47084681                                                   "been declared. Every argument name "
    47094682                                                   "must be unique.")
     
    47204693  case 85:
    47214694/* Line 1269 of yacc.c.  */
    4722 #line 2202 "querytransformparser.ypp"
     4695#line 2236 "querytransformparser.ypp"
    47234696    {
    47244697        pushVariable((yyvsp[(2) - (3)].qName), (yyvsp[(3) - (3)].sequenceType), Expression::Ptr(), VariableDeclaration::FunctionArgument, (yyloc), parseInfo);
     
    47294702  case 86:
    47304703/* Line 1269 of yacc.c.  */
    4731 #line 2208 "querytransformparser.ypp"
     4704#line 2242 "querytransformparser.ypp"
    47324705    {
    47334706        (yyval.expr).reset();
     
    47374710  case 88:
    47384711/* Line 1269 of yacc.c.  */
    4739 #line 2214 "querytransformparser.ypp"
     4712#line 2248 "querytransformparser.ypp"
    47404713    {
    47414714        (yyval.expr) = (yyvsp[(2) - (3)].expr);
     
    47454718  case 91:
    47464719/* Line 1269 of yacc.c.  */
    4747 #line 2230 "querytransformparser.ypp"
     4720#line 2264 "querytransformparser.ypp"
    47484721    {
    47494722        (yyval.expr) = create(new CombineNodes((yyvsp[(1) - (3)].expr), CombineNodes::Union, (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
     
    47534726  case 93:
    47544727/* Line 1269 of yacc.c.  */
    4755 #line 2236 "querytransformparser.ypp"
     4728#line 2270 "querytransformparser.ypp"
    47564729    {
    47574730        /* We write this into a node test. The spec says, 5.5.3 The Meaning of a Pattern:
     
    47664739  case 94:
    47674740/* Line 1269 of yacc.c.  */
    4768 #line 2245 "querytransformparser.ypp"
     4741#line 2279 "querytransformparser.ypp"
    47694742    {
    47704743        /* /axis::node-test
     
    48404813  case 95:
    48414814/* Line 1269 of yacc.c.  */
    4842 #line 2315 "querytransformparser.ypp"
     4815#line 2349 "querytransformparser.ypp"
    48434816    {
    48444817        /* //axis::node-test
     
    48554828  case 97:
    48564829/* Line 1269 of yacc.c.  */
    4857 #line 2327 "querytransformparser.ypp"
     4830#line 2361 "querytransformparser.ypp"
    48584831    {
    48594832        createIdPatternPath((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), QXmlNodeModelIndex::AxisParent, (yylsp[(2) - (3)]), parseInfo);
     
    48634836  case 98:
    48644837/* Line 1269 of yacc.c.  */
    4865 #line 2331 "querytransformparser.ypp"
     4838#line 2365 "querytransformparser.ypp"
    48664839    {
    48674840        createIdPatternPath((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), QXmlNodeModelIndex::AxisAncestor, (yylsp[(2) - (3)]), parseInfo);
     
    48714844  case 99:
    48724845/* Line 1269 of yacc.c.  */
    4873 #line 2336 "querytransformparser.ypp"
     4846#line 2370 "querytransformparser.ypp"
    48744847    {
    48754848        const Expression::List ands((yyvsp[(1) - (1)].expr)->operands());
     
    49434916  case 101:
    49444917/* Line 1269 of yacc.c.  */
    4945 #line 2406 "querytransformparser.ypp"
     4918#line 2440 "querytransformparser.ypp"
    49464919    {
    49474920        (yyval.expr) = createPatternPath((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), QXmlNodeModelIndex::AxisParent, (yylsp[(2) - (3)]), parseInfo);
     
    49514924  case 102:
    49524925/* Line 1269 of yacc.c.  */
    4953 #line 2410 "querytransformparser.ypp"
     4926#line 2444 "querytransformparser.ypp"
    49544927    {
    49554928        (yyval.expr) = createPatternPath((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), QXmlNodeModelIndex::AxisAncestor, (yylsp[(2) - (3)]), parseInfo);
     
    49594932  case 103:
    49604933/* Line 1269 of yacc.c.  */
    4961 #line 2415 "querytransformparser.ypp"
     4934#line 2449 "querytransformparser.ypp"
    49624935    {
    49634936        const Expression::Ptr expr(findAxisStep((yyvsp[(1) - (1)].expr)));
     
    50064979  case 105:
    50074980/* Line 1269 of yacc.c.  */
    5008 #line 2460 "querytransformparser.ypp"
     4981#line 2494 "querytransformparser.ypp"
    50094982    {
    50104983        (yyval.expr) = create(new ExpressionSequence((yyvsp[(1) - (1)].expressionList)), (yyloc), parseInfo);
     
    50144987  case 106:
    50154988/* Line 1269 of yacc.c.  */
    5016 #line 2465 "querytransformparser.ypp"
     4989#line 2499 "querytransformparser.ypp"
    50174990    {
    50184991        Expression::List l;
     
    50254998  case 107:
    50264999/* Line 1269 of yacc.c.  */
    5027 #line 2472 "querytransformparser.ypp"
     5000#line 2506 "querytransformparser.ypp"
    50285001    {
    50295002        (yyvsp[(1) - (3)].expressionList).append((yyvsp[(3) - (3)].expr));
     
    50345007  case 113:
    50355008/* Line 1269 of yacc.c.  */
    5036 #line 2483 "querytransformparser.ypp"
     5009#line 2517 "querytransformparser.ypp"
    50375010    {
    50385011        (yyval.expr) = createDirAttributeValue((yyvsp[(3) - (4)].expressionList), parseInfo, (yyloc));
     
    50425015  case 114:
    50435016/* Line 1269 of yacc.c.  */
    5044 #line 2488 "querytransformparser.ypp"
     5017#line 2522 "querytransformparser.ypp"
    50455018    {
    50465019        QVector<QXmlName> result;
     
    50525025  case 115:
    50535026/* Line 1269 of yacc.c.  */
    5054 #line 2494 "querytransformparser.ypp"
     5027#line 2528 "querytransformparser.ypp"
    50555028    {
    50565029        (yyval.qNameVector) = (yyvsp[(2) - (2)].qNameVector);
     
    50605033  case 116:
    50615034/* Line 1269 of yacc.c.  */
    5062 #line 2499 "querytransformparser.ypp"
     5035#line 2533 "querytransformparser.ypp"
    50635036    {
    50645037            (yyval.qName) = QXmlName(StandardNamespaces::InternalXSLT, StandardLocalNames::Default);
     
    50685041  case 117:
    50695042/* Line 1269 of yacc.c.  */
    5070 #line 2503 "querytransformparser.ypp"
     5043#line 2537 "querytransformparser.ypp"
    50715044    {
    50725045        (yyval.qName) = (yyvsp[(2) - (2)].qName);
     
    50765049  case 118:
    50775050/* Line 1269 of yacc.c.  */
    5078 #line 2508 "querytransformparser.ypp"
     5051#line 2542 "querytransformparser.ypp"
    50795052    {
    50805053        QVector<QXmlName> result;
     
    50865059  case 119:
    50875060/* Line 1269 of yacc.c.  */
    5088 #line 2514 "querytransformparser.ypp"
     5061#line 2548 "querytransformparser.ypp"
    50895062    {
    50905063        (yyvsp[(1) - (3)].qNameVector).append((yyvsp[(3) - (3)].qName));
     
    50955068  case 120:
    50965069/* Line 1269 of yacc.c.  */
    5097 #line 2520 "querytransformparser.ypp"
     5070#line 2554 "querytransformparser.ypp"
    50985071    {
    50995072        (yyval.qName) = (yyvsp[(1) - (1)].qName);
     
    51035076  case 121:
    51045077/* Line 1269 of yacc.c.  */
    5105 #line 2524 "querytransformparser.ypp"
     5078#line 2558 "querytransformparser.ypp"
    51065079    {
    51075080        if((yyvsp[(1) - (1)].sval) == QLatin1String("#current"))
     
    51305103  case 124:
    51315104/* Line 1269 of yacc.c.  */
    5132 #line 2553 "querytransformparser.ypp"
     5105#line 2587 "querytransformparser.ypp"
    51335106    {
    51345107               /* We're pushing the range variable here, not the positional. */
     
    51395112  case 125:
    51405113/* Line 1269 of yacc.c.  */
    5141 #line 2557 "querytransformparser.ypp"
     5114#line 2591 "querytransformparser.ypp"
    51425115    {
    51435116               /* It is ok this appears after PositionalVar, because currentRangeSlot()
     
    51505123  case 126:
    51515124/* Line 1269 of yacc.c.  */
    5152 #line 2564 "querytransformparser.ypp"
     5125#line 2598 "querytransformparser.ypp"
    51535126    {
    51545127        Q_ASSERT((yyvsp[(7) - (10)].expr));
     
    51865159  case 127:
    51875160/* Line 1269 of yacc.c.  */
    5188 #line 2598 "querytransformparser.ypp"
     5161#line 2632 "querytransformparser.ypp"
    51895162    {
    51905163             pushVariable((yyvsp[(3) - (7)].qName), quantificationType((yyvsp[(4) - (7)].sequenceType)), (yyvsp[(7) - (7)].expr), VariableDeclaration::RangeVariable, (yyloc), parseInfo);
     
    51945167  case 128:
    51955168/* Line 1269 of yacc.c.  */
    5196 #line 2601 "querytransformparser.ypp"
     5169#line 2635 "querytransformparser.ypp"
    51975170    {
    51985171             /* It is ok this appears after PositionalVar, because currentRangeSlot()
     
    52055178  case 129:
    52065179/* Line 1269 of yacc.c.  */
    5207 #line 2608 "querytransformparser.ypp"
     5180#line 2642 "querytransformparser.ypp"
    52085181    {
    52095182        (yyval.expr) = create(new ForClause((yyvsp[(9) - (10)].enums.slot), (yyvsp[(7) - (10)].expr), (yyvsp[(10) - (10)].expr), (yyvsp[(5) - (10)].enums.slot)), (yyloc), parseInfo);
     
    52185191  case 133:
    52195192/* Line 1269 of yacc.c.  */
    5220 #line 2622 "querytransformparser.ypp"
     5193#line 2656 "querytransformparser.ypp"
    52215194    {
    52225195        (yyval.enums.slot) = -1;
     
    52265199  case 134:
    52275200/* Line 1269 of yacc.c.  */
    5228 #line 2627 "querytransformparser.ypp"
     5201#line 2661 "querytransformparser.ypp"
    52295202    {
    52305203        pushVariable((yyvsp[(3) - (3)].qName), CommonSequenceTypes::ExactlyOneInteger, Expression::Ptr(),
     
    52365209  case 135:
    52375210/* Line 1269 of yacc.c.  */
    5238 #line 2634 "querytransformparser.ypp"
     5211#line 2668 "querytransformparser.ypp"
    52395212    {
    52405213                (yyval.expr) = pushVariable((yyvsp[(4) - (7)].qName), quantificationType((yyvsp[(5) - (7)].sequenceType)), (yyvsp[(7) - (7)].expr), VariableDeclaration::ExpressionVariable, (yyloc), parseInfo);
     
    52445217  case 136:
    52455218/* Line 1269 of yacc.c.  */
    5246 #line 2638 "querytransformparser.ypp"
    5247     {
    5248         disallowedConstruct(parseInfo, (yyloc), (yyvsp[(2) - (9)].enums.Bool));
     5219#line 2672 "querytransformparser.ypp"
     5220    {
     5221        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(2) - (9)].enums.Bool));
    52495222
    52505223        Q_ASSERT(parseInfo->variables.top()->name == (yyvsp[(4) - (9)].qName));
     
    52565229  case 137:
    52575230/* Line 1269 of yacc.c.  */
    5258 #line 2647 "querytransformparser.ypp"
     5231#line 2681 "querytransformparser.ypp"
    52595232    { (yyval.expr) = pushVariable((yyvsp[(3) - (6)].qName), quantificationType((yyvsp[(4) - (6)].sequenceType)), (yyvsp[(6) - (6)].expr), VariableDeclaration::ExpressionVariable, (yyloc), parseInfo);}
    52605233    break;
     
    52625235  case 138:
    52635236/* Line 1269 of yacc.c.  */
    5264 #line 2649 "querytransformparser.ypp"
     5237#line 2683 "querytransformparser.ypp"
    52655238    {
    52665239        Q_ASSERT(parseInfo->variables.top()->name == (yyvsp[(3) - (8)].qName));
     
    52725245  case 142:
    52735246/* Line 1269 of yacc.c.  */
    5274 #line 2660 "querytransformparser.ypp"
     5247#line 2694 "querytransformparser.ypp"
    52755248    {
    52765249        if((yyvsp[(1) - (3)].orderSpecs).isEmpty())
     
    52835256  case 143:
    52845257/* Line 1269 of yacc.c.  */
    5285 #line 2668 "querytransformparser.ypp"
     5258#line 2702 "querytransformparser.ypp"
    52865259    {
    52875260        if((yyvsp[(3) - (5)].orderSpecs).isEmpty())
     
    52965269  case 144:
    52975270/* Line 1269 of yacc.c.  */
    5298 #line 2678 "querytransformparser.ypp"
     5271#line 2712 "querytransformparser.ypp"
    52995272    {
    53005273        (yyval.orderSpecs) = OrderSpecTransfer::List();
     
    53045277  case 146:
    53055278/* Line 1269 of yacc.c.  */
    5306 #line 2684 "querytransformparser.ypp"
     5279#line 2718 "querytransformparser.ypp"
    53075280    {
    53085281        (yyval.orderSpecs) = (yyvsp[(2) - (2)].orderSpecs);
     
    53125285  case 147:
    53135286/* Line 1269 of yacc.c.  */
    5314 #line 2689 "querytransformparser.ypp"
     5287#line 2723 "querytransformparser.ypp"
    53155288    {
    53165289        OrderSpecTransfer::List list;
     
    53235296  case 148:
    53245297/* Line 1269 of yacc.c.  */
    5325 #line 2696 "querytransformparser.ypp"
     5298#line 2730 "querytransformparser.ypp"
    53265299    {
    53275300        OrderSpecTransfer::List list;
     
    53335306  case 149:
    53345307/* Line 1269 of yacc.c.  */
    5335 #line 2703 "querytransformparser.ypp"
     5308#line 2737 "querytransformparser.ypp"
    53365309    {
    53375310        (yyval.orderSpec) = OrderSpecTransfer((yyvsp[(1) - (4)].expr), OrderBy::OrderSpec((yyvsp[(2) - (4)].enums.sortDirection), (yyvsp[(3) - (4)].enums.orderingEmptySequence)));
     
    53415314  case 150:
    53425315/* Line 1269 of yacc.c.  */
    5343 #line 2708 "querytransformparser.ypp"
     5316#line 2742 "querytransformparser.ypp"
    53445317    {
    53455318        /* Where does the specification state the default value is ascending?
     
    53655338  case 151:
    53665339/* Line 1269 of yacc.c.  */
    5367 #line 2729 "querytransformparser.ypp"
     5340#line 2763 "querytransformparser.ypp"
    53685341    {
    53695342        (yyval.enums.sortDirection) = OrderBy::OrderSpec::Ascending;
     
    53735346  case 152:
    53745347/* Line 1269 of yacc.c.  */
    5375 #line 2734 "querytransformparser.ypp"
     5348#line 2768 "querytransformparser.ypp"
    53765349    {
    53775350        (yyval.enums.sortDirection) = OrderBy::OrderSpec::Descending;
     
    53815354  case 153:
    53825355/* Line 1269 of yacc.c.  */
    5383 #line 2739 "querytransformparser.ypp"
     5356#line 2773 "querytransformparser.ypp"
    53845357    {
    53855358        (yyval.enums.orderingEmptySequence) = parseInfo->staticContext->orderingEmptySequence();
     
    53895362  case 156:
    53905363/* Line 1269 of yacc.c.  */
    5391 #line 2746 "querytransformparser.ypp"
     5364#line 2780 "querytransformparser.ypp"
    53925365    {
    53935366        if(parseInfo->isXSLT())
     
    54005373  case 157:
    54015374/* Line 1269 of yacc.c.  */
    5402 #line 2753 "querytransformparser.ypp"
     5375#line 2787 "querytransformparser.ypp"
    54035376    {
    54045377        /* We do nothing. We don't use collations, and we have this non-terminal
     
    54095382  case 158:
    54105383/* Line 1269 of yacc.c.  */
    5411 #line 2759 "querytransformparser.ypp"
     5384#line 2793 "querytransformparser.ypp"
    54125385    {
    54135386        parseInfo->orderStability.push(OrderBy::StableOrder);
     
    54175390  case 159:
    54185391/* Line 1269 of yacc.c.  */
    5419 #line 2763 "querytransformparser.ypp"
     5392#line 2797 "querytransformparser.ypp"
    54205393    {
    54215394        parseInfo->orderStability.push(OrderBy::UnstableOrder);
     
    54255398  case 162:
    54265399/* Line 1269 of yacc.c.  */
    5427 #line 2771 "querytransformparser.ypp"
     5400#line 2805 "querytransformparser.ypp"
    54285401    {
    54295402                            pushVariable((yyvsp[(3) - (6)].qName), quantificationType((yyvsp[(4) - (6)].sequenceType)), (yyvsp[(6) - (6)].expr),
     
    54345407  case 163:
    54355408/* Line 1269 of yacc.c.  */
    5436 #line 2775 "querytransformparser.ypp"
     5409#line 2809 "querytransformparser.ypp"
    54375410    {(yyval.enums.slot) = parseInfo->staticContext->currentRangeSlot();}
    54385411    break;
     
    54405413  case 164:
    54415414/* Line 1269 of yacc.c.  */
    5442 #line 2777 "querytransformparser.ypp"
    5443     {
     5415#line 2811 "querytransformparser.ypp"
     5416    {
     5417        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    54445418        (yyval.expr) = create(new QuantifiedExpression((yyvsp[(8) - (9)].enums.slot),
    54455419                                             QuantifiedExpression::Some, (yyvsp[(6) - (9)].expr), (yyvsp[(9) - (9)].expr)), (yyloc), parseInfo);
     
    54505424  case 165:
    54515425/* Line 1269 of yacc.c.  */
    5452 #line 2784 "querytransformparser.ypp"
     5426#line 2819 "querytransformparser.ypp"
    54535427    {
    54545428                            (yyval.expr) = pushVariable((yyvsp[(3) - (6)].qName), quantificationType((yyvsp[(4) - (6)].sequenceType)), (yyvsp[(6) - (6)].expr),
     
    54595433  case 166:
    54605434/* Line 1269 of yacc.c.  */
    5461 #line 2788 "querytransformparser.ypp"
     5435#line 2823 "querytransformparser.ypp"
    54625436    {(yyval.enums.slot) = parseInfo->staticContext->currentRangeSlot();}
    54635437    break;
     
    54655439  case 167:
    54665440/* Line 1269 of yacc.c.  */
    5467 #line 2790 "querytransformparser.ypp"
     5441#line 2825 "querytransformparser.ypp"
    54685442    {
    54695443        (yyval.expr) = create(new QuantifiedExpression((yyvsp[(8) - (9)].enums.slot),
     
    54755449  case 169:
    54765450/* Line 1269 of yacc.c.  */
    5477 #line 2799 "querytransformparser.ypp"
     5451#line 2834 "querytransformparser.ypp"
    54785452    {
    54795453                            pushVariable((yyvsp[(3) - (6)].qName), quantificationType((yyvsp[(4) - (6)].sequenceType)), (yyvsp[(6) - (6)].expr),
     
    54845458  case 170:
    54855459/* Line 1269 of yacc.c.  */
    5486 #line 2803 "querytransformparser.ypp"
     5460#line 2838 "querytransformparser.ypp"
    54875461    {(yyval.enums.slot) = parseInfo->staticContext->currentRangeSlot();}
    54885462    break;
     
    54905464  case 171:
    54915465/* Line 1269 of yacc.c.  */
    5492 #line 2805 "querytransformparser.ypp"
    5493     {
     5466#line 2840 "querytransformparser.ypp"
     5467    {
     5468        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    54945469        (yyval.expr) = create(new QuantifiedExpression((yyvsp[(8) - (9)].enums.slot),
    54955470                                             QuantifiedExpression::Every, (yyvsp[(6) - (9)].expr), (yyvsp[(9) - (9)].expr)), (yyloc), parseInfo);
     
    55005475  case 172:
    55015476/* Line 1269 of yacc.c.  */
    5502 #line 2812 "querytransformparser.ypp"
     5477#line 2848 "querytransformparser.ypp"
    55035478    {
    55045479                            (yyval.expr) = pushVariable((yyvsp[(3) - (6)].qName), quantificationType((yyvsp[(4) - (6)].sequenceType)), (yyvsp[(6) - (6)].expr),
     
    55095484  case 173:
    55105485/* Line 1269 of yacc.c.  */
    5511 #line 2816 "querytransformparser.ypp"
     5486#line 2852 "querytransformparser.ypp"
    55125487    {(yyval.enums.slot) = parseInfo->staticContext->currentRangeSlot();}
    55135488    break;
     
    55155490  case 174:
    55165491/* Line 1269 of yacc.c.  */
    5517 #line 2818 "querytransformparser.ypp"
     5492#line 2854 "querytransformparser.ypp"
    55185493    {
    55195494        (yyval.expr) = create(new QuantifiedExpression((yyvsp[(8) - (9)].enums.slot),
     
    55255500  case 176:
    55265501/* Line 1269 of yacc.c.  */
    5527 #line 2827 "querytransformparser.ypp"
     5502#line 2863 "querytransformparser.ypp"
    55285503    {
    55295504        (yyval.expr) = (yyvsp[(2) - (2)].expr);
     
    55335508  case 177:
    55345509/* Line 1269 of yacc.c.  */
    5535 #line 2854 "querytransformparser.ypp"
     5510#line 2890 "querytransformparser.ypp"
    55365511    {
    55375512                    parseInfo->typeswitchSource.push((yyvsp[(3) - (4)].expr));
     
    55415516  case 178:
    55425517/* Line 1269 of yacc.c.  */
    5543 #line 2858 "querytransformparser.ypp"
    5544     {
    5545         disallowedConstruct(parseInfo, (yyloc));
     5518#line 2894 "querytransformparser.ypp"
     5519    {
     5520        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    55465521        parseInfo->typeswitchSource.pop();
    55475522        (yyval.expr) = (yyvsp[(6) - (6)].expr);
     
    55515526  case 179:
    55525527/* Line 1269 of yacc.c.  */
    5553 #line 2865 "querytransformparser.ypp"
     5528#line 2901 "querytransformparser.ypp"
    55545529    {
    55555530        if(!(yyvsp[(2) - (3)].qName).isNull())
     
    55635538  case 180:
    55645539/* Line 1269 of yacc.c.  */
    5565 #line 2873 "querytransformparser.ypp"
     5540#line 2909 "querytransformparser.ypp"
    55665541    {
    55675542        /* The variable shouldn't be in-scope for other case branches. */
     
    55735548  case 181:
    55745549/* Line 1269 of yacc.c.  */
    5575 #line 2879 "querytransformparser.ypp"
     5550#line 2915 "querytransformparser.ypp"
    55765551    {
    55775552        const Expression::Ptr instanceOf(create(new InstanceOf(parseInfo->typeswitchSource.top(), (yyvsp[(3) - (8)].sequenceType)), (yyloc), parseInfo));
     
    55825557  case 184:
    55835558/* Line 1269 of yacc.c.  */
    5584 #line 2888 "querytransformparser.ypp"
     5559#line 2924 "querytransformparser.ypp"
    55855560    {
    55865561        (yyval.qName) = QXmlName();
     
    55905565  case 185:
    55915566/* Line 1269 of yacc.c.  */
    5592 #line 2893 "querytransformparser.ypp"
     5567#line 2929 "querytransformparser.ypp"
    55935568    {
    55945569        (yyval.qName) = (yyvsp[(2) - (3)].qName);
     
    55985573  case 186:
    55995574/* Line 1269 of yacc.c.  */
    5600 #line 2898 "querytransformparser.ypp"
     5575#line 2934 "querytransformparser.ypp"
    56015576    {
    56025577        (yyval.expr) = (yyvsp[(3) - (3)].expr);
     
    56065581  case 187:
    56075582/* Line 1269 of yacc.c.  */
    5608 #line 2902 "querytransformparser.ypp"
     5583#line 2938 "querytransformparser.ypp"
    56095584    {
    56105585        if(!(yyvsp[(3) - (3)].qName).isNull())
     
    56195594  case 188:
    56205595/* Line 1269 of yacc.c.  */
    5621 #line 2911 "querytransformparser.ypp"
     5596#line 2947 "querytransformparser.ypp"
    56225597    {
    56235598        if(!(yyvsp[(3) - (6)].qName).isNull())
     
    56295604  case 189:
    56305605/* Line 1269 of yacc.c.  */
    5631 #line 2918 "querytransformparser.ypp"
    5632     {
     5606#line 2954 "querytransformparser.ypp"
     5607    {
     5608        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    56335609        (yyval.expr) = create(new IfThenClause((yyvsp[(3) - (8)].expr), (yyvsp[(6) - (8)].expr), (yyvsp[(8) - (8)].expr)), (yyloc), parseInfo);
    56345610    }
     
    56375613  case 191:
    56385614/* Line 1269 of yacc.c.  */
    5639 #line 2924 "querytransformparser.ypp"
    5640     {
     5615#line 2961 "querytransformparser.ypp"
     5616    {
     5617        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    56415618        (yyval.expr) = create(new OrExpression((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
    56425619    }
     
    56455622  case 193:
    56465623/* Line 1269 of yacc.c.  */
    5647 #line 2930 "querytransformparser.ypp"
    5648     {
     5624#line 2968 "querytransformparser.ypp"
     5625    {
     5626        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    56495627        (yyval.expr) = create(new AndExpression((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
    56505628    }
     
    56535631  case 199:
    56545632/* Line 1269 of yacc.c.  */
    5655 #line 2941 "querytransformparser.ypp"
    5656     {
     5633#line 2980 "querytransformparser.ypp"
     5634    {
     5635        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    56575636        (yyval.expr) = create(new RangeExpression((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
    56585637    }
     
    56615640  case 201:
    56625641/* Line 1269 of yacc.c.  */
    5663 #line 2947 "querytransformparser.ypp"
    5664     {
     5642#line 2987 "querytransformparser.ypp"
     5643    {
     5644        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    56655645        (yyval.expr) = create(new ArithmeticExpression((yyvsp[(1) - (3)].expr), (yyvsp[(2) - (3)].enums.mathOperator), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
    56665646    }
     
    56695649  case 202:
    56705650/* Line 1269 of yacc.c.  */
    5671 #line 2951 "querytransformparser.ypp"
     5651#line 2992 "querytransformparser.ypp"
    56725652    {(yyval.enums.mathOperator) = AtomicMathematician::Add;}
    56735653    break;
     
    56755655  case 203:
    56765656/* Line 1269 of yacc.c.  */
    5677 #line 2952 "querytransformparser.ypp"
     5657#line 2993 "querytransformparser.ypp"
    56785658    {(yyval.enums.mathOperator) = AtomicMathematician::Substract;}
    56795659    break;
     
    56815661  case 205:
    56825662/* Line 1269 of yacc.c.  */
    5683 #line 2956 "querytransformparser.ypp"
    5684     {
     5663#line 2997 "querytransformparser.ypp"
     5664    {
     5665        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    56855666        (yyval.expr) = create(new ArithmeticExpression((yyvsp[(1) - (3)].expr), (yyvsp[(2) - (3)].enums.mathOperator), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
    56865667    }
     
    56895670  case 206:
    56905671/* Line 1269 of yacc.c.  */
    5691 #line 2960 "querytransformparser.ypp"
     5672#line 3002 "querytransformparser.ypp"
    56925673    {(yyval.enums.mathOperator) = AtomicMathematician::Multiply;}
    56935674    break;
     
    56955676  case 207:
    56965677/* Line 1269 of yacc.c.  */
    5697 #line 2961 "querytransformparser.ypp"
     5678#line 3003 "querytransformparser.ypp"
    56985679    {(yyval.enums.mathOperator) = AtomicMathematician::Div;}
    56995680    break;
     
    57015682  case 208:
    57025683/* Line 1269 of yacc.c.  */
    5703 #line 2962 "querytransformparser.ypp"
     5684#line 3004 "querytransformparser.ypp"
    57045685    {(yyval.enums.mathOperator) = AtomicMathematician::IDiv;}
    57055686    break;
     
    57075688  case 209:
    57085689/* Line 1269 of yacc.c.  */
    5709 #line 2963 "querytransformparser.ypp"
     5690#line 3005 "querytransformparser.ypp"
    57105691    {(yyval.enums.mathOperator) = AtomicMathematician::Mod;}
    57115692    break;
     
    57135694  case 211:
    57145695/* Line 1269 of yacc.c.  */
    5715 #line 2967 "querytransformparser.ypp"
    5716     {
     5696#line 3009 "querytransformparser.ypp"
     5697    {
     5698        allowedIn(QueryLanguages(QXmlQuery::XQuery10
     5699                                 | QXmlQuery::XPath20
     5700                                 | QXmlQuery::XmlSchema11IdentityConstraintField
     5701                                 | QXmlQuery::XmlSchema11IdentityConstraintSelector),
     5702                  parseInfo, (yyloc));
    57175703        (yyval.expr) = create(new CombineNodes((yyvsp[(1) - (3)].expr), CombineNodes::Union, (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
    57185704    }
     
    57215707  case 213:
    57225708/* Line 1269 of yacc.c.  */
    5723 #line 2973 "querytransformparser.ypp"
    5724     {
     5709#line 3020 "querytransformparser.ypp"
     5710    {
     5711        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    57255712        (yyval.expr) = create(new CombineNodes((yyvsp[(1) - (3)].expr), (yyvsp[(2) - (3)].enums.combinedNodeOp), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
    57265713    }
     
    57295716  case 216:
    57305717/* Line 1269 of yacc.c.  */
    5731 #line 2981 "querytransformparser.ypp"
     5718#line 3029 "querytransformparser.ypp"
    57325719    {
    57335720        (yyval.enums.combinedNodeOp) = CombineNodes::Intersect;
     
    57375724  case 217:
    57385725/* Line 1269 of yacc.c.  */
    5739 #line 2985 "querytransformparser.ypp"
     5726#line 3033 "querytransformparser.ypp"
    57405727    {
    57415728        (yyval.enums.combinedNodeOp) = CombineNodes::Except;
     
    57455732  case 219:
    57465733/* Line 1269 of yacc.c.  */
    5747 #line 2991 "querytransformparser.ypp"
    5748     {
     5734#line 3039 "querytransformparser.ypp"
     5735    {
     5736        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    57495737        (yyval.expr) = create(new InstanceOf((yyvsp[(1) - (4)].expr),
    5750         SequenceType::Ptr((yyvsp[(4) - (4)].sequenceType))), (yyloc), parseInfo);
     5738                    SequenceType::Ptr((yyvsp[(4) - (4)].sequenceType))), (yyloc), parseInfo);
    57515739    }
    57525740    break;
     
    57545742  case 221:
    57555743/* Line 1269 of yacc.c.  */
    5756 #line 2998 "querytransformparser.ypp"
    5757     {
     5744#line 3047 "querytransformparser.ypp"
     5745    {
     5746        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    57585747        (yyval.expr) = create(new TreatAs((yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].sequenceType)), (yyloc), parseInfo);
    57595748    }
     
    57625751  case 223:
    57635752/* Line 1269 of yacc.c.  */
    5764 #line 3004 "querytransformparser.ypp"
    5765     {
     5753#line 3054 "querytransformparser.ypp"
     5754    {
     5755        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    57665756        (yyval.expr) = create(new CastableAs((yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].sequenceType)), (yyloc), parseInfo);
    57675757    }
     
    57705760  case 225:
    57715761/* Line 1269 of yacc.c.  */
    5772 #line 3010 "querytransformparser.ypp"
    5773     {
     5762#line 3061 "querytransformparser.ypp"
     5763    {
     5764        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    57745765        (yyval.expr) = create(new CastAs((yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].sequenceType)), (yyloc), parseInfo);
    57755766    }
     
    57785769  case 227:
    57795770/* Line 1269 of yacc.c.  */
    5780 #line 3016 "querytransformparser.ypp"
    5781     {
     5771#line 3068 "querytransformparser.ypp"
     5772    {
     5773        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    57825774        (yyval.expr) = create(new UnaryExpression((yyvsp[(1) - (2)].enums.mathOperator), (yyvsp[(2) - (2)].expr), parseInfo->staticContext), (yyloc), parseInfo);
    57835775    }
     
    57865778  case 228:
    57875779/* Line 1269 of yacc.c.  */
    5788 #line 3021 "querytransformparser.ypp"
     5780#line 3074 "querytransformparser.ypp"
    57895781    {
    57905782        (yyval.enums.mathOperator) = AtomicMathematician::Add;
     
    57945786  case 229:
    57955787/* Line 1269 of yacc.c.  */
    5796 #line 3025 "querytransformparser.ypp"
     5788#line 3078 "querytransformparser.ypp"
    57975789    {
    57985790        (yyval.enums.mathOperator) = AtomicMathematician::Substract;
     
    58025794  case 233:
    58035795/* Line 1269 of yacc.c.  */
    5804 #line 3034 "querytransformparser.ypp"
    5805     {
     5796#line 3087 "querytransformparser.ypp"
     5797    {
     5798        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    58065799        (yyval.expr) = create(new GeneralComparison((yyvsp[(1) - (3)].expr), (yyvsp[(2) - (3)].enums.valueOperator), (yyvsp[(3) - (3)].expr), parseInfo->isBackwardsCompat.top()), (yyloc), parseInfo);
    58075800    }
     
    58105803  case 234:
    58115804/* Line 1269 of yacc.c.  */
    5812 #line 3038 "querytransformparser.ypp"
     5805#line 3092 "querytransformparser.ypp"
    58135806    {(yyval.enums.valueOperator) = AtomicComparator::OperatorEqual;}
    58145807    break;
     
    58165809  case 235:
    58175810/* Line 1269 of yacc.c.  */
    5818 #line 3039 "querytransformparser.ypp"
     5811#line 3093 "querytransformparser.ypp"
    58195812    {(yyval.enums.valueOperator) = AtomicComparator::OperatorNotEqual;}
    58205813    break;
     
    58225815  case 236:
    58235816/* Line 1269 of yacc.c.  */
    5824 #line 3040 "querytransformparser.ypp"
     5817#line 3094 "querytransformparser.ypp"
    58255818    {(yyval.enums.valueOperator) = AtomicComparator::OperatorGreaterOrEqual;}
    58265819    break;
     
    58285821  case 237:
    58295822/* Line 1269 of yacc.c.  */
    5830 #line 3041 "querytransformparser.ypp"
     5823#line 3095 "querytransformparser.ypp"
    58315824    {(yyval.enums.valueOperator) = AtomicComparator::OperatorGreaterThan;}
    58325825    break;
     
    58345827  case 238:
    58355828/* Line 1269 of yacc.c.  */
    5836 #line 3042 "querytransformparser.ypp"
     5829#line 3096 "querytransformparser.ypp"
    58375830    {(yyval.enums.valueOperator) = AtomicComparator::OperatorLessOrEqual;}
    58385831    break;
     
    58405833  case 239:
    58415834/* Line 1269 of yacc.c.  */
    5842 #line 3043 "querytransformparser.ypp"
     5835#line 3097 "querytransformparser.ypp"
    58435836    {(yyval.enums.valueOperator) = AtomicComparator::OperatorLessThan;}
    58445837    break;
     
    58465839  case 240:
    58475840/* Line 1269 of yacc.c.  */
    5848 #line 3046 "querytransformparser.ypp"
     5841#line 3100 "querytransformparser.ypp"
    58495842    {
    58505843        (yyval.expr) = create(new ValueComparison((yyvsp[(1) - (3)].expr), (yyvsp[(2) - (3)].enums.valueOperator), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
     
    58545847  case 241:
    58555848/* Line 1269 of yacc.c.  */
    5856 #line 3050 "querytransformparser.ypp"
     5849#line 3104 "querytransformparser.ypp"
    58575850    {(yyval.enums.valueOperator) = AtomicComparator::OperatorEqual;}
    58585851    break;
     
    58605853  case 242:
    58615854/* Line 1269 of yacc.c.  */
    5862 #line 3051 "querytransformparser.ypp"
     5855#line 3105 "querytransformparser.ypp"
    58635856    {(yyval.enums.valueOperator) = AtomicComparator::OperatorNotEqual;}
    58645857    break;
     
    58665859  case 243:
    58675860/* Line 1269 of yacc.c.  */
    5868 #line 3052 "querytransformparser.ypp"
     5861#line 3106 "querytransformparser.ypp"
    58695862    {(yyval.enums.valueOperator) = AtomicComparator::OperatorGreaterOrEqual;}
    58705863    break;
     
    58725865  case 244:
    58735866/* Line 1269 of yacc.c.  */
    5874 #line 3053 "querytransformparser.ypp"
     5867#line 3107 "querytransformparser.ypp"
    58755868    {(yyval.enums.valueOperator) = AtomicComparator::OperatorGreaterThan;}
    58765869    break;
     
    58785871  case 245:
    58795872/* Line 1269 of yacc.c.  */
    5880 #line 3054 "querytransformparser.ypp"
     5873#line 3108 "querytransformparser.ypp"
    58815874    {(yyval.enums.valueOperator) = AtomicComparator::OperatorLessOrEqual;}
    58825875    break;
     
    58845877  case 246:
    58855878/* Line 1269 of yacc.c.  */
    5886 #line 3055 "querytransformparser.ypp"
     5879#line 3109 "querytransformparser.ypp"
    58875880    {(yyval.enums.valueOperator) = AtomicComparator::OperatorLessThan;}
    58885881    break;
     
    58905883  case 247:
    58915884/* Line 1269 of yacc.c.  */
    5892 #line 3058 "querytransformparser.ypp"
     5885#line 3112 "querytransformparser.ypp"
    58935886    {
    58945887        (yyval.expr) = create(new NodeComparison((yyvsp[(1) - (3)].expr), (yyvsp[(2) - (3)].enums.nodeOperator), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
     
    58985891  case 248:
    58995892/* Line 1269 of yacc.c.  */
    5900 #line 3062 "querytransformparser.ypp"
     5893#line 3116 "querytransformparser.ypp"
    59015894    {(yyval.enums.nodeOperator) = QXmlNodeModelIndex::Is;}
    59025895    break;
     
    59045897  case 249:
    59055898/* Line 1269 of yacc.c.  */
    5906 #line 3063 "querytransformparser.ypp"
     5899#line 3117 "querytransformparser.ypp"
    59075900    {(yyval.enums.nodeOperator) = QXmlNodeModelIndex::Precedes;}
    59085901    break;
     
    59105903  case 250:
    59115904/* Line 1269 of yacc.c.  */
    5912 #line 3064 "querytransformparser.ypp"
     5905#line 3118 "querytransformparser.ypp"
    59135906    {(yyval.enums.nodeOperator) = QXmlNodeModelIndex::Follows;}
    59145907    break;
     
    59165909  case 251:
    59175910/* Line 1269 of yacc.c.  */
    5918 #line 3067 "querytransformparser.ypp"
    5919     {
    5920         disallowedConstruct(parseInfo, (yyloc));
     5911#line 3121 "querytransformparser.ypp"
     5912    {
     5913        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    59215914        parseInfo->staticContext->error(QtXmlPatterns::tr("The Schema Validation Feature is not supported. "
    59225915                                                          "Hence, %1-expressions may not be used.")
     
    59315924  case 252:
    59325925/* Line 1269 of yacc.c.  */
    5933 #line 3080 "querytransformparser.ypp"
     5926#line 3134 "querytransformparser.ypp"
    59345927    {(yyval.enums.validationMode) = Validate::Strict;}
    59355928    break;
     
    59375930  case 253:
    59385931/* Line 1269 of yacc.c.  */
    5939 #line 3081 "querytransformparser.ypp"
     5932#line 3135 "querytransformparser.ypp"
    59405933    {(yyval.enums.validationMode) = Validate::Strict;}
    59415934    break;
     
    59435936  case 254:
    59445937/* Line 1269 of yacc.c.  */
    5945 #line 3082 "querytransformparser.ypp"
     5938#line 3136 "querytransformparser.ypp"
    59465939    {(yyval.enums.validationMode) = Validate::Lax;}
    59475940    break;
     
    59495942  case 255:
    59505943/* Line 1269 of yacc.c.  */
    5951 #line 3085 "querytransformparser.ypp"
    5952     {
     5944#line 3139 "querytransformparser.ypp"
     5945    {
     5946        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    59535947        /* We don't support any pragmas, so we only do the
    59545948         * necessary validation and use the fallback expression. */
     
    59685962  case 256:
    59695963/* Line 1269 of yacc.c.  */
    5970 #line 3101 "querytransformparser.ypp"
     5964#line 3156 "querytransformparser.ypp"
    59715965    {
    59725966        (yyval.expr).reset();
     
    59765970  case 257:
    59775971/* Line 1269 of yacc.c.  */
    5978 #line 3105 "querytransformparser.ypp"
     5972#line 3160 "querytransformparser.ypp"
    59795973    {
    59805974        (yyval.expr) = (yyvsp[(2) - (3)].expr);
     
    59845978  case 260:
    59855979/* Line 1269 of yacc.c.  */
    5986 #line 3113 "querytransformparser.ypp"
    5987     {
    5988         disallowedConstruct(parseInfo, (yyloc));
     5980#line 3168 "querytransformparser.ypp"
     5981    {
     5982        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    59895983    }
    59905984    break;
     
    59925986  case 263:
    59935987/* Line 1269 of yacc.c.  */
    5994 #line 3121 "querytransformparser.ypp"
     5988#line 3176 "querytransformparser.ypp"
    59955989    {
    59965990        /* This is "/step". That is, fn:root(self::node()) treat as document-node()/RelativePathExpr. */
     
    60015995  case 264:
    60025996/* Line 1269 of yacc.c.  */
    6003 #line 3127 "querytransformparser.ypp"
     5997#line 3182 "querytransformparser.ypp"
    60045998    {
    60055999        (yyval.expr) = createSlashSlashPath(createRootExpression(parseInfo, (yyloc)), (yyvsp[(2) - (2)].expr), (yyloc), parseInfo);
     
    60096003  case 265:
    60106004/* Line 1269 of yacc.c.  */
    6011 #line 3131 "querytransformparser.ypp"
     6005#line 3186 "querytransformparser.ypp"
    60126006    {
    60136007        /* This is "/". That is, fn:root(self::node()) treat as document-node(). */
     
    60186012  case 268:
    60196013/* Line 1269 of yacc.c.  */
    6020 #line 3141 "querytransformparser.ypp"
     6014#line 3196 "querytransformparser.ypp"
    60216015    {
    60226016        (yyval.expr) = create(new Path((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yyvsp[(2) - (3)].enums.pathKind)), (yyloc), parseInfo);
     
    60266020  case 269:
    60276021/* Line 1269 of yacc.c.  */
    6028 #line 3145 "querytransformparser.ypp"
     6022#line 3200 "querytransformparser.ypp"
    60296023    {
    60306024        const Expression::Ptr orderBy(createReturnOrderBy((yyvsp[(4) - (7)].orderSpecs), (yyvsp[(6) - (7)].expr), parseInfo->orderStability.pop(), (yyloc), parseInfo));
     
    60396033  case 270:
    60406034/* Line 1269 of yacc.c.  */
    6041 #line 3154 "querytransformparser.ypp"
     6035#line 3209 "querytransformparser.ypp"
    60426036    {
    60436037        (yyval.expr) = createSlashSlashPath((yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yyloc), parseInfo);
     
    60476041  case 271:
    60486042/* Line 1269 of yacc.c.  */
    6049 #line 3159 "querytransformparser.ypp"
     6043#line 3214 "querytransformparser.ypp"
    60506044    {
    60516045        (yyval.expr) = NodeSortExpression::wrapAround((yyvsp[(1) - (1)].expr), parseInfo->staticContext);
     
    60556049  case 273:
    60566050/* Line 1269 of yacc.c.  */
    6057 #line 3164 "querytransformparser.ypp"
     6051#line 3219 "querytransformparser.ypp"
    60586052    {
    60596053        (yyval.expr) = create(new CurrentItemStore((yyvsp[(2) - (2)].expr)), (yyloc), parseInfo);
     
    60636057  case 274:
    60646058/* Line 1269 of yacc.c.  */
    6065 #line 3168 "querytransformparser.ypp"
     6059#line 3223 "querytransformparser.ypp"
    60666060    {
    60676061        const xsDouble version = (yyvsp[(1) - (1)].sval).toDouble();
     
    60756069  case 275:
    60766070/* Line 1269 of yacc.c.  */
    6077 #line 3176 "querytransformparser.ypp"
     6071#line 3231 "querytransformparser.ypp"
    60786072    {
    60796073        if((yyvsp[(2) - (3)].enums.Double) < 2)
     
    60866080  case 276:
    60876081/* Line 1269 of yacc.c.  */
    6088 #line 3183 "querytransformparser.ypp"
    6089     {
     6082#line 3238 "querytransformparser.ypp"
     6083    {
     6084    allowedIn(QXmlQuery::XSLT20, parseInfo, (yyloc));
    60906085    Q_ASSERT(!(yyvsp[(2) - (5)].sval).isEmpty());
    60916086    (yyval.expr) = create(new StaticBaseURIStore((yyvsp[(2) - (5)].sval), (yyvsp[(4) - (5)].expr)), (yyloc), parseInfo);
     
    60956090  case 277:
    60966091/* Line 1269 of yacc.c.  */
    6097 #line 3189 "querytransformparser.ypp"
    6098     {
     6092#line 3245 "querytransformparser.ypp"
     6093    {
     6094        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20), parseInfo, (yyloc));
    60996095        parseInfo->resolvers.push(parseInfo->staticContext->namespaceBindings());
    61006096        const NamespaceResolver::Ptr resolver(new DelegatingNamespaceResolver(parseInfo->staticContext->namespaceBindings()));
     
    61086104  case 278:
    61096105/* Line 1269 of yacc.c.  */
    6110 #line 3199 "querytransformparser.ypp"
     6106#line 3256 "querytransformparser.ypp"
    61116107    {
    61126108        parseInfo->staticContext->setNamespaceBindings(parseInfo->resolvers.pop());
     
    61176113  case 279:
    61186114/* Line 1269 of yacc.c.  */
    6119 #line 3204 "querytransformparser.ypp"
     6115#line 3261 "querytransformparser.ypp"
    61206116    {
    61216117        (yyval.expr) = create(new CallTemplate((yyvsp[(2) - (5)].qName), parseInfo->templateWithParams), (yyloc), parseInfo);
     
    61276123  case 280:
    61286124/* Line 1269 of yacc.c.  */
    6129 #line 3211 "querytransformparser.ypp"
     6125#line 3268 "querytransformparser.ypp"
    61306126    {
    61316127        parseInfo->startParsingWithParam();
     
    61356131  case 281:
    61366132/* Line 1269 of yacc.c.  */
    6137 #line 3215 "querytransformparser.ypp"
     6133#line 3272 "querytransformparser.ypp"
    61386134    {
    61396135        parseInfo->endParsingWithParam();
     
    61436139  case 282:
    61446140/* Line 1269 of yacc.c.  */
    6145 #line 3220 "querytransformparser.ypp"
     6141#line 3277 "querytransformparser.ypp"
    61466142    {
    61476143    }
     
    61506146  case 283:
    61516147/* Line 1269 of yacc.c.  */
    6152 #line 3223 "querytransformparser.ypp"
     6148#line 3280 "querytransformparser.ypp"
    61536149    {
    61546150    }
     
    61576153  case 284:
    61586154/* Line 1269 of yacc.c.  */
    6159 #line 3226 "querytransformparser.ypp"
     6155#line 3283 "querytransformparser.ypp"
    61606156    {
    61616157    }
     
    61646160  case 285:
    61656161/* Line 1269 of yacc.c.  */
    6166 #line 3230 "querytransformparser.ypp"
     6162#line 3287 "querytransformparser.ypp"
    61676163    {
    61686164    }
     
    61716167  case 286:
    61726168/* Line 1269 of yacc.c.  */
    6173 #line 3233 "querytransformparser.ypp"
     6169#line 3290 "querytransformparser.ypp"
    61746170    {
    61756171    }
     
    61786174  case 287:
    61796175/* Line 1269 of yacc.c.  */
    6180 #line 3237 "querytransformparser.ypp"
     6176#line 3294 "querytransformparser.ypp"
    61816177    {
    61826178        /* Note, this grammar rule is invoked for @c xsl:param @em and @c
     
    62466242  case 288:
    62476243/* Line 1269 of yacc.c.  */
    6248 #line 3302 "querytransformparser.ypp"
     6244#line 3359 "querytransformparser.ypp"
    62496245    {
    62506246        (yyval.enums.Bool) = false;
     
    62546250  case 289:
    62556251/* Line 1269 of yacc.c.  */
    6256 #line 3306 "querytransformparser.ypp"
     6252#line 3363 "querytransformparser.ypp"
    62576253    {
    62586254        (yyval.enums.Bool) = true;
     
    62626258  case 290:
    62636259/* Line 1269 of yacc.c.  */
    6264 #line 3311 "querytransformparser.ypp"
     6260#line 3368 "querytransformparser.ypp"
    62656261    {
    62666262        (yyval.expr) = Expression::Ptr();
     
    62706266  case 291:
    62716267/* Line 1269 of yacc.c.  */
    6272 #line 3315 "querytransformparser.ypp"
     6268#line 3372 "querytransformparser.ypp"
    62736269    {
    62746270        (yyval.expr) = (yyvsp[(2) - (2)].expr);
     
    62786274  case 292:
    62796275/* Line 1269 of yacc.c.  */
    6280 #line 3324 "querytransformparser.ypp"
     6276#line 3381 "querytransformparser.ypp"
    62816277    {
    62826278        (yyval.enums.pathKind) = Path::RegularPath;
     
    62866282  case 293:
    62876283/* Line 1269 of yacc.c.  */
    6288 #line 3328 "querytransformparser.ypp"
     6284#line 3385 "querytransformparser.ypp"
    62896285    {
    62906286        (yyval.enums.pathKind) = Path::XSLTForEach;
     
    62946290  case 294:
    62956291/* Line 1269 of yacc.c.  */
    6296 #line 3332 "querytransformparser.ypp"
     6292#line 3389 "querytransformparser.ypp"
    62976293    {
    62986294        (yyval.enums.pathKind) = Path::ForApplyTemplate;
     
    63026298  case 296:
    63036299/* Line 1269 of yacc.c.  */
    6304 #line 3338 "querytransformparser.ypp"
     6300#line 3395 "querytransformparser.ypp"
    63056301    {
    63066302        (yyval.expr) = create(GenericPredicate::create((yyvsp[(1) - (4)].expr), (yyvsp[(3) - (4)].expr), parseInfo->staticContext, fromYYLTYPE((yyloc), parseInfo)), (yyloc), parseInfo);
     
    63106306  case 299:
    63116307/* Line 1269 of yacc.c.  */
    6312 #line 3346 "querytransformparser.ypp"
     6308#line 3403 "querytransformparser.ypp"
    63136309    {
    63146310                if((yyvsp[(1) - (1)].enums.axis) == QXmlNodeModelIndex::AxisAttribute)
     
    63196315  case 300:
    63206316/* Line 1269 of yacc.c.  */
    6321 #line 3351 "querytransformparser.ypp"
     6317#line 3408 "querytransformparser.ypp"
    63226318    {
    63236319        if((yyvsp[(3) - (3)].itemType))
     
    63486344  case 304:
    63496345/* Line 1269 of yacc.c.  */
    6350 #line 3381 "querytransformparser.ypp"
     6346#line 3438 "querytransformparser.ypp"
    63516347    {
    63526348        if((yyvsp[(1) - (2)].enums.axis) == QXmlNodeModelIndex::AxisNamespace)
     
    63606356        else
    63616357            (yyval.enums.axis) = (yyvsp[(1) - (2)].enums.axis);
     6358
     6359        switch((yyvsp[(1) - (2)].enums.axis))
     6360        {
     6361            case QXmlNodeModelIndex::AxisAttribute:
     6362            {
     6363                allowedIn(QueryLanguages(  QXmlQuery::XPath20
     6364                                         | QXmlQuery::XQuery10
     6365                                         | QXmlQuery::XmlSchema11IdentityConstraintField
     6366                                         | QXmlQuery::XSLT20),
     6367                          parseInfo, (yyloc));
     6368                break;
     6369            }
     6370            case QXmlNodeModelIndex::AxisChild:
     6371            {
     6372                allowedIn(QueryLanguages(  QXmlQuery::XPath20
     6373                                         | QXmlQuery::XQuery10
     6374                                         | QXmlQuery::XmlSchema11IdentityConstraintField
     6375                                         | QXmlQuery::XmlSchema11IdentityConstraintSelector
     6376                                         | QXmlQuery::XSLT20),
     6377                          parseInfo, (yyloc));
     6378                break;
     6379            }
     6380            default:
     6381            {
     6382                allowedIn(QueryLanguages(  QXmlQuery::XPath20
     6383                                         | QXmlQuery::XQuery10
     6384                                         | QXmlQuery::XSLT20),
     6385                          parseInfo, (yyloc));
     6386            }
     6387        }
    63626388    }
    63636389    break;
     
    63656391  case 305:
    63666392/* Line 1269 of yacc.c.  */
    6367 #line 3394 "querytransformparser.ypp"
     6393#line 3481 "querytransformparser.ypp"
    63686394    {(yyval.enums.axis) = QXmlNodeModelIndex::AxisAncestorOrSelf  ;}
    63696395    break;
     
    63716397  case 306:
    63726398/* Line 1269 of yacc.c.  */
    6373 #line 3395 "querytransformparser.ypp"
     6399#line 3482 "querytransformparser.ypp"
    63746400    {(yyval.enums.axis) = QXmlNodeModelIndex::AxisAncestor        ;}
    63756401    break;
     
    63776403  case 307:
    63786404/* Line 1269 of yacc.c.  */
    6379 #line 3396 "querytransformparser.ypp"
     6405#line 3483 "querytransformparser.ypp"
    63806406    {(yyval.enums.axis) = QXmlNodeModelIndex::AxisAttribute       ;}
    63816407    break;
     
    63836409  case 308:
    63846410/* Line 1269 of yacc.c.  */
    6385 #line 3397 "querytransformparser.ypp"
     6411#line 3484 "querytransformparser.ypp"
    63866412    {(yyval.enums.axis) = QXmlNodeModelIndex::AxisChild           ;}
    63876413    break;
     
    63896415  case 309:
    63906416/* Line 1269 of yacc.c.  */
    6391 #line 3398 "querytransformparser.ypp"
     6417#line 3485 "querytransformparser.ypp"
    63926418    {(yyval.enums.axis) = QXmlNodeModelIndex::AxisDescendantOrSelf;}
    63936419    break;
     
    63956421  case 310:
    63966422/* Line 1269 of yacc.c.  */
    6397 #line 3399 "querytransformparser.ypp"
     6423#line 3486 "querytransformparser.ypp"
    63986424    {(yyval.enums.axis) = QXmlNodeModelIndex::AxisDescendant      ;}
    63996425    break;
     
    64016427  case 311:
    64026428/* Line 1269 of yacc.c.  */
    6403 #line 3400 "querytransformparser.ypp"
     6429#line 3487 "querytransformparser.ypp"
    64046430    {(yyval.enums.axis) = QXmlNodeModelIndex::AxisFollowing       ;}
    64056431    break;
     
    64076433  case 312:
    64086434/* Line 1269 of yacc.c.  */
    6409 #line 3401 "querytransformparser.ypp"
     6435#line 3488 "querytransformparser.ypp"
    64106436    {(yyval.enums.axis) = QXmlNodeModelIndex::AxisPreceding       ;}
    64116437    break;
     
    64136439  case 313:
    64146440/* Line 1269 of yacc.c.  */
    6415 #line 3402 "querytransformparser.ypp"
     6441#line 3489 "querytransformparser.ypp"
    64166442    {(yyval.enums.axis) = QXmlNodeModelIndex::AxisFollowingSibling;}
    64176443    break;
     
    64196445  case 314:
    64206446/* Line 1269 of yacc.c.  */
    6421 #line 3403 "querytransformparser.ypp"
     6447#line 3490 "querytransformparser.ypp"
    64226448    {(yyval.enums.axis) = QXmlNodeModelIndex::AxisPrecedingSibling;}
    64236449    break;
     
    64256451  case 315:
    64266452/* Line 1269 of yacc.c.  */
    6427 #line 3404 "querytransformparser.ypp"
     6453#line 3491 "querytransformparser.ypp"
    64286454    {(yyval.enums.axis) = QXmlNodeModelIndex::AxisParent          ;}
    64296455    break;
     
    64316457  case 316:
    64326458/* Line 1269 of yacc.c.  */
    6433 #line 3405 "querytransformparser.ypp"
     6459#line 3492 "querytransformparser.ypp"
    64346460    {(yyval.enums.axis) = QXmlNodeModelIndex::AxisSelf            ;}
    64356461    break;
     
    64376463  case 317:
    64386464/* Line 1269 of yacc.c.  */
    6439 #line 3408 "querytransformparser.ypp"
     6465#line 3495 "querytransformparser.ypp"
    64406466    {
    64416467                        parseInfo->nodeTestSource = BuiltinTypes::attribute;
     
    64456471  case 318:
    64466472/* Line 1269 of yacc.c.  */
    6447 #line 3412 "querytransformparser.ypp"
    6448     {
     6473#line 3499 "querytransformparser.ypp"
     6474    {
     6475        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20 | QXmlQuery::XmlSchema11IdentityConstraintField), parseInfo, (yyloc));
    64496476        (yyval.expr) = create(new AxisStep(QXmlNodeModelIndex::AxisAttribute, (yyvsp[(3) - (3)].itemType)), (yyloc), parseInfo);
    64506477
     
    64556482  case 319:
    64566483/* Line 1269 of yacc.c.  */
    6457 #line 3418 "querytransformparser.ypp"
     6484#line 3506 "querytransformparser.ypp"
    64586485    {
    64596486        ItemType::Ptr nodeTest;
     
    64706497  case 320:
    64716498/* Line 1269 of yacc.c.  */
    6472 #line 3429 "querytransformparser.ypp"
     6499#line 3517 "querytransformparser.ypp"
    64736500    {
    64746501        (yyval.expr) = create(new AxisStep(QXmlNodeModelIndex::AxisAttribute, (yyvsp[(1) - (1)].itemType)), (yyloc), parseInfo);
     
    64786505  case 322:
    64796506/* Line 1269 of yacc.c.  */
    6480 #line 3436 "querytransformparser.ypp"
     6507#line 3524 "querytransformparser.ypp"
    64816508    {
    64826509        (yyval.expr) = create(new AxisStep(QXmlNodeModelIndex::AxisParent, BuiltinTypes::node), (yyloc), parseInfo);
     
    64846511    break;
    64856512
     6513  case 324:
     6514/* Line 1269 of yacc.c.  */
     6515#line 3530 "querytransformparser.ypp"
     6516    {
     6517        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
     6518    }
     6519    break;
     6520
    64866521  case 325:
    64876522/* Line 1269 of yacc.c.  */
    6488 #line 3444 "querytransformparser.ypp"
     6523#line 3535 "querytransformparser.ypp"
    64896524    {
    64906525        (yyval.itemType) = QNameTest::create(parseInfo->nodeTestSource, (yyvsp[(1) - (1)].qName));
     
    64946529  case 327:
    64956530/* Line 1269 of yacc.c.  */
    6496 #line 3450 "querytransformparser.ypp"
     6531#line 3541 "querytransformparser.ypp"
    64976532    {
    64986533        (yyval.itemType) = parseInfo->nodeTestSource;
     
    65026537  case 328:
    65036538/* Line 1269 of yacc.c.  */
    6504 #line 3454 "querytransformparser.ypp"
     6539#line 3545 "querytransformparser.ypp"
    65056540    {
    65066541        const NamePool::Ptr np(parseInfo->staticContext->namePool());
     
    65156550  case 329:
    65166551/* Line 1269 of yacc.c.  */
    6517 #line 3463 "querytransformparser.ypp"
    6518     {
     6552#line 3554 "querytransformparser.ypp"
     6553    {
     6554        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    65196555        const QXmlName::LocalNameCode c = parseInfo->staticContext->namePool()->allocateLocalName((yyvsp[(1) - (1)].sval));
    65206556        (yyval.itemType) = LocalNameTest::create(parseInfo->nodeTestSource, c);
     
    65246560  case 331:
    65256561/* Line 1269 of yacc.c.  */
    6526 #line 3470 "querytransformparser.ypp"
    6527     {
     6562#line 3562 "querytransformparser.ypp"
     6563    {
     6564        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    65286565        (yyval.expr) = create(GenericPredicate::create((yyvsp[(1) - (4)].expr), (yyvsp[(3) - (4)].expr), parseInfo->staticContext, fromYYLTYPE((yylsp[(4) - (4)]), parseInfo)), (yyloc), parseInfo);
    65296566    }
     
    65326569  case 339:
    65336570/* Line 1269 of yacc.c.  */
    6534 #line 3482 "querytransformparser.ypp"
     6571#line 3575 "querytransformparser.ypp"
    65356572    {
    65366573        (yyval.expr) = create(new ApplyTemplate(parseInfo->modeFor((yyvsp[(2) - (5)].qName)),
     
    65456582  case 341:
    65466583/* Line 1269 of yacc.c.  */
    6547 #line 3493 "querytransformparser.ypp"
     6584#line 3586 "querytransformparser.ypp"
    65486585    {
    65496586        (yyval.expr) = create(new Literal(AtomicString::fromValue((yyvsp[(1) - (1)].sval))), (yyloc), parseInfo);
     
    65536590  case 342:
    65546591/* Line 1269 of yacc.c.  */
    6555 #line 3498 "querytransformparser.ypp"
    6556     {
     6592#line 3591 "querytransformparser.ypp"
     6593    {
     6594        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    65576595        (yyval.expr) = createNumericLiteral<Double>((yyvsp[(1) - (1)].sval), (yyloc), parseInfo);
    65586596    }
     
    65616599  case 343:
    65626600/* Line 1269 of yacc.c.  */
    6563 #line 3502 "querytransformparser.ypp"
    6564     {
     6601#line 3596 "querytransformparser.ypp"
     6602    {
     6603        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    65656604        (yyval.expr) = createNumericLiteral<Numeric>((yyvsp[(1) - (1)].sval), (yyloc), parseInfo);
    65666605    }
     
    65696608  case 344:
    65706609/* Line 1269 of yacc.c.  */
    6571 #line 3507 "querytransformparser.ypp"
    6572     {
     6610#line 3602 "querytransformparser.ypp"
     6611    {
     6612        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    65736613        (yyval.expr) = resolveVariable((yyvsp[(2) - (2)].qName), (yyloc), parseInfo, false);
    65746614    }
     
    65776617  case 345:
    65786618/* Line 1269 of yacc.c.  */
    6579 #line 3512 "querytransformparser.ypp"
     6619#line 3608 "querytransformparser.ypp"
    65806620    {
    65816621        /* See: http://www.w3.org/TR/xpath20/#id-variables */
     
    65866626  case 346:
    65876627/* Line 1269 of yacc.c.  */
    6588 #line 3517 "querytransformparser.ypp"
     6628#line 3613 "querytransformparser.ypp"
    65896629    {
    65906630        (yyval.qName) = (yyvsp[(1) - (1)].qName);
     
    65946634  case 347:
    65956635/* Line 1269 of yacc.c.  */
    6596 #line 3522 "querytransformparser.ypp"
    6597     {
     6636#line 3618 "querytransformparser.ypp"
     6637    {
     6638        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    65986639        (yyval.expr) = (yyvsp[(2) - (3)].expr);
    65996640    }
     
    66026643  case 348:
    66036644/* Line 1269 of yacc.c.  */
    6604 #line 3526 "querytransformparser.ypp"
    6605     {
     6645#line 3623 "querytransformparser.ypp"
     6646    {
     6647        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    66066648        (yyval.expr) = create(new EmptySequence, (yyloc), parseInfo);
    66076649    }
     
    66106652  case 349:
    66116653/* Line 1269 of yacc.c.  */
    6612 #line 3531 "querytransformparser.ypp"
     6654#line 3629 "querytransformparser.ypp"
    66136655    {
    66146656        (yyval.expr) = create(new ContextItem(), (yyloc), parseInfo);
     
    66186660  case 350:
    66196661/* Line 1269 of yacc.c.  */
    6620 #line 3536 "querytransformparser.ypp"
     6662#line 3634 "querytransformparser.ypp"
    66216663    {
    66226664        (yyval.expr) = (yyvsp[(2) - (2)].expr);
     
    66266668  case 351:
    66276669/* Line 1269 of yacc.c.  */
    6628 #line 3541 "querytransformparser.ypp"
    6629     {
     6670#line 3639 "querytransformparser.ypp"
     6671    {
     6672        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
    66306673        if(XPathHelper::isReservedNamespace((yyvsp[(1) - (4)].qName).namespaceURI()) || (yyvsp[(1) - (4)].qName).namespaceURI() == StandardNamespaces::InternalXSLT)
    66316674        { /* We got a call to a builtin function. */
     
    66406683            else
    66416684            {
    6642                 parseInfo->staticContext->error(QtXmlPatterns::tr("No function by name %1 is available.")
     6685                parseInfo->staticContext->error(QtXmlPatterns::tr("No function with name %1 is available.")
    66436686                                                   .arg(formatKeyword(parseInfo->staticContext->namePool(), (yyvsp[(1) - (4)].qName))),
    66446687                                                ReportContext::XPST0017, fromYYLTYPE((yyloc), parseInfo));
     
    66576700  case 352:
    66586701/* Line 1269 of yacc.c.  */
    6659 #line 3569 "querytransformparser.ypp"
     6702#line 3668 "querytransformparser.ypp"
    66606703    {
    66616704        (yyval.expressionList) = Expression::List();
     
    66656708  case 353:
    66666709/* Line 1269 of yacc.c.  */
    6667 #line 3574 "querytransformparser.ypp"
     6710#line 3673 "querytransformparser.ypp"
    66686711    {
    66696712        Expression::List list;
     
    66756718  case 355:
    66766719/* Line 1269 of yacc.c.  */
    6677 #line 3583 "querytransformparser.ypp"
    6678     {
    6679         disallowedConstruct(parseInfo, (yyloc));
     6720#line 3682 "querytransformparser.ypp"
     6721    {
     6722        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc));
    66806723    }
    66816724    break;
     
    66836726  case 360:
    66846727/* Line 1269 of yacc.c.  */
    6685 #line 3624 "querytransformparser.ypp"
     6728#line 3726 "querytransformparser.ypp"
    66866729    {
    66876730                        (yyval.enums.tokenizerPosition) = parseInfo->tokenizer->commenceScanOnly();
     
    66926735  case 361:
    66936736/* Line 1269 of yacc.c.  */
    6694 #line 3633 "querytransformparser.ypp"
     6737#line 3735 "querytransformparser.ypp"
    66956738    {
    66966739                        ++parseInfo->elementConstructorDepth;
     
    68406883  case 362:
    68416884/* Line 1269 of yacc.c.  */
    6842 #line 3779 "querytransformparser.ypp"
     6885#line 3881 "querytransformparser.ypp"
    68436886    {
    68446887        /* We add the content constructor after the attribute constructors. This might result
     
    68906933                if(declaredAttributes.contains(att))
    68916934                {
    6892                     parseInfo->staticContext->error(QtXmlPatterns::tr("An attribute by name %1 has already appeared on this element.")
     6935                    parseInfo->staticContext->error(QtXmlPatterns::tr("An attribute with name %1 has already appeared on this element.")
    68936936                                                      .arg(formatKeyword(parseInfo->staticContext->namePool(), att)),
    68946937                                            ReportContext::XQST0040, fromYYLTYPE((yyloc), parseInfo));
     
    69396982  case 363:
    69406983/* Line 1269 of yacc.c.  */
    6941 #line 3875 "querytransformparser.ypp"
     6984#line 3977 "querytransformparser.ypp"
    69426985    {
    69436986        (yyval.expr) = create(new EmptySequence(), (yyloc), parseInfo);
     
    69476990  case 364:
    69486991/* Line 1269 of yacc.c.  */
    6949 #line 3879 "querytransformparser.ypp"
     6992#line 3981 "querytransformparser.ypp"
    69506993    {
    69516994        if(!(yyvsp[(4) - (5)].qName).isLexicallyEqual(parseInfo->tagStack.top()))
     
    69697012  case 365:
    69707013/* Line 1269 of yacc.c.  */
    6971 #line 3898 "querytransformparser.ypp"
     7014#line 4000 "querytransformparser.ypp"
    69727015    {
    69737016        (yyval.attributeHolders) = AttributeHolderVector();
     
    69777020  case 366:
    69787021/* Line 1269 of yacc.c.  */
    6979 #line 3902 "querytransformparser.ypp"
     7022#line 4004 "querytransformparser.ypp"
    69807023    {
    69817024        (yyvsp[(1) - (2)].attributeHolders).append((yyvsp[(2) - (2)].attributeHolder));
     
    69867029  case 367:
    69877030/* Line 1269 of yacc.c.  */
    6988 #line 3908 "querytransformparser.ypp"
     7031#line 4010 "querytransformparser.ypp"
    69897032    {
    69907033        (yyval.attributeHolder) = qMakePair((yyvsp[(1) - (3)].sval), (yyvsp[(3) - (3)].expr));
     
    69947037  case 368:
    69957038/* Line 1269 of yacc.c.  */
    6996 #line 3913 "querytransformparser.ypp"
     7039#line 4015 "querytransformparser.ypp"
    69977040    {
    69987041        (yyval.expr) = createDirAttributeValue((yyvsp[(2) - (3)].expressionList), parseInfo, (yyloc));
     
    70027045  case 369:
    70037046/* Line 1269 of yacc.c.  */
    7004 #line 3918 "querytransformparser.ypp"
     7047#line 4020 "querytransformparser.ypp"
    70057048    {
    70067049        (yyval.expr) = createDirAttributeValue((yyvsp[(2) - (3)].expressionList), parseInfo, (yyloc));
     
    70107053  case 370:
    70117054/* Line 1269 of yacc.c.  */
    7012 #line 3923 "querytransformparser.ypp"
     7055#line 4025 "querytransformparser.ypp"
    70137056    {
    70147057        (yyval.expressionList) = Expression::List();
     
    70187061  case 371:
    70197062/* Line 1269 of yacc.c.  */
    7020 #line 3927 "querytransformparser.ypp"
     7063#line 4029 "querytransformparser.ypp"
    70217064    {
    70227065        Expression::Ptr content((yyvsp[(1) - (2)].expr));
     
    70327075  case 372:
    70337076/* Line 1269 of yacc.c.  */
    7034 #line 3937 "querytransformparser.ypp"
     7077#line 4039 "querytransformparser.ypp"
    70357078    {
    70367079        (yyvsp[(2) - (2)].expressionList).prepend(create(new Literal(AtomicString::fromValue((yyvsp[(1) - (2)].sval))), (yyloc), parseInfo));
     
    70417084  case 373:
    70427085/* Line 1269 of yacc.c.  */
    7043 #line 3943 "querytransformparser.ypp"
     7086#line 4045 "querytransformparser.ypp"
    70447087    {
    70457088        (yyval.expressionList) = Expression::List();
     
    70507093  case 374:
    70517094/* Line 1269 of yacc.c.  */
    7052 #line 3948 "querytransformparser.ypp"
     7095#line 4050 "querytransformparser.ypp"
    70537096    {
    70547097        (yyvsp[(1) - (2)].expressionList).append((yyvsp[(2) - (2)].expr));
     
    70607103  case 375:
    70617104/* Line 1269 of yacc.c.  */
    7062 #line 3954 "querytransformparser.ypp"
     7105#line 4056 "querytransformparser.ypp"
    70637106    {
    70647107        if(parseInfo->staticContext->boundarySpacePolicy() == StaticContext::BSPStrip &&
     
    70787121  case 376:
    70797122/* Line 1269 of yacc.c.  */
    7080 #line 3968 "querytransformparser.ypp"
     7123#line 4070 "querytransformparser.ypp"
    70817124    {
    70827125        (yyvsp[(1) - (2)].expressionList).append(create(new TextNodeConstructor(create(new Literal(AtomicString::fromValue((yyvsp[(2) - (2)].sval))), (yyloc), parseInfo)), (yyloc), parseInfo));
     
    70887131  case 377:
    70897132/* Line 1269 of yacc.c.  */
    7090 #line 3974 "querytransformparser.ypp"
     7133#line 4076 "querytransformparser.ypp"
    70917134    {
    70927135        /* We insert a text node constructor that send an empty text node between
     
    71087151  case 378:
    71097152/* Line 1269 of yacc.c.  */
    7110 #line 3991 "querytransformparser.ypp"
     7153#line 4093 "querytransformparser.ypp"
    71117154    {
    71127155        (yyval.expr) = create(new CommentConstructor(create(new Literal(AtomicString::fromValue((yyvsp[(2) - (2)].sval))), (yyloc), parseInfo)), (yyloc), parseInfo);
     
    71167159  case 379:
    71177160/* Line 1269 of yacc.c.  */
    7118 #line 3996 "querytransformparser.ypp"
     7161#line 4098 "querytransformparser.ypp"
    71197162    {
    71207163        const ReflectYYLTYPE ryy((yyloc), parseInfo);
     
    71327175  case 387:
    71337176/* Line 1269 of yacc.c.  */
    7134 #line 4017 "querytransformparser.ypp"
    7135     {
    7136         disallowedConstruct(parseInfo, (yyloc), (yyvsp[(2) - (3)].enums.Bool));
     7177#line 4119 "querytransformparser.ypp"
     7178    {
     7179        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(2) - (3)].enums.Bool));
    71377180
    71387181        (yyval.expr) = create(new DocumentConstructor((yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
     
    71427185  case 388:
    71437186/* Line 1269 of yacc.c.  */
    7144 #line 4024 "querytransformparser.ypp"
     7187#line 4126 "querytransformparser.ypp"
    71457188    {
    71467189                        /* This value is incremented before the action below is executed. */
     
    71517194  case 389:
    71527195/* Line 1269 of yacc.c.  */
    7153 #line 4029 "querytransformparser.ypp"
     7196#line 4131 "querytransformparser.ypp"
    71547197    {
    71557198        Q_ASSERT(5);
    7156         disallowedConstruct(parseInfo, (yyloc), (yyvsp[(2) - (5)].enums.Bool));
     7199        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(2) - (5)].enums.Bool));
    71577200
    71587201        Expression::Ptr effExpr;
     
    71887231  case 390:
    71897232/* Line 1269 of yacc.c.  */
    7190 #line 4063 "querytransformparser.ypp"
     7233#line 4165 "querytransformparser.ypp"
    71917234    {
    71927235        (yyval.enums.Bool) = false;
     
    71967239  case 391:
    71977240/* Line 1269 of yacc.c.  */
    7198 #line 4067 "querytransformparser.ypp"
     7241#line 4169 "querytransformparser.ypp"
    71997242    {
    72007243        (yyval.enums.Bool) = true;
     
    72047247  case 392:
    72057248/* Line 1269 of yacc.c.  */
    7206 #line 4075 "querytransformparser.ypp"
    7207     {
    7208         disallowedConstruct(parseInfo, (yyloc), (yyvsp[(2) - (4)].enums.Bool));
     7249#line 4177 "querytransformparser.ypp"
     7250    {
     7251        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(2) - (4)].enums.Bool));
    72097252
    72107253        const Expression::Ptr name(create(new AttributeNameValidator((yyvsp[(3) - (4)].expr)), (yyloc), parseInfo));
     
    72197262  case 393:
    72207263/* Line 1269 of yacc.c.  */
    7221 #line 4087 "querytransformparser.ypp"
     7264#line 4189 "querytransformparser.ypp"
    72227265    {
    72237266        (yyval.expr) = create(new TextNodeConstructor(createSimpleContent((yyvsp[(3) - (3)].expr), (yyloc), parseInfo)), (yyloc), parseInfo);
     
    72277270  case 394:
    72287271/* Line 1269 of yacc.c.  */
    7229 #line 4092 "querytransformparser.ypp"
    7230     {
    7231         disallowedConstruct(parseInfo, (yyloc), (yyvsp[(2) - (3)].enums.Bool));
     7272#line 4194 "querytransformparser.ypp"
     7273    {
     7274        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(2) - (3)].enums.Bool));
    72327275
    72337276        (yyval.expr) = create(new CommentConstructor(createSimpleContent((yyvsp[(3) - (3)].expr), (yyloc), parseInfo)), (yyloc), parseInfo);
     
    72377280  case 395:
    72387281/* Line 1269 of yacc.c.  */
    7239 #line 4099 "querytransformparser.ypp"
    7240     {
    7241         disallowedConstruct(parseInfo, (yyloc), (yyvsp[(2) - (3)].expr));
     7282#line 4201 "querytransformparser.ypp"
     7283    {
     7284        allowedIn(QXmlQuery::XQuery10, parseInfo, (yyloc), (yyvsp[(2) - (3)].expr));
    72427285
    72437286        if((yyvsp[(3) - (3)].expr))
     
    72527295  case 396:
    72537296/* Line 1269 of yacc.c.  */
    7254 #line 4110 "querytransformparser.ypp"
     7297#line 4212 "querytransformparser.ypp"
    72557298    {
    72567299                        parseInfo->nodeTestSource = BuiltinTypes::attribute;
     
    72607303  case 397:
    72617304/* Line 1269 of yacc.c.  */
    7262 #line 4114 "querytransformparser.ypp"
     7305#line 4216 "querytransformparser.ypp"
    72637306    {
    72647307                        parseInfo->restoreNodeTestSource();
     
    72687311  case 398:
    72697312/* Line 1269 of yacc.c.  */
    7270 #line 4117 "querytransformparser.ypp"
     7313#line 4219 "querytransformparser.ypp"
    72717314    {
    72727315        (yyval.expr) = create(new Literal(toItem(QNameValue::fromValue(parseInfo->staticContext->namePool(), (yyvsp[(2) - (3)].qName)))), (yyloc), parseInfo);
     
    72767319  case 400:
    72777320/* Line 1269 of yacc.c.  */
    7278 #line 4123 "querytransformparser.ypp"
     7321#line 4225 "querytransformparser.ypp"
    72797322    {
    72807323        (yyval.expr) = create(new Literal(toItem(QNameValue::fromValue(parseInfo->staticContext->namePool(), (yyvsp[(1) - (1)].qName)))), (yyloc), parseInfo);
     
    72847327  case 402:
    72857328/* Line 1269 of yacc.c.  */
    7286 #line 4129 "querytransformparser.ypp"
     7329#line 4231 "querytransformparser.ypp"
    72877330    {
    72887331        if(BuiltinTypes::xsQName->xdtTypeMatches((yyvsp[(1) - (1)].expr)->staticType()->itemType()))
     
    72997342  case 403:
    73007343/* Line 1269 of yacc.c.  */
    7301 #line 4144 "querytransformparser.ypp"
     7344#line 4246 "querytransformparser.ypp"
    73027345    {
    73037346        (yyval.expr) = create(new NCNameConstructor(create(new Literal(AtomicString::fromValue((yyvsp[(1) - (1)].sval))), (yyloc), parseInfo)), (yyloc), parseInfo);
     
    73077350  case 404:
    73087351/* Line 1269 of yacc.c.  */
    7309 #line 4148 "querytransformparser.ypp"
     7352#line 4250 "querytransformparser.ypp"
    73107353    {
    73117354        (yyval.expr) = create(new NCNameConstructor((yyvsp[(1) - (1)].expr)), (yyloc), parseInfo);
     
    73157358  case 405:
    73167359/* Line 1269 of yacc.c.  */
    7317 #line 4157 "querytransformparser.ypp"
     7360#line 4259 "querytransformparser.ypp"
    73187361    {
    73197362    (yyval.expr) = create(new ComputedNamespaceConstructor((yyvsp[(2) - (3)].expr), (yyvsp[(3) - (3)].expr)), (yyloc), parseInfo);
     
    73237366  case 406:
    73247367/* Line 1269 of yacc.c.  */
    7325 #line 4162 "querytransformparser.ypp"
     7368#line 4264 "querytransformparser.ypp"
    73267369    {
    73277370        (yyval.sequenceType) = makeGenericSequenceType((yyvsp[(1) - (1)].itemType), Cardinality::exactlyOne());
     
    73317374  case 407:
    73327375/* Line 1269 of yacc.c.  */
    7333 #line 4166 "querytransformparser.ypp"
     7376#line 4268 "querytransformparser.ypp"
    73347377    {
    73357378        (yyval.sequenceType) = makeGenericSequenceType((yyvsp[(1) - (2)].itemType), Cardinality::zeroOrOne());
     
    73397382  case 408:
    73407383/* Line 1269 of yacc.c.  */
    7341 #line 4171 "querytransformparser.ypp"
     7384#line 4273 "querytransformparser.ypp"
    73427385    {
    73437386        (yyval.sequenceType) = CommonSequenceTypes::ZeroOrMoreItems;
     
    73477390  case 409:
    73487391/* Line 1269 of yacc.c.  */
    7349 #line 4175 "querytransformparser.ypp"
     7392#line 4277 "querytransformparser.ypp"
    73507393    {
    73517394        (yyval.sequenceType) = (yyvsp[(2) - (2)].sequenceType);
     
    73557398  case 410:
    73567399/* Line 1269 of yacc.c.  */
    7357 #line 4180 "querytransformparser.ypp"
     7400#line 4282 "querytransformparser.ypp"
    73587401    {
    73597402        (yyval.sequenceType) = makeGenericSequenceType((yyvsp[(1) - (2)].itemType), (yyvsp[(2) - (2)].cardinality));
     
    73637406  case 411:
    73647407/* Line 1269 of yacc.c.  */
    7365 #line 4185 "querytransformparser.ypp"
     7408#line 4287 "querytransformparser.ypp"
    73667409    {
    73677410        (yyval.sequenceType) = CommonSequenceTypes::Empty;
     
    73717414  case 412:
    73727415/* Line 1269 of yacc.c.  */
    7373 #line 4189 "querytransformparser.ypp"
     7416#line 4291 "querytransformparser.ypp"
    73747417    {(yyval.cardinality) = Cardinality::exactlyOne();}
    73757418    break;
     
    73777420  case 413:
    73787421/* Line 1269 of yacc.c.  */
    7379 #line 4190 "querytransformparser.ypp"
     7422#line 4292 "querytransformparser.ypp"
    73807423    {(yyval.cardinality) = Cardinality::oneOrMore();}
    73817424    break;
     
    73837426  case 414:
    73847427/* Line 1269 of yacc.c.  */
    7385 #line 4191 "querytransformparser.ypp"
     7428#line 4293 "querytransformparser.ypp"
    73867429    {(yyval.cardinality) = Cardinality::zeroOrMore();}
    73877430    break;
     
    73897432  case 415:
    73907433/* Line 1269 of yacc.c.  */
    7391 #line 4192 "querytransformparser.ypp"
     7434#line 4294 "querytransformparser.ypp"
    73927435    {(yyval.cardinality) = Cardinality::zeroOrOne();}
    73937436    break;
     
    73957438  case 419:
    73967439/* Line 1269 of yacc.c.  */
    7397 #line 4198 "querytransformparser.ypp"
     7440#line 4300 "querytransformparser.ypp"
    73987441    {
    73997442        (yyval.itemType) = BuiltinTypes::item;
     
    74037446  case 420:
    74047447/* Line 1269 of yacc.c.  */
    7405 #line 4203 "querytransformparser.ypp"
     7448#line 4305 "querytransformparser.ypp"
    74067449    {
    74077450        const SchemaType::Ptr t(parseInfo->staticContext->schemaDefinitions()->createSchemaType((yyvsp[(1) - (1)].qName)));
     
    74397482  case 428:
    74407483/* Line 1269 of yacc.c.  */
    7441 #line 4247 "querytransformparser.ypp"
     7484#line 4349 "querytransformparser.ypp"
    74427485    {
    74437486        (yyval.itemType) = BuiltinTypes::node;
     
    74477490  case 429:
    74487491/* Line 1269 of yacc.c.  */
    7449 #line 4252 "querytransformparser.ypp"
     7492#line 4354 "querytransformparser.ypp"
    74507493    {
    74517494        (yyval.itemType) = BuiltinTypes::document;
     
    74557498  case 430:
    74567499/* Line 1269 of yacc.c.  */
    7457 #line 4257 "querytransformparser.ypp"
     7500#line 4359 "querytransformparser.ypp"
    74587501    {
    74597502        // TODO support for document element testing
     
    74647507  case 433:
    74657508/* Line 1269 of yacc.c.  */
    7466 #line 4266 "querytransformparser.ypp"
     7509#line 4368 "querytransformparser.ypp"
    74677510    {
    74687511        (yyval.itemType) = BuiltinTypes::text;
     
    74727515  case 434:
    74737516/* Line 1269 of yacc.c.  */
    7474 #line 4271 "querytransformparser.ypp"
     7517#line 4373 "querytransformparser.ypp"
    74757518    {
    74767519        (yyval.itemType) = BuiltinTypes::comment;
     
    74807523  case 435:
    74817524/* Line 1269 of yacc.c.  */
    7482 #line 4276 "querytransformparser.ypp"
     7525#line 4378 "querytransformparser.ypp"
    74837526    {
    74847527        (yyval.itemType) = BuiltinTypes::pi;
     
    74887531  case 436:
    74897532/* Line 1269 of yacc.c.  */
    7490 #line 4281 "querytransformparser.ypp"
     7533#line 4383 "querytransformparser.ypp"
    74917534    {
    74927535        (yyval.itemType) = LocalNameTest::create(BuiltinTypes::pi, parseInfo->staticContext->namePool()->allocateLocalName((yyvsp[(3) - (4)].sval)));
     
    74967539  case 437:
    74977540/* Line 1269 of yacc.c.  */
    7498 #line 4286 "querytransformparser.ypp"
     7541#line 4388 "querytransformparser.ypp"
    74997542    {
    75007543        if(QXmlUtils::isNCName((yyvsp[(3) - (4)].sval)))
     
    75157558  case 440:
    75167559/* Line 1269 of yacc.c.  */
    7517 #line 4305 "querytransformparser.ypp"
     7560#line 4407 "querytransformparser.ypp"
    75187561    {
    75197562        (yyval.itemType) = BuiltinTypes::attribute;
     
    75237566  case 441:
    75247567/* Line 1269 of yacc.c.  */
    7525 #line 4310 "querytransformparser.ypp"
     7568#line 4412 "querytransformparser.ypp"
    75267569    {
    75277570        (yyval.itemType) = BuiltinTypes::attribute;
     
    75317574  case 442:
    75327575/* Line 1269 of yacc.c.  */
    7533 #line 4315 "querytransformparser.ypp"
     7576#line 4417 "querytransformparser.ypp"
    75347577    {
    75357578        (yyval.itemType) = QNameTest::create(BuiltinTypes::attribute, (yyvsp[(3) - (4)].qName));
     
    75397582  case 443:
    75407583/* Line 1269 of yacc.c.  */
    7541 #line 4319 "querytransformparser.ypp"
     7584#line 4421 "querytransformparser.ypp"
    75427585    {
    75437586        const SchemaType::Ptr t(parseInfo->staticContext->schemaDefinitions()->createSchemaType((yyvsp[(5) - (6)].qName)));
     
    75557598  case 444:
    75567599/* Line 1269 of yacc.c.  */
    7557 #line 4331 "querytransformparser.ypp"
     7600#line 4433 "querytransformparser.ypp"
    75587601    {
    75597602        const SchemaType::Ptr t(parseInfo->staticContext->schemaDefinitions()->createSchemaType((yyvsp[(5) - (6)].qName)));
     
    75717614  case 445:
    75727615/* Line 1269 of yacc.c.  */
    7573 #line 4344 "querytransformparser.ypp"
     7616#line 4446 "querytransformparser.ypp"
    75747617    {
    75757618        parseInfo->staticContext->error(QtXmlPatterns::tr("%1 is not in the in-scope attribute "
     
    75847627  case 446:
    75857628/* Line 1269 of yacc.c.  */
    7586 #line 4354 "querytransformparser.ypp"
     7629#line 4456 "querytransformparser.ypp"
    75877630    {
    75887631        (yyval.itemType) = BuiltinTypes::element;
     
    75927635  case 447:
    75937636/* Line 1269 of yacc.c.  */
    7594 #line 4359 "querytransformparser.ypp"
     7637#line 4461 "querytransformparser.ypp"
    75957638    {
    75967639        (yyval.itemType) = BuiltinTypes::element;
     
    76007643  case 448:
    76017644/* Line 1269 of yacc.c.  */
    7602 #line 4364 "querytransformparser.ypp"
     7645#line 4466 "querytransformparser.ypp"
    76037646    {
    76047647        (yyval.itemType) = QNameTest::create(BuiltinTypes::element, (yyvsp[(3) - (4)].qName));
     
    76087651  case 449:
    76097652/* Line 1269 of yacc.c.  */
    7610 #line 4369 "querytransformparser.ypp"
     7653#line 4471 "querytransformparser.ypp"
    76117654    {
    76127655        const SchemaType::Ptr t(parseInfo->staticContext->schemaDefinitions()->createSchemaType((yyvsp[(5) - (7)].qName)));
     
    76257668  case 450:
    76267669/* Line 1269 of yacc.c.  */
    7627 #line 4383 "querytransformparser.ypp"
     7670#line 4485 "querytransformparser.ypp"
    76287671    {
    76297672        const SchemaType::Ptr t(parseInfo->staticContext->schemaDefinitions()->createSchemaType((yyvsp[(5) - (7)].qName)));
     
    76427685  case 453:
    76437686/* Line 1269 of yacc.c.  */
    7644 #line 4400 "querytransformparser.ypp"
     7687#line 4502 "querytransformparser.ypp"
    76457688    {
    76467689        parseInfo->staticContext->error(QtXmlPatterns::tr("%1 is not in the in-scope attribute "
     
    76557698  case 455:
    76567699/* Line 1269 of yacc.c.  */
    7657 #line 4412 "querytransformparser.ypp"
     7700#line 4514 "querytransformparser.ypp"
    76587701    {
    76597702        (yyval.qName) = parseInfo->staticContext->namePool()->allocateQName(StandardNamespaces::empty, (yyvsp[(1) - (1)].sval));
     
    76637706  case 457:
    76647707/* Line 1269 of yacc.c.  */
    7665 #line 4424 "querytransformparser.ypp"
     7708#line 4526 "querytransformparser.ypp"
    76667709    {
    76677710        if(parseInfo->nodeTestSource == BuiltinTypes::element)
     
    76747717  case 462:
    76757718/* Line 1269 of yacc.c.  */
    7676 #line 4438 "querytransformparser.ypp"
     7719#line 4540 "querytransformparser.ypp"
    76777720    {
    76787721        (yyval.qName) = parseInfo->staticContext->namePool()->allocateQName(parseInfo->staticContext->defaultFunctionNamespace(), (yyvsp[(1) - (1)].sval));
     
    76827725  case 463:
    76837726/* Line 1269 of yacc.c.  */
    7684 #line 4442 "querytransformparser.ypp"
     7727#line 4544 "querytransformparser.ypp"
    76857728    {
    76867729        (yyval.qName) = parseInfo->staticContext->namePool()->allocateQName(StandardNamespaces::InternalXSLT, (yyvsp[(2) - (2)].sval));
     
    76907733  case 466:
    76917734/* Line 1269 of yacc.c.  */
    7692 #line 4450 "querytransformparser.ypp"
     7735#line 4552 "querytransformparser.ypp"
    76937736    {
    76947737        parseInfo->staticContext->error(QtXmlPatterns::tr("The name of an extension expression must be in "
     
    76987741    break;
    76997742
     7743  case 469:
     7744/* Line 1269 of yacc.c.  */
     7745#line 4562 "querytransformparser.ypp"
     7746    {
     7747        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
     7748    }
     7749    break;
     7750
     7751  case 470:
     7752/* Line 1269 of yacc.c.  */
     7753#line 4566 "querytransformparser.ypp"
     7754    {
     7755        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, (yyloc));
     7756    }
     7757    break;
     7758
    77007759  case 471:
    77017760/* Line 1269 of yacc.c.  */
    7702 #line 4463 "querytransformparser.ypp"
     7761#line 4571 "querytransformparser.ypp"
    77037762    {
    77047763
     
    77167775  case 472:
    77177776/* Line 1269 of yacc.c.  */
    7718 #line 4475 "querytransformparser.ypp"
     7777#line 4583 "querytransformparser.ypp"
    77197778    {
    77207779        (yyval.qName) = parseInfo->staticContext->namePool()->fromClarkName((yyvsp[(1) - (1)].sval));
     
    77247783
    77257784/* Line 1269 of yacc.c.  */
    7726 #line 7643 "qquerytransformparser.cpp"
     7785#line 7763 "qquerytransformparser.cpp"
    77277786      default: break;
    77287787    }
     
    79428001
    79438002/* Line 1486 of yacc.c.  */
    7944 #line 4479 "querytransformparser.ypp"
     8003#line 4587 "querytransformparser.ypp"
    79458004
    79468005
  • trunk/src/xmlpatterns/parser/qquerytransformparser_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    8585   version 2.2 of Bison.  */
    8686
     87
     88/* These tokens are defined to nothing on Windows because they're
     89 * used in their documentation parser, for use in things like:
     90 *
     91 * int foo(IN char* name, OUT char* path);
     92 *
     93 * Hence this un-break fix. Note that this file was auto generated. */
     94#ifdef IN
     95#  undef IN
     96#endif
     97#ifdef INSTANCE
     98#  undef INSTANCE
     99#endif
     100#ifdef STRICT
     101#  undef STRICT
     102#endif
     103#ifdef SELF
     104#  undef SELF
     105#endif
     106/* These tokens are defined in VxWorks kernel mode
     107 *
     108 * Hence this un-break fix. Note that this file was auto generated. */
     109#ifdef ERROR
     110#  undef ERROR
     111#endif
     112#ifdef IMPORT
     113#  undef IMPORT
     114#endif
     115#ifdef MAP
     116#  undef MAP
     117#endif
    87118
    88119/* These tokens are defined to nothing on Windows because they're
  • trunk/src/xmlpatterns/parser/qtokenizer_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    151151     * @see <a href="http://www.w3.org/TR/xquery-xpath-parsing/">Building a
    152152     * Tokenizer for XPath or XQuery</a>
    153      * @author Frans Englich <fenglich@trolltech.com>
     153     * @author Frans Englich <frans.englich@nokia.com>
    154154     */
    155155    class Tokenizer : public TokenSource
  • trunk/src/xmlpatterns/parser/qtokenlookup.cpp

    r2 r561  
    1 /* C++ code produced by gperf version 3.0.2 */
     1/****************************************************************************
     2**
     3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
     6**
     7** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     8**
     9** $QT_BEGIN_LICENSE:LGPL$
     10** Commercial Usage
     11** Licensees holding valid Qt Commercial licenses may use this file in
     12** accordance with the Qt Commercial License Agreement provided with the
     13** Software or, alternatively, in accordance with the terms contained in
     14** a written agreement between you and Nokia.
     15**
     16** GNU Lesser General Public License Usage
     17** Alternatively, this file may be used under the terms of the GNU Lesser
     18** General Public License version 2.1 as published by the Free Software
     19** Foundation and appearing in the file LICENSE.LGPL included in the
     20** packaging of this file.  Please review the following information to
     21** ensure the GNU Lesser General Public License version 2.1 requirements
     22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
     23**
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
     27**
     28** GNU General Public License Usage
     29** Alternatively, this file may be used under the terms of the GNU
     30** General Public License version 3.0 as published by the Free Software
     31** Foundation and appearing in the file LICENSE.GPL included in the
     32** packaging of this file.  Please review the following information to
     33** ensure the GNU General Public License version 3.0 requirements will be
     34** met: http://www.gnu.org/copyleft/gpl.html.
     35**
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
     38** $QT_END_LICENSE$
     39**
     40****************************************************************************/
     41/* C++ code produced by gperf version 3.0.3 */
    242/* Command-line: gperf TokenLookup.gperf  */
    343/* Computed positions: -k'1,3,$' */
     
    3070#endif
    3171
    32 #line 80 "TokenLookup.gperf"
     72#line 107 "TokenLookup.gperf"
    3373
    3474
     
    3878{
    3979
    40 #line 74 "TokenLookup.gperf"
     80#line 101 "TokenLookup.gperf"
    4181struct TokenMap
    4282{
     
    121161    {
    122162      {"",ERROR}, {"",ERROR},
     163#line 152 "TokenLookup.gperf"
     164      {"eq",                       EQ},
     165      {"",ERROR},
     166#line 130 "TokenLookup.gperf"
     167      {"by",                       BY},
     168#line 153 "TokenLookup.gperf"
     169      {"every",                    EVERY},
     170      {"",ERROR},
     171#line 123 "TokenLookup.gperf"
     172      {"as",                       AS},
     173      {"",ERROR},
     174#line 148 "TokenLookup.gperf"
     175      {"else",                     ELSE},
     176#line 217 "TokenLookup.gperf"
     177      {"where",                    WHERE},
     178#line 204 "TokenLookup.gperf"
     179      {"stable",                   STABLE},
     180#line 126 "TokenLookup.gperf"
     181      {"at",                       AT},
     182      {"",ERROR},
     183#line 131 "TokenLookup.gperf"
     184      {"case",                     CASE},
     185      {"",ERROR},
     186#line 129 "TokenLookup.gperf"
     187      {"boundary-space",           BOUNDARY_SPACE},
     188#line 147 "TokenLookup.gperf"
     189      {"element",                  ELEMENT},
     190#line 132 "TokenLookup.gperf"
     191      {"castable",                 CASTABLE},
     192#line 127 "TokenLookup.gperf"
     193      {"attribute",                ATTRIBUTE},
     194      {"",ERROR},
     195#line 154 "TokenLookup.gperf"
     196      {"except",                   EXCEPT},
     197#line 161 "TokenLookup.gperf"
     198      {"ge",                       GE},
     199      {"",ERROR},
     200#line 133 "TokenLookup.gperf"
     201      {"cast",                     CAST},
     202#line 210 "TokenLookup.gperf"
     203      {"treat",                    TREAT},
     204#line 218 "TokenLookup.gperf"
     205      {"xquery",                   XQUERY},
     206#line 181 "TokenLookup.gperf"
     207      {"ne",                       NE},
     208      {"",ERROR},
     209#line 198 "TokenLookup.gperf"
     210      {"satisfies",                SATISFIES},
     211      {"",ERROR}, {"",ERROR},
     212#line 163 "TokenLookup.gperf"
     213      {"gt",                       GT},
     214#line 151 "TokenLookup.gperf"
     215      {"encoding",                 ENCODING},
     216#line 124 "TokenLookup.gperf"
     217      {"ascending",                ASCENDING},
     218      {"",ERROR},
    123219#line 125 "TokenLookup.gperf"
    124       {"eq",                       EQ},
    125       {"",ERROR},
    126 #line 103 "TokenLookup.gperf"
    127       {"by",                       BY},
    128 #line 126 "TokenLookup.gperf"
    129       {"every",                    EVERY},
    130       {"",ERROR},
    131 #line 96 "TokenLookup.gperf"
    132       {"as",                       AS},
     220      {"assign",                   ASSIGN},
     221#line 139 "TokenLookup.gperf"
     222      {"declare",                  DECLARE},
     223#line 162 "TokenLookup.gperf"
     224      {"greatest",                 GREATEST},
     225#line 208 "TokenLookup.gperf"
     226      {"then",                     THEN},
    133227      {"",ERROR},
    134228#line 121 "TokenLookup.gperf"
    135       {"else",                     ELSE},
    136 #line 190 "TokenLookup.gperf"
    137       {"where",                    WHERE},
     229      {"ancestor-or-self",         ANCESTOR_OR_SELF},
     230#line 175 "TokenLookup.gperf"
     231      {"le",                       LE},
     232#line 146 "TokenLookup.gperf"
     233      {"document-node",            DOCUMENT_NODE},
     234#line 207 "TokenLookup.gperf"
     235      {"text",                     TEXT},
     236      {"",ERROR},
     237#line 201 "TokenLookup.gperf"
     238      {"schema",                   SCHEMA},
     239      {"",ERROR},
     240#line 145 "TokenLookup.gperf"
     241      {"document",                 DOCUMENT},
     242      {"",ERROR},
     243#line 141 "TokenLookup.gperf"
     244      {"descendant",               DESCENDANT},
     245      {"",ERROR},
    138246#line 177 "TokenLookup.gperf"
    139       {"stable",                   STABLE},
    140 #line 99 "TokenLookup.gperf"
    141       {"at",                       AT},
    142       {"",ERROR},
    143 #line 104 "TokenLookup.gperf"
    144       {"case",                     CASE},
    145       {"",ERROR},
    146 #line 102 "TokenLookup.gperf"
    147       {"boundary-space",           BOUNDARY_SPACE},
     247      {"lt",                       LT},
     248#line 122 "TokenLookup.gperf"
     249      {"and",                      AND},
     250#line 182 "TokenLookup.gperf"
     251      {"node",                     NODE},
     252#line 174 "TokenLookup.gperf"
     253      {"least",                    LEAST},
     254#line 199 "TokenLookup.gperf"
     255      {"schema-attribute",         SCHEMA_ATTRIBUTE},
     256      {"",ERROR},
     257#line 155 "TokenLookup.gperf"
     258      {"external",                 EXTERNAL},
     259      {"",ERROR},
     260#line 143 "TokenLookup.gperf"
     261      {"descending",               DESCENDING},
     262#line 184 "TokenLookup.gperf"
     263      {"no-preserve",              NO_PRESERVE},
     264#line 140 "TokenLookup.gperf"
     265      {"default",                  DEFAULT},
     266#line 176 "TokenLookup.gperf"
     267      {"let",                      LET},
     268#line 200 "TokenLookup.gperf"
     269      {"schema-element",           SCHEMA_ELEMENT},
     270      {"",ERROR}, {"",ERROR},
     271#line 137 "TokenLookup.gperf"
     272      {"construction",             CONSTRUCTION},
     273#line 142 "TokenLookup.gperf"
     274      {"descendant-or-self",       DESCENDANT_OR_SELF},
     275#line 202 "TokenLookup.gperf"
     276      {"self",                     SELF},
     277#line 183 "TokenLookup.gperf"
     278      {"no-inherit",               NO_INHERIT},
     279      {"",ERROR},
     280#line 158 "TokenLookup.gperf"
     281      {"follows",                  FOLLOWS},
    148282#line 120 "TokenLookup.gperf"
    149       {"element",                  ELEMENT},
    150 #line 105 "TokenLookup.gperf"
    151       {"castable",                 CASTABLE},
    152 #line 100 "TokenLookup.gperf"
    153       {"attribute",                ATTRIBUTE},
    154       {"",ERROR},
    155 #line 127 "TokenLookup.gperf"
    156       {"except",                   EXCEPT},
    157 #line 134 "TokenLookup.gperf"
    158       {"ge",                       GE},
    159       {"",ERROR},
    160 #line 106 "TokenLookup.gperf"
    161       {"cast",                     CAST},
    162 #line 183 "TokenLookup.gperf"
    163       {"treat",                    TREAT},
    164 #line 191 "TokenLookup.gperf"
    165       {"xquery",                   XQUERY},
    166 #line 154 "TokenLookup.gperf"
    167       {"ne",                       NE},
    168       {"",ERROR},
    169 #line 171 "TokenLookup.gperf"
    170       {"satisfies",                SATISFIES},
    171       {"",ERROR}, {"",ERROR},
    172 #line 136 "TokenLookup.gperf"
    173       {"gt",                       GT},
    174 #line 124 "TokenLookup.gperf"
    175       {"encoding",                 ENCODING},
    176 #line 97 "TokenLookup.gperf"
    177       {"ascending",                ASCENDING},
    178       {"",ERROR},
    179 #line 98 "TokenLookup.gperf"
    180       {"assign",                   ASSIGN},
    181 #line 112 "TokenLookup.gperf"
    182       {"declare",                  DECLARE},
    183 #line 135 "TokenLookup.gperf"
    184       {"greatest",                 GREATEST},
    185 #line 181 "TokenLookup.gperf"
    186       {"then",                     THEN},
    187       {"",ERROR},
    188 #line 94 "TokenLookup.gperf"
    189       {"ancestor-or-self",         ANCESTOR_OR_SELF},
    190 #line 148 "TokenLookup.gperf"
    191       {"le",                       LE},
    192 #line 119 "TokenLookup.gperf"
    193       {"document-node",            DOCUMENT_NODE},
    194 #line 180 "TokenLookup.gperf"
    195       {"text",                     TEXT},
    196       {"",ERROR},
    197 #line 174 "TokenLookup.gperf"
    198       {"schema",                   SCHEMA},
    199       {"",ERROR},
    200 #line 118 "TokenLookup.gperf"
    201       {"document",                 DOCUMENT},
    202       {"",ERROR},
    203 #line 114 "TokenLookup.gperf"
    204       {"descendant",               DESCENDANT},
    205       {"",ERROR},
    206 #line 150 "TokenLookup.gperf"
    207       {"lt",                       LT},
    208 #line 95 "TokenLookup.gperf"
    209       {"and",                      AND},
    210 #line 155 "TokenLookup.gperf"
    211       {"node",                     NODE},
    212 #line 147 "TokenLookup.gperf"
    213       {"least",                    LEAST},
    214 #line 172 "TokenLookup.gperf"
    215       {"schema-attribute",         SCHEMA_ATTRIBUTE},
    216       {"",ERROR},
    217 #line 128 "TokenLookup.gperf"
    218       {"external",                 EXTERNAL},
    219       {"",ERROR},
    220 #line 116 "TokenLookup.gperf"
    221       {"descending",               DESCENDING},
    222 #line 157 "TokenLookup.gperf"
    223       {"no-preserve",              NO_PRESERVE},
    224 #line 113 "TokenLookup.gperf"
    225       {"default",                  DEFAULT},
    226 #line 149 "TokenLookup.gperf"
    227       {"let",                      LET},
    228 #line 173 "TokenLookup.gperf"
    229       {"schema-element",           SCHEMA_ELEMENT},
    230       {"",ERROR}, {"",ERROR},
    231 #line 110 "TokenLookup.gperf"
    232       {"construction",             CONSTRUCTION},
    233 #line 115 "TokenLookup.gperf"
    234       {"descendant-or-self",       DESCENDANT_OR_SELF},
    235 #line 175 "TokenLookup.gperf"
    236       {"self",                     SELF},
    237 #line 156 "TokenLookup.gperf"
    238       {"no-inherit",               NO_INHERIT},
    239       {"",ERROR},
    240 #line 131 "TokenLookup.gperf"
    241       {"follows",                  FOLLOWS},
    242 #line 93 "TokenLookup.gperf"
    243283      {"ancestor",                 ANCESTOR},
    244284      {"",ERROR}, {"",ERROR}, {"",ERROR},
    245 #line 182 "TokenLookup.gperf"
     285#line 209 "TokenLookup.gperf"
    246286      {"to",                       TO},
    247 #line 133 "TokenLookup.gperf"
     287#line 160 "TokenLookup.gperf"
    248288      {"function",                 FUNCTION},
    249 #line 108 "TokenLookup.gperf"
     289#line 135 "TokenLookup.gperf"
    250290      {"collation",                COLLATION},
    251291      {"",ERROR},
    252 #line 178 "TokenLookup.gperf"
     292#line 205 "TokenLookup.gperf"
    253293      {"strict",                   STRICT},
    254294      {"",ERROR},
    255 #line 146 "TokenLookup.gperf"
     295#line 173 "TokenLookup.gperf"
    256296      {"lax",                      LAX},
    257297      {"",ERROR},
    258 #line 122 "TokenLookup.gperf"
     298#line 149 "TokenLookup.gperf"
    259299      {"empty",                    EMPTY},
    260300      {"",ERROR},
    261 #line 158 "TokenLookup.gperf"
     301#line 185 "TokenLookup.gperf"
    262302      {"of",                       OF},
     303#line 195 "TokenLookup.gperf"
     304      {"preserve",                 PRESERVE},
     305#line 156 "TokenLookup.gperf"
     306      {"following",                FOLLOWING},
     307      {"",ERROR}, {"",ERROR},
     308#line 171 "TokenLookup.gperf"
     309      {"is",                       IS},
     310#line 192 "TokenLookup.gperf"
     311      {"precedes",                 PRECEDES},
     312#line 150 "TokenLookup.gperf"
     313      {"empty-sequence",           EMPTY_SEQUENCE},
     314      {"",ERROR}, {"",ERROR},
     315#line 157 "TokenLookup.gperf"
     316      {"following-sibling",        FOLLOWING_SIBLING},
     317#line 169 "TokenLookup.gperf"
     318      {"instance",                 INSTANCE},
     319#line 213 "TokenLookup.gperf"
     320      {"unordered",                UNORDERED},
     321#line 128 "TokenLookup.gperf"
     322      {"base-uri",                 BASEURI},
     323#line 197 "TokenLookup.gperf"
     324      {"return",                   RETURN},
     325      {"",ERROR},
     326#line 214 "TokenLookup.gperf"
     327      {"validate",                 VALIDATE},
     328      {"",ERROR},
     329#line 138 "TokenLookup.gperf"
     330      {"copy-namespaces",          COPY_NAMESPACES},
     331#line 186 "TokenLookup.gperf"
     332      {"option",                   OPTION},
     333#line 165 "TokenLookup.gperf"
     334      {"if",                       IF},
     335      {"",ERROR},
     336#line 193 "TokenLookup.gperf"
     337      {"preceding",                PRECEDING},
     338      {"",ERROR}, {"",ERROR},
    263339#line 168 "TokenLookup.gperf"
    264       {"preserve",                 PRESERVE},
    265 #line 129 "TokenLookup.gperf"
    266       {"following",                FOLLOWING},
    267       {"",ERROR}, {"",ERROR},
    268 #line 144 "TokenLookup.gperf"
    269       {"is",                       IS},
    270 #line 165 "TokenLookup.gperf"
    271       {"precedes",                 PRECEDES},
    272 #line 123 "TokenLookup.gperf"
    273       {"empty-sequence",           EMPTY_SEQUENCE},
    274       {"",ERROR}, {"",ERROR},
    275 #line 130 "TokenLookup.gperf"
    276       {"following-sibling",        FOLLOWING_SIBLING},
    277 #line 142 "TokenLookup.gperf"
    278       {"instance",                 INSTANCE},
    279 #line 186 "TokenLookup.gperf"
    280       {"unordered",                UNORDERED},
    281 #line 101 "TokenLookup.gperf"
    282       {"base-uri",                 BASEURI},
     340      {"in",                       IN},
     341      {"",ERROR},
    283342#line 170 "TokenLookup.gperf"
    284       {"return",                   RETURN},
     343      {"intersect",                INTERSECT},
     344#line 212 "TokenLookup.gperf"
     345      {"union",                    UNION},
     346      {"",ERROR},
     347#line 194 "TokenLookup.gperf"
     348      {"preceding-sibling",        PRECEDING_SIBLING},
     349#line 188 "TokenLookup.gperf"
     350      {"ordering",                 ORDERING},
     351#line 203 "TokenLookup.gperf"
     352      {"some",                     SOME},
     353#line 134 "TokenLookup.gperf"
     354      {"child",                    CHILD},
    285355      {"",ERROR},
    286356#line 187 "TokenLookup.gperf"
    287       {"validate",                 VALIDATE},
    288       {"",ERROR},
    289 #line 111 "TokenLookup.gperf"
    290       {"copy-namespaces",          COPY_NAMESPACES},
    291 #line 159 "TokenLookup.gperf"
    292       {"option",                   OPTION},
    293 #line 138 "TokenLookup.gperf"
    294       {"if",                       IF},
    295       {"",ERROR},
    296 #line 166 "TokenLookup.gperf"
    297       {"preceding",                PRECEDING},
    298       {"",ERROR}, {"",ERROR},
    299 #line 141 "TokenLookup.gperf"
    300       {"in",                       IN},
    301       {"",ERROR},
    302 #line 143 "TokenLookup.gperf"
    303       {"intersect",                INTERSECT},
    304 #line 185 "TokenLookup.gperf"
    305       {"union",                    UNION},
    306       {"",ERROR},
    307 #line 167 "TokenLookup.gperf"
    308       {"preceding-sibling",        PRECEDING_SIBLING},
    309 #line 161 "TokenLookup.gperf"
    310       {"ordering",                 ORDERING},
    311 #line 176 "TokenLookup.gperf"
    312       {"some",                     SOME},
    313 #line 107 "TokenLookup.gperf"
    314       {"child",                    CHILD},
    315       {"",ERROR},
    316 #line 160 "TokenLookup.gperf"
    317357      {"ordered",                  ORDERED},
    318 #line 188 "TokenLookup.gperf"
     358#line 215 "TokenLookup.gperf"
    319359      {"variable",                 VARIABLE},
    320360      {"",ERROR}, {"",ERROR}, {"",ERROR},
    321 #line 163 "TokenLookup.gperf"
     361#line 190 "TokenLookup.gperf"
    322362      {"or",                       OR},
    323363      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    324 #line 109 "TokenLookup.gperf"
     364#line 136 "TokenLookup.gperf"
    325365      {"comment",                  COMMENT},
    326366      {"",ERROR}, {"",ERROR},
    327 #line 184 "TokenLookup.gperf"
     367#line 211 "TokenLookup.gperf"
    328368      {"typeswitch",               TYPESWITCH},
    329369      {"",ERROR},
    330 #line 140 "TokenLookup.gperf"
     370#line 167 "TokenLookup.gperf"
    331371      {"inherit",                  INHERIT},
    332 #line 117 "TokenLookup.gperf"
     372#line 144 "TokenLookup.gperf"
    333373      {"div",                      DIV},
    334374      {"",ERROR}, {"",ERROR},
    335 #line 152 "TokenLookup.gperf"
     375#line 179 "TokenLookup.gperf"
    336376      {"module",                   MODULE},
    337377      {"",ERROR},
    338 #line 132 "TokenLookup.gperf"
     378#line 159 "TokenLookup.gperf"
    339379      {"for",                      FOR},
    340 #line 153 "TokenLookup.gperf"
     380#line 180 "TokenLookup.gperf"
    341381      {"namespace",                NAMESPACE},
    342382      {"",ERROR}, {"",ERROR},
     383#line 216 "TokenLookup.gperf"
     384      {"version",                  VERSION},
     385      {"",ERROR}, {"",ERROR},
     386#line 206 "TokenLookup.gperf"
     387      {"strip",                    STRIP},
     388      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    343389#line 189 "TokenLookup.gperf"
    344       {"version",                  VERSION},
    345       {"",ERROR}, {"",ERROR},
    346 #line 179 "TokenLookup.gperf"
    347       {"strip",                    STRIP},
    348       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    349 #line 162 "TokenLookup.gperf"
    350390      {"order",                    ORDER},
     391#line 191 "TokenLookup.gperf"
     392      {"parent",                   PARENT},
     393      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     394      {"",ERROR}, {"",ERROR},
     395#line 178 "TokenLookup.gperf"
     396      {"mod",                      MOD},
     397      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     398      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     399      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     400      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     401      {"",ERROR},
     402#line 166 "TokenLookup.gperf"
     403      {"import",                   IMPORT},
     404      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     405      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     406      {"",ERROR}, {"",ERROR},
     407#line 196 "TokenLookup.gperf"
     408      {"processing-instruction",   PROCESSING_INSTRUCTION},
     409      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     410      {"",ERROR}, {"",ERROR},
     411#line 172 "TokenLookup.gperf"
     412      {"item",                     ITEM},
     413      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     414      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     415      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     416      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     417      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     418      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     419      {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
     420      {"",ERROR},
    351421#line 164 "TokenLookup.gperf"
    352       {"parent",                   PARENT},
    353       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    354       {"",ERROR}, {"",ERROR},
    355 #line 151 "TokenLookup.gperf"
    356       {"mod",                      MOD},
    357       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    358       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    359       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    360       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    361       {"",ERROR},
    362 #line 139 "TokenLookup.gperf"
    363       {"import",                   IMPORT},
    364       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    365       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    366       {"",ERROR}, {"",ERROR},
    367 #line 169 "TokenLookup.gperf"
    368       {"processing-instruction",   PROCESSING_INSTRUCTION},
    369       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    370       {"",ERROR}, {"",ERROR},
    371 #line 145 "TokenLookup.gperf"
    372       {"item",                     ITEM},
    373       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    374       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    375       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    376       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    377       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    378       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    379       {"",ERROR}, {"",ERROR}, {"",ERROR}, {"",ERROR},
    380       {"",ERROR},
    381 #line 137 "TokenLookup.gperf"
    382422      {"idiv",                     IDIV}
    383423    };
     
    397437  return 0;
    398438}
    399 #line 192 "TokenLookup.gperf"
     439#line 219 "TokenLookup.gperf"
    400440
    401441
  • trunk/src/xmlpatterns/parser/qtokenrevealer.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/xmlpatterns/parser/qtokenrevealer_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/xmlpatterns/parser/qtokensource.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/xmlpatterns/parser/qtokensource_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    105105     * @see <a href="http://www.w3.org/TR/xquery-xpath-parsing/">Building a
    106106     * Tokenizer for XPath or XQuery</a>
    107      * @author Frans Englich <fenglich@trolltech.com>
     107     * @author Frans Englich <frans.englich@nokia.com>
    108108     */
    109109    class TokenSource : public QSharedData
  • trunk/src/xmlpatterns/parser/querytransformparser.ypp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5454**
    5555** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    56 ** Contact: Qt Software Information (qt-info@nokia.com)
     56** All rights reserved.
     57** Contact: Nokia Corporation (qt-info@nokia.com)
    5758**
    5859** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    7374** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    7475**
    75 ** In addition, as a special exception, Nokia gives you certain
    76 ** additional rights. These rights are described in the Nokia Qt LGPL
    77 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    78 ** package.
     76** In addition, as a special exception, Nokia gives you certain additional
     77** rights.  These rights are described in the Nokia Qt LGPL Exception
     78** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    7979**
    8080** GNU General Public License Usage
     
    8686** met: http://www.gnu.org/copyleft/gpl.html.
    8787**
    88 ** If you are unsure which license is appropriate for your use, please
    89 ** contact the sales department at qt-sales@nokia.com.
     88** If you have questions regarding the use of this file, please contact
     89** Nokia at qt-info@nokia.com.
    9090** $QT_END_LICENSE$
    9191**
     
    228228
    229229/**
     230 * @internal
     231 * @relates QXmlQuery
     232 */
     233typedef QFlags<QXmlQuery::QueryLanguage> QueryLanguages;
     234
     235/**
    230236 * @short Flags invalid expressions and declarations in the currently
    231237 * parsed language.
    232238 *
    233  * Since this grammar is used for several languages: XQuery 1.0, XSL-T 2.0 and
    234  * XPath 2.0 inside XSL-T, it is the union of all the constructs in these
     239 * Since this grammar is used for several languages: XQuery 1.0, XSL-T 2.0, and
     240 * XPath 2.0 inside XSL-T, and field and selector patterns in W3C XML Schema's
     241 * identity constraints, it is the union of all the constructs in these
    235242 * languages. However, when dealing with each language individually, we
    236243 * regularly need to disallow some expressions, such as direct element
     
    243250 * used for internal purposes.
    244251 *
    245  * Hence, this function is called from each expression and declaration which is
    246  * unavailable in XPath.
     252 * Hence, this function is called from each expression and declaration with @p
     253 * allowedLanguages stating what languages it is allowed in.
    247254 *
    248255 * If @p isInternal is @c true, no error is raised. Otherwise, if the current
    249  * language is not XQuery, an error is raised.
     256 * language is not in @p allowedLanguages, an error is raised.
    250257 */
    251 static void disallowedConstruct(const ParserContext *const parseInfo,
    252                                 const YYLTYPE &sourceLocator,
    253                                 const bool isInternal = false)
     258static void allowedIn(const QueryLanguages allowedLanguages,
     259                      const ParserContext *const parseInfo,
     260                      const YYLTYPE &sourceLocator,
     261                      const bool isInternal = false)
    254262{
    255     if(!isInternal && parseInfo->languageAccent != QXmlQuery::XQuery10)
    256     {
    257         parseInfo->staticContext->error(QtXmlPatterns::tr("A construct was encountered which only is allowed in XQuery."),
     263    /* We treat XPath 2.0 as a subset of XSL-T 2.0, so if XPath 2.0 is allowed
     264     * and XSL-T is the language, it's ok. */
     265    if(!isInternal &&
     266       (!allowedLanguages.testFlag(parseInfo->languageAccent) && !(allowedLanguages.testFlag(QXmlQuery::XPath20) && parseInfo->languageAccent == QXmlQuery::XSLT20)))
     267    {
     268
     269        QString langName;
     270
     271        switch(parseInfo->languageAccent)
     272        {
     273            case QXmlQuery::XPath20:
     274                langName = QLatin1String("XPath 2.0");
     275                break;
     276            case QXmlQuery::XSLT20:
     277                langName = QLatin1String("XSL-T 2.0");
     278                break;
     279            case QXmlQuery::XQuery10:
     280                langName = QLatin1String("XQuery 1.0");
     281                break;
     282            case QXmlQuery::XmlSchema11IdentityConstraintSelector:
     283                langName = QtXmlPatterns::tr("W3C XML Schema identity constraint selector");
     284                break;
     285            case QXmlQuery::XmlSchema11IdentityConstraintField:
     286                langName = QtXmlPatterns::tr("W3C XML Schema identity constraint field");
     287                break;
     288        }
     289
     290        parseInfo->staticContext->error(QtXmlPatterns::tr("A construct was encountered "
     291                                                          "which is disallowed in the current language(%1).").arg(langName),
    258292                                        ReportContext::XPST0003,
    259293                                        fromYYLTYPE(sourceLocator, parseInfo));
     
    837871                                const YYLTYPE &location)
    838872{
    839     parseInfo->staticContext->error(QtXmlPatterns::tr("No variable by name %1 exists")
     873    parseInfo->staticContext->error(QtXmlPatterns::tr("No variable with name %1 exists")
    840874                                       .arg(formatKeyword(parseInfo->staticContext->namePool(), variableName)),
    841875                                    ReportContext::XPST0008, fromYYLTYPE(location, parseInfo));
     
    15611595| Prolog DefaultNamespaceDecl
    15621596    {
    1563         disallowedConstruct(parseInfo, @$);
     1597        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    15641598        if(parseInfo->hasSecondPrologPart)
    15651599            parseInfo->staticContext->error(QtXmlPatterns::tr("A default namespace declaration must occur before function, "
     
    15801614| Prolog Import
    15811615    {
    1582         disallowedConstruct(parseInfo, @$);
     1616        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    15831617        if(parseInfo->hasSecondPrologPart)
    15841618            parseInfo->staticContext->error(QtXmlPatterns::tr("Module imports must occur before function, "
     
    15981632| Prolog OptionDecl
    15991633    {
    1600         disallowedConstruct(parseInfo, @$);
     1634        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    16011635        parseInfo->hasSecondPrologPart = true;
    16021636    }
     
    17061740        if(val->hasError())
    17071741        {
    1708             parseInfo->staticContext->error(QtXmlPatterns::tr("The value of attribute %1 must of type %2, which %3 isn't.")
     1742            parseInfo->staticContext->error(QtXmlPatterns::tr("The value of attribute %1 must be of type %2, which %3 isn't.")
    17091743                                                             .arg(formatKeyword(QLatin1String("priority")),
    17101744                                                                  formatType(parseInfo->staticContext->namePool(), BuiltinTypes::xsDecimal),
     
    17311765| DefaultCollationDecl
    17321766    {
    1733         disallowedConstruct(parseInfo, @$);
     1767        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    17341768    }
    17351769| BaseURIDecl
    17361770| ConstructionDecl
    17371771    {
    1738         disallowedConstruct(parseInfo, @$);
     1772        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    17391773    }
    17401774| OrderingModeDecl
    17411775    {
    1742         disallowedConstruct(parseInfo, @$);
     1776        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    17431777    }
    17441778| EmptyOrderDecl
    17451779    {
    1746         disallowedConstruct(parseInfo, @$);
     1780        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    17471781    }
    17481782| CopyNamespacesDecl
     
    17561790    {
    17571791        if(!$6)
    1758             disallowedConstruct(parseInfo, @$);
     1792            allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    17591793
    17601794        if($3 == QLatin1String("xmlns"))
     
    18681902OrderingModeDecl: DECLARE ORDERING OrderingMode Separator                           /* [14] */
    18691903    {
    1870         disallowedConstruct(parseInfo, @$);
     1904        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    18711905        if(parseInfo->hasDeclaration(ParserContext::OrderingModeDecl))
    18721906        {
     
    19651999BaseURIDecl: DECLARE BASEURI IsInternal URILiteral Separator                        /* [20] */
    19662000    {
    1967         disallowedConstruct(parseInfo, @$, $3);
     2001        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20), parseInfo, @$, $3);
    19682002        if(parseInfo->hasDeclaration(ParserContext::BaseURIDecl))
    19692003        {
     
    20272061         VariableValue OptionalDefaultValue Separator                               /* [24] */
    20282062    {
    2029         disallowedConstruct(parseInfo, @$, $3);
     2063        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $3);
    20302064        if(variableByName($5, parseInfo))
    20312065        {
     
    21272161    {
    21282162        if(!$3)
    2129             disallowedConstruct(parseInfo, @$, $3);
     2163            allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $3);
    21302164
    21312165        /* If FunctionBody is null, it is 'external', otherwise the value is the body. */
     
    26972731           LetTail                                                                  /* [36] */
    26982732    {
    2699         disallowedConstruct(parseInfo, @$, $2);
     2733        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
    27002734
    27012735        Q_ASSERT(parseInfo->variables.top()->name == $4);
     
    28362870                        SomeQuantificationTail                                      /* [X] */
    28372871    {
     2872        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    28382873        $$ = create(new QuantifiedExpression($<enums.slot>8,
    28392874                                             QuantifiedExpression::Some, $<expr>6, $9), @$, parseInfo);
     
    28642899                         EveryQuantificationTail                                    /* [X] */
    28652900    {
     2901        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    28662902        $$ = create(new QuantifiedExpression($<enums.slot>8,
    28672903                                             QuantifiedExpression::Every, $<expr>6, $9), @$, parseInfo);
     
    29172953                CaseClause                                                          /* [43] */
    29182954    {
    2919         disallowedConstruct(parseInfo, @$);
     2955        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    29202956        parseInfo->typeswitchSource.pop();
    29212957        $$ = $6;
     
    29773013IfExpr: IF LPAREN Expr RPAREN THEN ExprSingle ELSE ExprSingle                       /* [45] */
    29783014    {
     3015        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    29793016        $$ = create(new IfThenClause($3, $6, $8), @$, parseInfo);
    29803017    }
     
    29833020| OrExpr OR AndExpr
    29843021    {
     3022        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    29853023        $$ = create(new OrExpression($1, $3), @$, parseInfo);
    29863024    }
     
    29893027| AndExpr AND ComparisonExpr
    29903028    {
     3029        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    29913030        $$ = create(new AndExpression($1, $3), @$, parseInfo);
    29923031    }
     
    30003039| AdditiveExpr TO AdditiveExpr
    30013040    {
     3041        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30023042        $$ = create(new RangeExpression($1, $3), @$, parseInfo);
    30033043    }
     
    30063046| AdditiveExpr AdditiveOperator MultiplicativeExpr
    30073047    {
     3048        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30083049        $$ = create(new ArithmeticExpression($1, $2, $3), @$, parseInfo);
    30093050    }
     
    30153056| MultiplicativeExpr MultiplyOperator UnionExpr
    30163057    {
     3058        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30173059        $$ = create(new ArithmeticExpression($1, $2, $3), @$, parseInfo);
    30183060    }
     
    30263068| UnionExpr UnionOperator IntersectExceptExpr
    30273069    {
     3070        allowedIn(QueryLanguages(QXmlQuery::XQuery10
     3071                                 | QXmlQuery::XPath20
     3072                                 | QXmlQuery::XmlSchema11IdentityConstraintField
     3073                                 | QXmlQuery::XmlSchema11IdentityConstraintSelector),
     3074                  parseInfo, @$);
    30283075        $$ = create(new CombineNodes($1, CombineNodes::Union, $3), @$, parseInfo);
    30293076    }
     
    30323079| IntersectExceptExpr IntersectOperator InstanceOfExpr
    30333080    {
     3081        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30343082        $$ = create(new CombineNodes($1, $2, $3), @$, parseInfo);
    30353083    }
     
    30503098| TreatExpr INSTANCE OF SequenceType
    30513099    {
     3100        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30523101        $$ = create(new InstanceOf($1,
    3053         SequenceType::Ptr($4)), @$, parseInfo);
     3102                    SequenceType::Ptr($4)), @$, parseInfo);
    30543103    }
    30553104
     
    30573106| CastableExpr TREAT AS SequenceType
    30583107    {
     3108        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30593109        $$ = create(new TreatAs($1, $4), @$, parseInfo);
    30603110    }
     
    30633113| CastExpr CASTABLE AS SingleType
    30643114    {
     3115        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30653116        $$ = create(new CastableAs($1, $4), @$, parseInfo);
    30663117    }
     
    30693120| UnaryExpr CAST AS SingleType
    30703121    {
     3122        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30713123        $$ = create(new CastAs($1, $4), @$, parseInfo);
    30723124    }
     
    30753127| UnaryOperator UnaryExpr
    30763128    {
     3129        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30773130        $$ = create(new UnaryExpression($1, $2, parseInfo->staticContext), @$, parseInfo);
    30783131    }
     
    30933146GeneralComp: RangeExpr GeneralComparisonOperator RangeExpr                          /* [60] */
    30943147    {
     3148        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30953149        $$ = create(new GeneralComparison($1, $2, $3, parseInfo->isBackwardsCompat.top()), @$, parseInfo);
    30963150    }
     
    31263180ValidateExpr: ValidationMode EnclosedExpr                                           /* [63] */
    31273181    {
    3128         disallowedConstruct(parseInfo, @$);
     3182        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    31293183        parseInfo->staticContext->error(QtXmlPatterns::tr("The Schema Validation Feature is not supported. "
    31303184                                                          "Hence, %1-expressions may not be used.")
     
    31443198ExtensionExpr: Pragmas EnclosedOptionalExpr                                         /* [65] */
    31453199    {
     3200        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    31463201        /* We don't support any pragmas, so we only do the
    31473202         * necessary validation and use the fallback expression. */
     
    31723227Pragma: PRAGMA_START PragmaName PragmaContents PRAGMA_END                           /* [66] */
    31733228    {
    3174         disallowedConstruct(parseInfo, @$);
     3229        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    31753230    }
    31763231
     
    32423297| BASEURI StringLiteral CURLY_LBRACE Expr CURLY_RBRACE                              /* [X] */
    32433298{
     3299    allowedIn(QXmlQuery::XSLT20, parseInfo, @$);
    32443300    Q_ASSERT(!$2.isEmpty());
    32453301    $$ = create(new StaticBaseURIStore($2, $4), @$, parseInfo);
     
    32483304| DECLARE NAMESPACE NCNAME G_EQ STRING_LITERAL CURLY_LBRACE                         /* [X] */
    32493305    {
     3306        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20), parseInfo, @$);
    32503307        parseInfo->resolvers.push(parseInfo->staticContext->namespaceBindings());
    32513308        const NamespaceResolver::Ptr resolver(new DelegatingNamespaceResolver(parseInfo->staticContext->namespaceBindings()));
     
    34503507        else
    34513508            $$ = $1;
     3509
     3510        switch($1)
     3511        {
     3512            case QXmlNodeModelIndex::AxisAttribute:
     3513            {
     3514                allowedIn(QueryLanguages(  QXmlQuery::XPath20
     3515                                         | QXmlQuery::XQuery10
     3516                                         | QXmlQuery::XmlSchema11IdentityConstraintField
     3517                                         | QXmlQuery::XSLT20),
     3518                          parseInfo, @$);
     3519                break;
     3520            }
     3521            case QXmlNodeModelIndex::AxisChild:
     3522            {
     3523                allowedIn(QueryLanguages(  QXmlQuery::XPath20
     3524                                         | QXmlQuery::XQuery10
     3525                                         | QXmlQuery::XmlSchema11IdentityConstraintField
     3526                                         | QXmlQuery::XmlSchema11IdentityConstraintSelector
     3527                                         | QXmlQuery::XSLT20),
     3528                          parseInfo, @$);
     3529                break;
     3530            }
     3531            default:
     3532            {
     3533                allowedIn(QueryLanguages(  QXmlQuery::XPath20
     3534                                         | QXmlQuery::XQuery10
     3535                                         | QXmlQuery::XSLT20),
     3536                          parseInfo, @$);
     3537            }
     3538        }
    34523539    }
    34533540
     
    34713558                   NodeTest                                                         /* [72] */
    34723559    {
     3560        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20 | QXmlQuery::XmlSchema11IdentityConstraintField), parseInfo, @$);
    34733561        $$ = create(new AxisStep(QXmlNodeModelIndex::AxisAttribute, $3), @$, parseInfo);
    34743562
     
    35003588NodeTest: NameTest                                                                  /* [78] */
    35013589| KindTest
     3590    {
     3591        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
     3592    }
    35023593
    35033594NameTest: ElementName                                                               /* [79] */
     
    35223613| ANY_PREFIX
    35233614    {
     3615        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35243616        const QXmlName::LocalNameCode c = parseInfo->staticContext->namePool()->allocateLocalName($1);
    35253617        $$ = LocalNameTest::create(parseInfo->nodeTestSource, c);
     
    35293621| FilterExpr LBRACKET Expr RBRACKET
    35303622    {
     3623        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35313624        $$ = create(GenericPredicate::create($1, $3, parseInfo->staticContext, fromYYLTYPE(@4, parseInfo)), @$, parseInfo);
    35323625    }
     
    35573650NumericLiteral: XPATH2_NUMBER                                                       /* [86] */
    35583651    {
     3652        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35593653        $$ = createNumericLiteral<Double>($1, @$, parseInfo);
    35603654    }
    35613655| NUMBER
    35623656    {
     3657        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35633658        $$ = createNumericLiteral<Numeric>($1, @$, parseInfo);
    35643659    }
     
    35663661VarRef: DOLLAR VarName                                                              /* [87] */
    35673662    {
     3663        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35683664        $$ = resolveVariable($2, @$, parseInfo, false);
    35693665    }
     
    35813677ParenthesizedExpr: LPAREN Expr RPAREN                                               /* [89] */
    35823678    {
     3679        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35833680        $$ = $2;
    35843681    }
    35853682| LPAREN RPAREN
    35863683    {
     3684        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35873685        $$ = create(new EmptySequence, @$, parseInfo);
    35883686    }
     
    36003698FunctionCallExpr: FunctionName LPAREN FunctionArguments RPAREN                      /* [93] */
    36013699    {
     3700        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    36023701        if(XPathHelper::isReservedNamespace($1.namespaceURI()) || $1.namespaceURI() == StandardNamespaces::InternalXSLT)
    36033702        { /* We got a call to a builtin function. */
     
    36423741Constructor: DirectConstructor                                                      /* [94] */
    36433742    {
    3644         disallowedConstruct(parseInfo, @$);
     3743        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    36453744    }
    36463745| ComputedConstructor
     3746/* The reason we cannot call alloweIn() as the action for ComputedConstructor,
     3747 * is that we use the computed constructors for XSL-T, and therefore generate
     3748 * INTERNAL tokens. */
    36473749
    36483750DirectConstructor: DirElemConstructor                                               /* [95] */
     
    40764178CompDocConstructor: DOCUMENT IsInternal EnclosedExpr                                /* [110] */
    40774179    {
    4078         disallowedConstruct(parseInfo, @$, $2);
     4180        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
    40794181
    40804182        $$ = create(new DocumentConstructor($3), @$, parseInfo);
     
    40894191    {
    40904192        Q_ASSERT(5);
    4091         disallowedConstruct(parseInfo, @$, $2);
     4193        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
    40924194
    40934195        Expression::Ptr effExpr;
     
    41344236                     EnclosedOptionalExpr                                           /* [113] */
    41354237    {
    4136         disallowedConstruct(parseInfo, @$, $2);
     4238        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
    41374239
    41384240        const Expression::Ptr name(create(new AttributeNameValidator($3), @$, parseInfo));
     
    41514253CompCommentConstructor: COMMENT IsInternal EnclosedExpr                           /* [115] */
    41524254    {
    4153         disallowedConstruct(parseInfo, @$, $2);
     4255        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
    41544256
    41554257        $$ = create(new CommentConstructor(createSimpleContent($3, @$, parseInfo)), @$, parseInfo);
     
    41584260CompPIConstructor: PROCESSING_INSTRUCTION CompPIName EnclosedOptionalExpr           /* [116] */
    41594261    {
    4160         disallowedConstruct(parseInfo, @$, $2);
     4262        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
    41614263
    41624264        if($3)
     
    45184620
    45194621StringLiteral: STRING_LITERAL                                                       /* [144] */
     4622    {
     4623        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
     4624    }
    45204625| XPATH2_STRING_LITERAL
     4626    {
     4627        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
     4628    }
    45214629
    45224630QName: QNAME                                                      /* [154] */
  • trunk/src/xmlpatterns/parser/qxquerytokenizer.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/xmlpatterns/parser/qxquerytokenizer_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7272     * and delivers tokens to the Bison generated parser.
    7373     *
    74      * @author Frans Englich <fenglich@trolltech.com>
     74     * @author Frans Englich <frans.englich@nokia.com>
    7575     */
    7676    class XQueryTokenizer : public Tokenizer
  • trunk/src/xmlpatterns/parser/qxslttokenizer.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/xmlpatterns/parser/qxslttokenizer_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    7676     * all the time.
    7777     *
    78      * @author Frans Englich <fenglich@trolltech.com>
     78     * @author Frans Englich <frans.englich@nokia.com>
    7979     */
    8080    class SingleTokenContainer : public TokenSource
     
    108108     * XSL-T.
    109109     *
    110      * @author Frans Englich <fenglich@trolltech.com>
     110     * @author Frans Englich <frans.englich@nokia.com>
    111111     */
    112112    class XSLTTokenizer : public Tokenizer
  • trunk/src/xmlpatterns/parser/qxslttokenlookup.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/xmlpatterns/parser/qxslttokenlookup.xml

    r2 r561  
    112112**
    113113** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    114 ** Contact: Qt Software Information (qt-info@nokia.com)
     114** All rights reserved.
     115** Contact: Nokia Corporation (qt-info@nokia.com)
    115116**
    116117** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    131132** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    132133**
    133 ** In addition, as a special exception, Nokia gives you certain
    134 ** additional rights. These rights are described in the Nokia Qt LGPL
    135 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    136 ** package.
     134** In addition, as a special exception, Nokia gives you certain additional
     135** rights.  These rights are described in the Nokia Qt LGPL Exception
     136** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    137137**
    138138** GNU General Public License Usage
     
    144144** met: http://www.gnu.org/copyleft/gpl.html.
    145145**
    146 ** If you are unsure which license is appropriate for your use, please
    147 ** contact the sales department at qt-sales@nokia.com.
     146** If you have questions regarding the use of this file, please contact
     147** Nokia at qt-info@nokia.com.
    148148** $QT_END_LICENSE$
    149149**
  • trunk/src/xmlpatterns/parser/qxslttokenlookup_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/xmlpatterns/parser/trolltechHeader.txt

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/xmlpatterns/parser/winCEWorkaround.sed

    r2 r561  
    1818\#  undef SELF\
    1919\#endif\
     20\/\* These tokens are defined in VxWorks kernel mode\
     21 \*\
     22 \* Hence this un-break fix. Note that this file was auto generated. *\/\
     23\#ifdef ERROR\
     24\#  undef ERROR\
     25\#endif\
     26\#ifdef IMPORT\
     27\#  undef IMPORT\
     28\#endif\
     29\#ifdef MAP\
     30\#  undef MAP\
     31\#endif\
    2032
Note: See TracChangeset for help on using the changeset viewer.