source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/framework/XMLErrorCodes.hpp @ 2674

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