1 // This file is generated, don't edit it!!
2 
3 #if !defined(XERCESC_INCLUDE_GUARD_ERRHEADER_XMLErrs)
4 #define XERCESC_INCLUDE_GUARD_ERRHEADER_XMLErrs
5 
6 #include <xercesc/framework/XMLErrorReporter.hpp>
7 #include <xercesc/util/XercesDefs.hpp>
8 #include <xercesc/dom/DOMError.hpp>
9 
10 XERCES_CPP_NAMESPACE_BEGIN
11 
12 class XMLErrs
13 {
14 public :
15     enum Codes
16     {
17         NoError                            = 0
18       , W_LowBounds                        = 1
19       , NotationAlreadyExists              = 2
20       , AttListAlreadyExists               = 3
21       , ContradictoryEncoding              = 4
22       , UndeclaredElemInCM                 = 5
23       , UndeclaredElemInAttList            = 6
24       , XMLException_Warning               = 7
25       , XIncludeResourceErrorWarning       = 8
26       , XIncludeCannotOpenFile             = 9
27       , XIncludeIncludeFailedResourceError   = 10
28       , W_HighBounds                       = 11
29       , E_LowBounds                        = 12
30       , FeatureUnsupported                 = 13
31       , TopLevelNoNameComplexType          = 14
32       , TopLevelNoNameAttribute            = 15
33       , NoNameRefAttribute                 = 16
34       , NoNameRefElement                   = 17
35       , NoNameRefGroup                     = 18
36       , NoNameRefAttGroup                  = 19
37       , AnonComplexTypeWithName            = 20
38       , AnonSimpleTypeWithName             = 21
39       , InvalidElementContent              = 22
40       , SimpleTypeContentError             = 23
41       , ExpectedSimpleTypeInList           = 24
42       , ListUnionRestrictionError          = 25
43       , SimpleTypeDerivationByListError    = 26
44       , ExpectedSimpleTypeInRestriction    = 27
45       , DuplicateFacet                     = 28
46       , ExpectedSimpleTypeInUnion          = 29
47       , EmptySimpleTypeContent             = 30
48       , InvalidSimpleContent               = 31
49       , UnspecifiedBase                    = 32
50       , InvalidComplexContent              = 33
51       , SchemaElementContentError          = 34
52       , ContentError                       = 35
53       , UnknownSimpleType                  = 36
54       , UnknownComplexType                 = 37
55       , UnresolvedPrefix                   = 38
56       , RefElementNotFound                 = 39
57       , TypeNotFound                       = 40
58       , TopLevelAttributeNotFound          = 41
59       , InvalidChildInComplexType          = 42
60       , BaseTypeNotFound                   = 43
61       , DatatypeValidatorCreationError     = 44
62       , InvalidChildFollowingSimpleContent   = 45
63       , InvalidChildFollowingConplexContent   = 46
64       , AttributeDefaultFixedValue         = 47
65       , NotOptionalDefaultAttValue         = 48
66       , DuplicateAttribute                 = 49
67       , AttributeWithTypeAndSimpleType     = 50
68       , AttributeSimpleTypeNotFound        = 51
69       , ElementWithFixedAndDefault         = 52
70       , InvalidDeclarationName             = 53
71       , ElementWithTypeAndAnonType         = 54
72       , NotSimpleOrMixedElement            = 55
73       , DisallowedSimpleTypeExtension      = 56
74       , InvalidSimpleContentBase           = 57
75       , InvalidComplexTypeBase             = 58
76       , InvalidChildInSimpleContent        = 59
77       , InvalidChildInComplexContent       = 60
78       , AnnotationError                    = 61
79       , DisallowedBaseDerivation           = 62
80       , InvalidBlockValue                  = 63
81       , InvalidFinalValue                  = 64
82       , InvalidSubstitutionGroupElement    = 65
83       , SubstitutionGroupTypeMismatch      = 66
84       , DuplicateElementDeclaration        = 67
85       , InvalidAttValue                    = 68
86       , AttributeRefContentError           = 69
87       , DuplicateRefAttribute              = 70
88       , ForbiddenDerivationByRestriction   = 71
89       , ForbiddenDerivationByExtension     = 72
90       , BaseNotComplexType                 = 73
91       , ImportNamespaceDifference          = 74
92       , DeclarationNoSchemaLocation        = 75
93       , IncludeNamespaceDifference         = 76
94       , OnlyAnnotationExpected             = 77
95       , InvalidAttributeContent            = 78
96       , AttributeRequiredGlobal            = 79
97       , AttributeRequiredLocal             = 80
98       , AttributeDisallowedGlobal          = 81
99       , AttributeDisallowedLocal           = 82
100       , InvalidMin2MaxOccurs               = 83
101       , AnyAttributeContentError           = 84
102       , NoNameGlobalElement                = 85
103       , NoCircularDefinition               = 86
104       , DuplicateGlobalType                = 87
105       , DuplicateGlobalDeclaration         = 88
106       , WS_CollapseExpected                = 89
107       , Import_1_1                         = 90
108       , Import_1_2                         = 91
109       , ElemIDValueConstraint              = 92
110       , NoNotationType                     = 93
111       , EmptiableMixedContent              = 94
112       , EmptyComplexRestrictionDerivation   = 95
113       , MixedOrElementOnly                 = 96
114       , InvalidContentRestriction          = 97
115       , ForbiddenDerivation                = 98
116       , AtomicItemType                     = 99
117       , GroupContentError                  = 100
118       , AttGroupContentError               = 101
119       , MinMaxOnGroupChild                 = 102
120       , DeclarationNotFound                = 103
121       , AllContentLimited                  = 104
122       , BadMinMaxAllCT                     = 105
123       , BadMinMaxAllElem                   = 106
124       , DuplicateAttInDerivation           = 107
125       , NotExpressibleWildCardIntersection   = 108
126       , BadAttDerivation_1                 = 109
127       , BadAttDerivation_2                 = 110
128       , BadAttDerivation_3                 = 111
129       , BadAttDerivation_4                 = 112
130       , BadAttDerivation_5                 = 113
131       , BadAttDerivation_6                 = 114
132       , BadAttDerivation_7                 = 115
133       , BadAttDerivation_8                 = 116
134       , BadAttDerivation_9                 = 117
135       , AllContentError                    = 118
136       , RedefineNamespaceDifference        = 119
137       , Redefine_InvalidSimpleType         = 120
138       , Redefine_InvalidSimpleTypeBase     = 121
139       , Redefine_InvalidComplexType        = 122
140       , Redefine_InvalidComplexTypeBase    = 123
141       , Redefine_InvalidGroupMinMax        = 124
142       , Redefine_DeclarationNotFound       = 125
143       , Redefine_GroupRefCount             = 126
144       , Redefine_AttGroupRefCount          = 127
145       , Redefine_InvalidChild              = 128
146       , Notation_DeclNotFound              = 129
147       , IC_DuplicateDecl                   = 130
148       , IC_BadContent                      = 131
149       , IC_KeyRefReferNotFound             = 132
150       , IC_KeyRefCardinality               = 133
151       , IC_XPathExprMissing                = 134
152       , AttUseCorrect                      = 135
153       , AttDeclPropCorrect3                = 136
154       , AttDeclPropCorrect5                = 137
155       , AttGrpPropCorrect3                 = 138
156       , InvalidTargetNSValue               = 139
157       , XMLException_Error                 = 140
158       , InvalidRedefine                    = 141
159       , InvalidNSReference                 = 142
160       , NotAllContent                      = 143
161       , InvalidAnnotationContent           = 144
162       , InvalidFacetName                   = 145
163       , InvalidXMLSchemaRoot               = 146
164       , CircularSubsGroup                  = 147
165       , ELTSchemaNS                        = 148
166       , InvalidAttTNS                      = 149
167       , NSDeclInvalid                      = 150
168       , DOMLevel1Node                      = 151
169       , DuplicateAnyAttribute              = 152
170       , AnyAttributeBeforeAttribute        = 153
171       , E_HighBounds                       = 154
172       , F_LowBounds                        = 155
173       , EntityExpansionLimitExceeded       = 156
174       , ExpectedCommentOrCDATA             = 157
175       , ExpectedAttrName                   = 158
176       , ExpectedNotationName               = 159
177       , NoRepInMixed                       = 160
178       , ExpectedDefAttrDecl                = 161
179       , ExpectedEqSign                     = 162
180       , ExpectedElementName                = 163
181       , CommentsMustStartWith              = 164
182       , InvalidDocumentStructure           = 165
183       , ExpectedDeclString                 = 166
184       , BadXMLVersion                      = 167
185       , UnsupportedXMLVersion              = 168
186       , UnterminatedXMLDecl                = 169
187       , BadXMLEncoding                     = 170
188       , BadStandalone                      = 171
189       , UnterminatedComment                = 172
190       , PINameExpected                     = 173
191       , UnterminatedPI                     = 174
192       , InvalidCharacter                   = 175
193       , UnterminatedStartTag               = 176
194       , ExpectedAttrValue                  = 177
195       , UnterminatedEndTag                 = 178
196       , ExpectedAttributeType              = 179
197       , ExpectedEndOfTagX                  = 180
198       , ExpectedMarkup                     = 181
199       , NotValidAfterContent               = 182
200       , ExpectedComment                    = 183
201       , ExpectedCommentOrPI                = 184
202       , ExpectedWhitespace                 = 185
203       , NoRootElemInDOCTYPE                = 186
204       , ExpectedQuotedString               = 187
205       , ExpectedPublicId                   = 188
206       , InvalidPublicIdChar                = 189
207       , UnterminatedDOCTYPE                = 190
208       , InvalidCharacterInIntSubset        = 191
209       , UnexpectedWhitespace               = 192
210       , InvalidCharacterInAttrValue        = 193
211       , ExpectedMarkupDecl                 = 194
212       , TextDeclNotLegalHere               = 195
213       , ConditionalSectInIntSubset         = 196
214       , ExpectedPEName                     = 197
215       , UnterminatedEntityDecl             = 198
216       , InvalidCharacterRef                = 199
217       , UnterminatedCharRef                = 200
218       , ExpectedEntityRefName              = 201
219       , EntityNotFound                     = 202
220       , NoUnparsedEntityRefs               = 203
221       , UnterminatedEntityRef              = 204
222       , RecursiveEntity                    = 205
223       , PartialMarkupInEntity              = 206
224       , UnterminatedElementDecl            = 207
225       , ExpectedContentSpecExpr            = 208
226       , ExpectedAsterisk                   = 209
227       , UnterminatedContentModel           = 210
228       , ExpectedSystemOrPublicId           = 211
229       , UnterminatedNotationDecl           = 212
230       , ExpectedSeqChoiceLeaf              = 213
231       , ExpectedChoiceOrCloseParen         = 214
232       , ExpectedSeqOrCloseParen            = 215
233       , ExpectedEnumValue                  = 216
234       , ExpectedEnumSepOrParen             = 217
235       , UnterminatedEntityLiteral          = 218
236       , MoreEndThanStartTags               = 219
237       , ExpectedOpenParen                  = 220
238       , AttrAlreadyUsedInSTag              = 221
239       , BracketInAttrValue                 = 222
240       , Expected2ndSurrogateChar           = 223
241       , ExpectedEndOfConditional           = 224
242       , ExpectedIncOrIgn                   = 225
243       , ExpectedINCLUDEBracket             = 226
244       , UnexpectedEOE                      = 227
245       , PEPropogated                       = 228
246       , ExtraCloseSquare                   = 229
247       , PERefInMarkupInIntSubset           = 230
248       , EntityPropogated                   = 231
249       , ExpectedNumericalCharRef           = 232
250       , ExpectedOpenSquareBracket          = 233
251       , BadSequenceInCharData              = 234
252       , IllegalSequenceInComment           = 235
253       , UnterminatedCDATASection           = 236
254       , ExpectedNDATA                      = 237
255       , NDATANotValidForPE                 = 238
256       , HexRadixMustBeLowerCase            = 239
257       , DeclStringRep                      = 240
258       , DeclStringsInWrongOrder            = 241
259       , NoExtRefsInAttValue                = 242
260       , XMLDeclMustBeLowerCase             = 243
261       , ExpectedEntityValue                = 244
262       , BadDigitForRadix                   = 245
263       , EndedWithTagsOnStack               = 246
264       , NestedCDATA                        = 247
265       , UnknownPrefix                      = 248
266       , PartialTagMarkupError              = 249
267       , EmptyMainEntity                    = 250
268       , CDATAOutsideOfContent              = 251
269       , Unexpected2ndSurrogateChar         = 252
270       , NoPIStartsWithXML                  = 253
271       , XMLDeclMustBeFirst                 = 254
272       , XMLVersionRequired                 = 255
273       , StandaloneNotLegal                 = 256
274       , EncodingRequired                   = 257
275       , ColonNotLegalWithNS                = 258
276       , XMLException_Fatal                 = 259
277       , BadSchemaLocation                  = 260
278       , SchemaScanFatalError               = 261
279       , IllegalRefInStandalone             = 262
280       , PEBetweenDecl                      = 263
281       , NoEmptyStrNamespace                = 264
282       , NoUseOfxmlnsAsPrefix               = 265
283       , NoUseOfxmlnsURI                    = 266
284       , PrefixXMLNotMatchXMLURI            = 267
285       , XMLURINotMatchXMLPrefix            = 268
286       , NoXMLNSAsElementPrefix             = 269
287       , CT_SimpleTypeChildRequired         = 270
288       , InvalidRootElemInDOCTYPE           = 271
289       , InvalidElementName                 = 272
290       , InvalidAttrName                    = 273
291       , InvalidEntityRefName               = 274
292       , DuplicateDocTypeDecl               = 275
293       , XIncludeOrphanFallback             = 276
294       , XIncludeNoHref                     = 277
295       , XIncludeXPointerNotSupported       = 278
296       , XIncludeInvalidParseVal            = 279
297       , XIncludeMultipleFallbackElems      = 280
298       , XIncludeIncludeFailedNoFallback    = 281
299       , XIncludeCircularInclusionLoop      = 282
300       , XIncludeCircularInclusionDocIncludesSelf   = 283
301       , XIncludeDisallowedChild            = 284
302       , XIncludeConflictingNotation        = 285
303       , XIncludeConflictingEntity          = 286
304       , F_HighBounds                       = 287
305     };
306 
isFatal(const XMLErrs::Codes toCheck)307     static bool isFatal(const XMLErrs::Codes toCheck)
308     {
309         return ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds));
310     }
311 
isWarning(const XMLErrs::Codes toCheck)312     static bool isWarning(const XMLErrs::Codes toCheck)
313     {
314         return ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds));
315     }
316 
isError(const XMLErrs::Codes toCheck)317     static bool isError(const XMLErrs::Codes toCheck)
318     {
319         return ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds));
320     }
321 
errorType(const XMLErrs::Codes toCheck)322     static XMLErrorReporter::ErrTypes errorType(const XMLErrs::Codes toCheck)
323     {
324        if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
325            return XMLErrorReporter::ErrType_Warning;
326        else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
327             return XMLErrorReporter::ErrType_Fatal;
328        else if ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds))
329             return XMLErrorReporter::ErrType_Error;
330        return XMLErrorReporter::ErrTypes_Unknown;
331     }
DOMErrorType(const XMLErrs::Codes toCheck)332     static DOMError::ErrorSeverity  DOMErrorType(const XMLErrs::Codes toCheck)
333     {
334        if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
335            return DOMError::DOM_SEVERITY_WARNING;
336        else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
337             return DOMError::DOM_SEVERITY_FATAL_ERROR;
338        else return DOMError::DOM_SEVERITY_ERROR;
339     }
340 
341 private:
342     // -----------------------------------------------------------------------
343     //  Unimplemented constructors and operators
344     // -----------------------------------------------------------------------
345     XMLErrs();
346 };
347 
348 XERCES_CPP_NAMESPACE_END
349 
350 #endif
351 
352