Project

Profile

Help

How to connect?
Download (9.53 KB) Statistics
| Branch: | Tag: | Revision:

he / tags / 9.6.0.7 / hen / csource / api / Saxon.Api / NamespaceConstant.cs @ aa733b18

1
using System;
2
using System.Collections.Generic;
3
using System.Text;
4
using JNamespaceConstant = net.sf.saxon.lib.NamespaceConstant;
5
namespace Saxon.Api
6
{
7
    class NamespaceConstant
8
    {
9

    
10
	/**
11
	 * A URI representing the null namespace (actually, an empty string)
12
	 */
13

    
14
	public static readonly String NULL = "";
15
	/**
16
	 * The numeric URI code representing the null namespace (actually, zero)
17
	 */
18
	public static readonly short NULL_CODE = 0;
19

    
20
    /**
21
     * Fixed namespace name for XML: "http://www.w3.org/XML/1998/namespace".
22
     */
23
    public static readonly String XML = "http://www.w3.org/XML/1998/namespace";
24
    /**
25
     * Numeric code representing the XML namespace
26
     */
27
    public static readonly short XML_CODE = 1;
28

    
29

    
30
    /**
31
     * Fixed namespace name for XSLT: "http://www.w3.org/1999/XSL/Transform"
32
     */
33
    public static readonly String XSLT = "http://www.w3.org/1999/XSL/Transform";
34
    /**
35
     * Numeric code representing the XSLT namespace
36
     */
37
    public static readonly short XSLT_CODE = 2;
38

    
39
    /**
40
     * Fixed namespace name for SAXON: "http://saxon.sf.net/"
41
     */
42
    public static readonly String SAXON = "http://saxon.sf.net/";
43
    /**
44
     * Numeric code representing the SAXON namespace
45
     */
46
    public static readonly short SAXON_CODE = 3;
47

    
48
    /**
49
     * Namespace name for XML Schema: "http://www.w3.org/2001/XMLSchema"
50
     */
51
    public static readonly String SCHEMA = "http://www.w3.org/2001/XMLSchema";
52
    /**
53
     * Numeric code representing the schema namespace
54
     */
55
    public static readonly short SCHEMA_CODE = 4;
56

    
57
    /**
58
     * XML-schema-defined namespace for use in instance documents ("xsi")
59
     */
60
    public static readonly String SCHEMA_INSTANCE = "http://www.w3.org/2001/XMLSchema-instance";
61

    
62
    public static readonly short XSI_CODE = 5;
63

    
64
    /**
65
     * Namespace defined in XSD 1.1 for schema versioning
66
     */
67
    public static readonly String SCHEMA_VERSIONING = "http://www.w3.org/2007/XMLSchema-versioning";
68

    
69
    /**
70
     * Fixed namespace name for SAXON SQL extension: "http://saxon.sf.net/sql"
71
     */
72
    public static readonly String SQL = "http://saxon.sf.net/sql";
73

    
74
    /**
75
     * Fixed namespace name for EXSLT/Common: "http://exslt.org/common"
76
     */
77
    public static readonly String EXSLT_COMMON = "http://exslt.org/common";
78

    
79
    /**
80
     * Fixed namespace name for EXSLT/math: "http://exslt.org/math"
81
     */
82
    public static readonly String EXSLT_MATH = "http://exslt.org/math";
83

    
84
    /**
85
     * Fixed namespace name for EXSLT/sets: "http://exslt.org/sets"
86
     */
87
    public static readonly String EXSLT_SETS = "http://exslt.org/sets";
88

    
89
    /**
90
     * Fixed namespace name for EXSLT/date: "http://exslt.org/dates-and-times"
91
     */
92
    public static readonly String EXSLT_DATES_AND_TIMES = "http://exslt.org/dates-and-times";
93

    
94
    /**
95
     * Fixed namespace name for EXSLT/random: "http://exslt.org/random"
96
     */
97
    public static readonly String EXSLT_RANDOM = "http://exslt.org/random";
98

    
99
    /**
100
     * The standard namespace for functions and operators
101
     */
102
    public static readonly String FN = "http://www.w3.org/2005/xpath-functions";
103

    
104
    /**
105
     * The standard namespace for XQuery output declarations
106
     */
107
    public static readonly String OUTPUT = "http://www.w3.org/2010/xslt-xquery-serialization";
108

    
109

    
110
    /**
111
     * The standard namespace for system error codes
112
     */
113
    public static readonly String ERR = "http://www.w3.org/2005/xqt-errors";
114

    
115

    
116
    /**
117
     * Predefined XQuery namespace for local functions
118
     */
119
    public static readonly String LOCAL = "http://www.w3.org/2005/xquery-local-functions";
120
    
121
    /**
122
     * Math namespace for the XPath 3.0 math functions
123
     */
124

    
125
    public static readonly String MATH = "http://www.w3.org/2005/xpath-functions/math";
126

    
127
    /**
128
     * Namespace URI for XPath 3.0 functions associated with maps
129
     */
130
    public readonly static String MAP_FUNCTIONS = "http://www.w3.org/2005/xpath-functions/map";
131

    
132
    
133
    /**
134
     * Recognize the Microsoft namespace so we can give a suitably sarcastic error message
135
     */
136

    
137
    public static readonly String MICROSOFT_XSL = "http://www.w3.org/TR/WD-xsl";
138

    
139
    /**
140
     * The XHTML namespace http://www.w3.org/1999/xhtml
141
     */
142

    
143
    public static readonly String XHTML = "http://www.w3.org/1999/xhtml";
144

    
145
    /**
146
     * The SVG namespace
147
     */
148

    
149
    public static readonly String SVG = "http://www.w3.org/2000/svg";
150

    
151
    /**
152
     * The MathML namespace
153
     */
154

    
155
    public static readonly String MATHML = "http://www.w3.org/1998/Math/MathML";
156

    
157
    /**
158
     * The XMLNS namespace (used in DOM)
159
     */
160

    
161
    public static readonly String XMLNS = "http://www.w3.org/2000/xmlns/";
162

    
163
    /**
164
     * The XLink namespace
165
     */
166

    
167
    public static readonly String XLINK = "http://www.w3.org/1999/xlink";
168

    
169
    /**
170
     * The xquery-option namespace for the XQuery 3.0 feature names
171
     */
172

    
173
    public static readonly String XQUERY_OPTIONS = "http://www.w3.org/2011/xquery-options";
174

    
175
    /**
176
     * The xquery namespace for the XQuery 3.0 declare option
177
     */
178

    
179
    public static readonly String XQUERY = "http://www.w3.org/2012/xquery";
180

    
181
    /**
182
     * Namespace for types representing external Java objects
183
     */
184

    
185
    public static readonly String JAVA_TYPE = "http://saxon.sf.net/java-type";
186

    
187
   /**
188
     * Namespace for types representing external .NET objects
189
     */
190

    
191
    public static readonly String DOT_NET_TYPE = "http://saxon.sf.net/clitype";    
192

    
193
    /**
194
     * Namespace for names allocated to anonymous types. This exists so that
195
     * a name fingerprint can be allocated for use as a type annotation.
196
     */
197

    
198
    public static readonly String ANONYMOUS = "http://ns.saxonica.com/anonymous-type";
199

    
200
    /**
201
     * Namespace for the Saxon serialization of the schema component model
202
     */
203

    
204
    public static readonly String SCM = "http://ns.saxonica.com/schema-component-model";
205

    
206
    /**
207
     * URI identifying the Saxon object model for use in the JAXP 1.3 XPath API
208
     */
209

    
210
    public static readonly String OBJECT_MODEL_SAXON = "http://saxon.sf.net/jaxp/xpath/om";
211

    
212

    
213
    /**
214
     * URI identifying the XOM object model for use in the JAXP 1.3 XPath API
215
     */
216

    
217
    public static readonly String OBJECT_MODEL_XOM = "http://www.xom.nu/jaxp/xpath/xom";
218

    
219
    /**
220
     * URI identifying the JDOM object model for use in the JAXP 1.3 XPath API
221
     */
222

    
223
    public static readonly String OBJECT_MODEL_JDOM = "http://jdom.org/jaxp/xpath/jdom";
224

    
225
    /**
226
     * URI identifying the AXIOM object model for use in the JAXP 1.3 XPath API
227
     */
228

    
229
    // TODO: get an official URI approved
230
    public static readonly String OBJECT_MODEL_AXIOM = "http://ws.apache.org/jaxp/xpath/axiom";
231

    
232
    /**
233
     * URI identifying the DOM4J object model for use in the JAXP 1.3 XPath API
234
     */
235

    
236
    public static readonly String OBJECT_MODEL_DOM4J = "http://www.dom4j.org/jaxp/xpath/dom4j";
237

    
238
    /**
239
     * URI identifying the .NET DOM object model (not used, but needed for consistency)
240
     */
241

    
242
    public static readonly String OBJECT_MODEL_DOT_NET_DOM = "http://saxon.sf.net/object-model/dotnet/dom";
243

    
244
    /**
245
     * URI identifying the Unicode codepoint collation
246
     */
247

    
248
    public static readonly String CODEPOINT_COLLATION_URI = "http://www.w3.org/2005/xpath-functions/collation/codepoint";
249

    
250
    /**
251
     * URI for the names of generated global variables
252
     */
253

    
254
    public static readonly String SAXON_GENERATED_GLOBAL = SAXON + "generated-global-variable";
255

    
256
    /**
257
     * URI for the Saxon configuration file
258
     */
259

    
260
    public static readonly String SAXON_CONFIGURATION = "http://saxon.sf.net/ns/configuration";
261

    
262
    /**
263
     * URI for the EXPath zip module
264
     */
265

    
266
    public static readonly String EXPATH_ZIP = "http://expath.org/ns/zip";
267

    
268

    
269
    /**
270
     * Determine whether a namespace is a reserved namespace
271
     * @param uri the namespace URI to be tested
272
     * @return true if this namespace URI is a reserved namespace
273
     */
274

    
275
        public static bool isReserved(/*@Nullable*/ String uri) {
276

    
277
            return JNamespaceConstant.isReserved(uri);    
278
        }
279

    
280
        /**
281
         * Determine whether a namespace is a reserved namespace
282
         * @param uri the namespace URI to be tested
283
         * @return true if this namespace URI is reserved in XQuery
284
         */
285
        public static bool isReservedInQuery(String uri)
286
        {
287
            return JNamespaceConstant.isReservedInQuery(uri);
288
        }
289

    
290
        /**
291
          * Determine whether a namespace is a reserved namespace
292
          * @param uri the namespace URI to be tested
293
          * @return true if this namespace URI is reserved in XQuery
294
          */
295
        public static bool isReservedInQuery30(String uri) {
296
            return JNamespaceConstant.isReservedInQuery30(uri);
297
        }
298

    
299
        /**
300
         * Find a similar namespace to one that is a possible mis-spelling
301
         * @param candidate the possibly mis-spelt namespace
302
         * @return the correct spelling of the namespace
303
         */
304
        public static String findSimilarNamespace(String candidate) {
305
            return JNamespaceConstant.findSimilarNamespace(candidate);
306
        }
307
    }
308
}
309

    
310
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
311
// Copyright (c) 2013 Saxonica Limited.
312
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
313
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
314
// This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
315
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
(6-6/13)