1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
---|
4 | ** Contact: Qt Software Information ([email protected])
|
---|
5 | **
|
---|
6 | ** This file is part of the QtXmlPatterns module of the Qt Toolkit.
|
---|
7 | **
|
---|
8 | ** $QT_BEGIN_LICENSE:LGPL$
|
---|
9 | ** Commercial Usage
|
---|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
11 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
12 | ** Software or, alternatively, in accordance with the terms contained in
|
---|
13 | ** a written agreement between you and Nokia.
|
---|
14 | **
|
---|
15 | ** GNU Lesser General Public License Usage
|
---|
16 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
---|
17 | ** General Public License version 2.1 as published by the Free Software
|
---|
18 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
---|
19 | ** packaging of this file. Please review the following information to
|
---|
20 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
---|
21 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
---|
22 | **
|
---|
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.
|
---|
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 are unsure which license is appropriate for your use, please
|
---|
37 | ** contact the sales department at [email protected].
|
---|
38 | ** $QT_END_LICENSE$
|
---|
39 | **
|
---|
40 | ****************************************************************************/
|
---|
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.
|
---|
51 |
|
---|
52 | #ifndef Patternist_StaticContext_H
|
---|
53 | #define Patternist_StaticContext_H
|
---|
54 |
|
---|
55 | #include "qexternalvariableloader_p.h"
|
---|
56 | #include "qitemtype_p.h"
|
---|
57 | #include "qnamepool_p.h"
|
---|
58 | #include "qnamespaceresolver_p.h"
|
---|
59 | #include "qreportcontext_p.h"
|
---|
60 | #include "qresourceloader_p.h"
|
---|
61 |
|
---|
62 | QT_BEGIN_HEADER
|
---|
63 |
|
---|
64 | QT_BEGIN_NAMESPACE
|
---|
65 |
|
---|
66 | class QUrl;
|
---|
67 | template<typename Key, typename T> class QHash;
|
---|
68 |
|
---|
69 | namespace QPatternist
|
---|
70 | {
|
---|
71 | class DynamicContext;
|
---|
72 | class Expression;
|
---|
73 | class FunctionFactory;
|
---|
74 | class SchemaTypeFactory;
|
---|
75 |
|
---|
76 | /**
|
---|
77 | * @short Carries information and facilities used at compilation time.
|
---|
78 | *
|
---|
79 | * A representation of the Static Context in XPath 2.0. The Static Context
|
---|
80 | * contains information which doesn't change and is the "outer scope" of the
|
---|
81 | * expression. It provides for example a base URI the expression can relate to and
|
---|
82 | * what functions and variables that are available for the expression.
|
---|
83 | *
|
---|
84 | * @see <a href="http://www.w3.org/TR/xpath20/#static_context">XML Path
|
---|
85 | * Language (XPath) 2.0, 2.1.1 Static Context</a>
|
---|
86 | * @author Frans Englich <[email protected]>
|
---|
87 | */
|
---|
88 | class StaticContext : public ReportContext
|
---|
89 | {
|
---|
90 | public:
|
---|
91 | /**
|
---|
92 | * A smart pointer wrapping StaticContext instances.
|
---|
93 | */
|
---|
94 | typedef QExplicitlySharedDataPointer<StaticContext> Ptr;
|
---|
95 |
|
---|
96 | /**
|
---|
97 | * @see <a href="http://www.w3.org/TR/xquery/#id-boundary-space-decls">XQuery 1.0:
|
---|
98 | * An XML Query Language, 4.3 Boundary-space Declaration</a>
|
---|
99 | * @see <a href="http://www.w3.org/TR/xquery/#dt-boundary-space-policy">XQuery 1.0:
|
---|
100 | * An XML Query Language, Definition: Boundary-space policy</a>
|
---|
101 | */
|
---|
102 | enum BoundarySpacePolicy
|
---|
103 | {
|
---|
104 | BSPPreserve,
|
---|
105 | BSPStrip
|
---|
106 | };
|
---|
107 |
|
---|
108 | /**
|
---|
109 | * @see <a href="http://www.w3.org/TR/xquery/#id-construction-declaration">XQuery 1.0:
|
---|
110 | * An XML Query Language, 4.6 Construction Declaration</a>
|
---|
111 | * @see <a href="http://www.w3.org/TR/xquery/#dt-construction-mode">XQuery 1.0:
|
---|
112 | * An XML Query Language, Definition: Construction mode</a>
|
---|
113 | */
|
---|
114 | enum ConstructionMode
|
---|
115 | {
|
---|
116 | CMPreserve,
|
---|
117 | CMStrip
|
---|
118 | };
|
---|
119 |
|
---|
120 | /**
|
---|
121 | * @see <a href="http://www.w3.org/TR/xquery/#id-default-ordering-decl">XQuery 1.0:
|
---|
122 | * An XML Query Language, 4.7 Ordering Mode Declaration</a>
|
---|
123 | * @see <a href="http://www.w3.org/TR/xquery/#dt-ordering-mode">XQuery 1.0:
|
---|
124 | * An XML Query Language, Definition: Ordering mode</a>
|
---|
125 | */
|
---|
126 | enum OrderingMode
|
---|
127 | {
|
---|
128 | Ordered,
|
---|
129 | Unordered
|
---|
130 | };
|
---|
131 |
|
---|
132 | /**
|
---|
133 | * @see <a href="http://www.w3.org/TR/xquery/#id-empty-order-decl">XQuery 1.0:
|
---|
134 | * An XML Query Language, 4.8 Empty Order Declaration</a>
|
---|
135 | * @see <a href="http://www.w3.org/TR/xquery/#dt-default-empty-order">XQuery 1.0:
|
---|
136 | * An XML Query Language, Definition: Default order for empty sequences</a>
|
---|
|
---|