1 /*
2  * Copyright 2006-2008 The FLWOR Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 #ifndef ZORBA_STATIC_CONTEXT_CONSTS_H
18 #define ZORBA_STATIC_CONTEXT_CONSTS_H
19 
20 #include <string>
21 #include <iostream>
22 
23 namespace zorba
24 {
25 
26 namespace StaticContextConsts
27 {
28 
29   enum xquery_version_t
30   {
31     xquery_version_unknown = 0,
32     xquery_version_1_0 = 100,
33     xquery_version_3_0 = 300
34   };
35 
36   std::ostream& operator<<(std::ostream& o, xquery_version_t v);
37 
38 
39   enum xpath_compatibility_t
40   {
41     xpath_unknown,
42     xpath2_0,
43     xpath1_0_only
44   };
45 
46   enum construction_mode_t
47   {
48     cons_unknown,
49     cons_preserve,
50     cons_strip
51   };
52 
53   enum ordering_mode_t
54   {
55     ordering_unknown,
56     ordered,
57     unordered
58   };
59 
60   enum empty_order_mode_t
61   {
62     empty_order_unknown,
63     empty_greatest,
64     empty_least
65   };
66 
67   enum boundary_space_mode_t
68   {
69     boundary_space_unknown,
70     preserve_space,
71     strip_space
72   };
73 
74   enum validation_mode_t
75   {
76     validation_unknown,
77     strict_validation,
78     lax_validation,
79     lax_dtd_validation,
80     skip_validation
81   };
82 
83   enum declaration_property_t
84   {
85     // Collection update mode
86     decl_const,
87     decl_append_only,
88     decl_queue,
89     decl_mutable,
90 
91     // Collection ordering
92     decl_ordered,
93     decl_unordered,
94 
95     // Index Ordering
96     decl_value_equality,
97     decl_value_range,
98     decl_general_equality,
99     decl_general_range,
100 
101     // Index uniqueness
102     decl_unique,
103     decl_non_unique,
104 
105     // index maintenance mode
106     decl_automatic,
107     decl_manual
108   };
109 
110 
111   enum node_modifier_t
112   {
113     read_only,
114     mutable_node
115   };
116 
117 
118   std::string toString(declaration_property_t prop);
119 
120 } // namespace StaticContextConsts
121 } // namespace zorba
122 
123 #endif /* ZORBA_STATIC_CONTEXT_CONSTS_H */
124 /*
125  * Local variables:
126  * mode: c++
127  * End:
128  */
129 /* vim:set et sw=2 ts=2: */
130