8796aea16117ecf508cc464800de3ce97f6bbe69
[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 const XMLCh xmlconstants::XML_NS[] = // http://www.w3.org/XML/1998/namespace
29 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
30   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
31   chLatin_X, chLatin_M, chLatin_L, chForwardSlash, chDigit_1, chDigit_9, chDigit_9, chDigit_8, chForwardSlash,
32   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chLatin_p, chLatin_a, chLatin_c, chLatin_e, chNull
33 };
34
35 const XMLCh xmlconstants::XMLNS_NS[] = // http://www.w3.org/2000/xmlns/
36 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
37   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
38   chDigit_2, chDigit_0, chDigit_0, chDigit_0, chForwardSlash,
39   chLatin_x, chLatin_m, chLatin_l, chLatin_n, chLatin_s, chForwardSlash, chNull
40 };
41
42 const XMLCh xmlconstants::XMLNS_PREFIX[] = { chLatin_x, chLatin_m, chLatin_l, chLatin_n, chLatin_s, chNull };
43
44 const XMLCh xmlconstants::XML_PREFIX[] = { chLatin_x, chLatin_m, chLatin_l, chNull };
45
46 const XMLCh xmlconstants::XSD_NS[] = // http://www.w3.org/2001/XMLSchema
47 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
48   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
49   chDigit_2, chDigit_0, chDigit_0, chDigit_1, chForwardSlash,
50   chLatin_X, chLatin_M, chLatin_L, chLatin_S, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chNull
51 };
52
53 const XMLCh xmlconstants::XSD_PREFIX[] = { chLatin_x, chLatin_s, chNull };
54
55 const XMLCh xmlconstants::XSI_NS[] = // http://www.w3.org/2001/XMLSchema-instance
56 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
57   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
58   chDigit_2, chDigit_0, chDigit_0, chDigit_1, chForwardSlash,
59   chLatin_X, chLatin_M, chLatin_L, chLatin_S, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chDash,
60   chLatin_i, chLatin_n, chLatin_s, chLatin_t, chLatin_a, chLatin_n, chLatin_c, chLatin_e, chNull
61 };
62
63 const XMLCh xmlconstants::XSI_PREFIX[] = { chLatin_x, chLatin_s, chLatin_i, chNull };
64
65 const XMLCh xmlconstants::XMLSIG_NS[] = // http://www.w3.org/2000/09/xmldsig#
66 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
67   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
68   chDigit_2, chDigit_0, chDigit_0, chDigit_0, chForwardSlash, chDigit_0, chDigit_9, chForwardSlash,
69   chLatin_x, chLatin_m, chLatin_l, chLatin_d, chLatin_s, chLatin_i, chLatin_g, chPound, chNull
70 };
71
72 const XMLCh xmlconstants::XMLSIG_PREFIX[] = { chLatin_d, chLatin_s, chNull };
73
74 const XMLCh xmlconstants::XMLENC_NS[] = // http://www.w3.org/2001/04/xmlenc#
75 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
76   chLatin_w, chLatin_w, chLatin_w, chPeriod, chLatin_w, chDigit_3, chPeriod, chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
77   chDigit_2, chDigit_0, chDigit_0, chDigit_1, chForwardSlash, chDigit_0, chDigit_4, chForwardSlash,
78   chLatin_x, chLatin_m, chLatin_l, chLatin_e, chLatin_n, chLatin_c, chPound, chNull
79 };
80
81 const XMLCh xmlconstants::XMLENC_PREFIX[] = { chLatin_x, chLatin_e, chLatin_n, chLatin_c, chNull };
82
83 const XMLCh xmlconstants::SOAP11ENV_NS[] = // http://schemas.xmlsoap.org/soap/envelope/
84 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
85   chLatin_s, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chLatin_s, chPeriod,
86       chLatin_x, chLatin_m, chLatin_l, chLatin_s, chLatin_o, chLatin_a, chLatin_p, chPeriod,
87       chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
88   chLatin_s, chLatin_o, chLatin_a, chLatin_p, chForwardSlash,
89   chLatin_e, chLatin_n, chLatin_v, chLatin_e, chLatin_l, chLatin_o, chLatin_p, chLatin_e, chForwardSlash, chNull
90 };
91
92 const XMLCh xmlconstants::SOAP11ENV_PREFIX[] = UNICODE_LITERAL_1(S);
93
94 const XMLCh xmlconstants::XMLTOOLING_NS[] = // http://www.opensaml.org/xmltooling
95 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,
96   chLatin_w, chLatin_w, chLatin_w, chPeriod,
97   chLatin_o, chLatin_p, chLatin_e, chLatin_n, chLatin_s, chLatin_a, chLatin_m, chLatin_l, chPeriod,
98   chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
99   chLatin_x, chLatin_m, chLatin_l, chLatin_t, chLatin_o, chLatin_o, chLatin_l, chLatin_i, chLatin_n, chLatin_g, chNull
100 };
101
102 const XMLCh xmlconstants::XML_TRUE[] = { chLatin_t, chLatin_r, chLatin_u, chLatin_e, chNull };
103
104 const XMLCh xmlconstants::XML_FALSE[] = { chLatin_f, chLatin_a, chLatin_l, chLatin_s, chLatin_e, chNull };
105
106 const XMLCh xmlconstants::XML_ONE[] = { chDigit_1, chNull };
107
108 const XMLCh xmlconstants::XML_ZERO[] = { chDigit_0, chNull };
109