77210c38debbf1ee7a175ec1bbbb2273f9a1285b
[shibboleth/cpp-xmltooling.git] / xmltooling / util / XMLConstants.cpp
1 /*
2  *  Copyright 2001-2007 Internet2
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
17 /**
18  * XMLConstants.cpp
19  * 
20  * Fundamental XML namespace constants 
21  */
22
23
24 #include "internal.h"
25 #include "util/XMLConstants.h"
26 #include <xercesc/util/XMLUniDefs.hpp>
27
28 using namespace xercesc;
29
30 const XMLCh xmlconstants::XML_NS[] = // http://www.w3.org/XML/1998/namespace
31 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
32   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
33   chLatin_X, chLatin_M, chLatin_L, chForwardSlash, chDigit_1, chDigit_9, chDigit_9, chDigit_8, chForwardSlash,
34   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chLatin_p, chLatin_a, chLatin_c, chLatin_e, chNull
35 };
36
37 const XMLCh xmlconstants::XMLNS_NS[] = // http://www.w3.org/2000/xmlns/
38 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
39   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
40   chDigit_2, chDigit_0, chDigit_0, chDigit_0, chForwardSlash,
41   chLatin_x, chLatin_m, chLatin_l, chLatin_n, chLatin_s, chForwardSlash, chNull
42 };
43
44 const XMLCh xmlconstants::XMLNS_PREFIX[] = { chLatin_x, chLatin_m, chLatin_l, chLatin_n, chLatin_s, chNull };
45
46 const XMLCh xmlconstants::XML_PREFIX[] = { chLatin_x, chLatin_m, chLatin_l, chNull };
47
48 const XMLCh xmlconstants::XSD_NS[] = // http://www.w3.org/2001/XMLSchema
49 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
50   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
51   chDigit_2, chDigit_0, chDigit_0, chDigit_1, chForwardSlash,
52   chLatin_X, chLatin_M, chLatin_L, chLatin_S, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chNull
53 };
54
55 const XMLCh xmlconstants::XSD_PREFIX[] = { chLatin_x, chLatin_s, chNull };
56
57 const XMLCh xmlconstants::XSI_NS[] = // http://www.w3.org/2001/XMLSchema-instance
58 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
59   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
60   chDigit_2, chDigit_0, chDigit_0, chDigit_1, chForwardSlash,
61   chLatin_X, chLatin_M, chLatin_L, chLatin_S, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chDash,
62   chLatin_i, chLatin_n, chLatin_s, chLatin_t, chLatin_a, chLatin_n, chLatin_c, chLatin_e, chNull
63 };
64
65 const XMLCh xmlconstants::XSI_PREFIX[] = { chLatin_x, chLatin_s, chLatin_i, chNull };
66
67 const XMLCh xmlconstants::XMLSIG_NS[] = // http://www.w3.org/2000/09/xmldsig#
68 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
69   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
70   chDigit_2, chDigit_0, chDigit_0, chDigit_0, chForwardSlash, chDigit_0, chDigit_9, chForwardSlash,
71   chLatin_x, chLatin_m, chLatin_l, chLatin_d, chLatin_s, chLatin_i, chLatin_g, chPound, chNull
72 };
73
74 const XMLCh xmlconstants::XMLSIG_PREFIX[] = { chLatin_d, chLatin_s, chNull };
75
76 const XMLCh xmlconstants::XMLSIG11_NS[] = // http://www.w3.org/2009/xmldsig11#
77 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
78   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
79   chDigit_2, chDigit_0, chDigit_0, chDigit_9, chForwardSlash,
80   chLatin_x, chLatin_m, chLatin_l, chLatin_d, chLatin_s, chLatin_i, chLatin_g, chDigit_1, chDigit_1, chPound, chNull
81 };
82
83 const XMLCh xmlconstants::XMLSIG11_PREFIX[] = { chLatin_d, chLatin_s, chDigit_1, chDigit_1, chNull };
84
85 const XMLCh xmlconstants::XMLENC_NS[] = // http://www.w3.org/2001/04/xmlenc#
86 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
87   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
88   chDigit_2, chDigit_0, chDigit_0, chDigit_1, chForwardSlash, chDigit_0, chDigit_4, chForwardSlash,
89   chLatin_x, chLatin_m, chLatin_l, chLatin_e, chLatin_n, chLatin_c, chPound, chNull
90 };
91
92 const XMLCh xmlconstants::XMLENC_PREFIX[] = { chLatin_x, chLatin_e, chLatin_n, chLatin_c, chNull };
93
94 const XMLCh xmlconstants::SOAP11ENV_NS[] = // http://schemas.xmlsoap.org/soap/envelope/
95 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
96   chLatin_s, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chLatin_s, chPeriod,
97       chLatin_x, chLatin_m, chLatin_l, chLatin_s, chLatin_o, chLatin_a, chLatin_p, chPeriod,
98       chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
99   chLatin_s, chLatin_o, chLatin_a, chLatin_p, chForwardSlash,
100   chLatin_e, chLatin_n, chLatin_v, chLatin_e, chLatin_l, chLatin_o, chLatin_p, chLatin_e, chForwardSlash, chNull
101 };
102
103 const XMLCh xmlconstants::SOAP11ENV_PREFIX[] = UNICODE_LITERAL_1(S);
104
105 const XMLCh xmlconstants::XMLTOOLING_NS[] = // http://www.opensaml.org/xmltooling
106 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
107   chLatin_w, chLatin_w, chLatin_w, chPeriod,
108   chLatin_o, chLatin_p, chLatin_e, chLatin_n, chLatin_s, chLatin_a, chLatin_m, chLatin_l, chPeriod,
109   chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
110   chLatin_x, chLatin_m, chLatin_l, chLatin_t, chLatin_o, chLatin_o, chLatin_l, chLatin_i, chLatin_n, chLatin_g, chNull
111 };
112
113 const XMLCh xmlconstants::XML_TRUE[] = { chLatin_t, chLatin_r, chLatin_u, chLatin_e, chNull };
114
115 const XMLCh xmlconstants::XML_FALSE[] = { chLatin_f, chLatin_a, chLatin_l, chLatin_s, chLatin_e, chNull };
116
117 const XMLCh xmlconstants::XML_ONE[] = { chDigit_1, chNull };
118
119 const XMLCh xmlconstants::XML_ZERO[] = { chDigit_0, chNull };
120