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

Revision 2674, 7.4 KB checked in by mattausch, 16 years ago (diff)
Line 
1// This file is generated, don't edit it!!
2
3#if !defined(ERRHEADER_XMLValid)
4#define ERRHEADER_XMLValid
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 XMLValid
13{
14public :
15    enum Codes
16    {
17        NoError                            = 0
18      , E_LowBounds                        = 1
19      , ElementNotDefined                  = 2
20      , AttNotDefined                      = 3
21      , NotationNotDeclared                = 4
22      , RootElemNotLikeDocType             = 5
23      , RequiredAttrNotProvided            = 6
24      , ElementNotValidForContent          = 7
25      , BadIDAttrDefType                   = 8
26      , InvalidEmptyAttValue               = 9
27      , ElementAlreadyExists               = 10
28      , MultipleIdAttrs                    = 11
29      , ReusedIDValue                      = 12
30      , IDNotDeclared                      = 13
31      , UnknownNotRefAttr                  = 14
32      , UndeclaredElemInDocType            = 15
33      , EmptyNotValidForContent            = 16
34      , AttNotDefinedForElement            = 17
35      , BadEntityRefAttr                   = 18
36      , UnknownEntityRefAttr               = 19
37      , ColonNotValidWithNS                = 20
38      , NotEnoughElemsForCM                = 21
39      , NoCharDataInCM                     = 22
40      , DoesNotMatchEnumList               = 23
41      , AttrValNotName                     = 24
42      , NoMultipleValues                   = 25
43      , NotSameAsFixedValue                = 26
44      , RepElemInMixed                     = 27
45      , NoValidatorFor                     = 28
46      , IncorrectDatatype                  = 29
47      , NotADatatype                       = 30
48      , TextOnlyContentWithType            = 31
49      , FeatureUnsupported                 = 32
50      , NestedOnlyInElemOnly               = 33
51      , EltRefOnlyInMixedElemOnly          = 34
52      , OnlyInEltContent                   = 35
53      , OrderIsAll                         = 36
54      , DatatypeWithType                   = 37
55      , DatatypeQualUnsupported            = 38
56      , GroupContentRestricted             = 39
57      , UnknownBaseDatatype                = 40
58      , OneOfTypeRefArchRef                = 41
59      , NoContentForRef                    = 42
60      , IncorrectDefaultType               = 43
61      , IllegalAttContent                  = 44
62      , ValueNotInteger                    = 45
63      , DatatypeError                      = 46
64      , SchemaError                        = 47
65      , TypeAlreadySet                     = 48
66      , ProhibitedAttributePresent         = 49
67      , IllegalXMLSpace                    = 50
68      , NotBoolean                         = 51
69      , NotDecimal                         = 52
70      , FacetsInconsistent                 = 53
71      , IllegalFacetValue                  = 54
72      , IllegalDecimalFacet                = 55
73      , UnknownFacet                       = 56
74      , InvalidEnumValue                   = 57
75      , OutOfBounds                        = 58
76      , NotAnEnumValue                     = 59
77      , NotInteger                         = 60
78      , IllegalIntegerFacet                = 61
79      , NotReal                            = 62
80      , IllegalRealFacet                   = 63
81      , ScaleLargerThanPrecision           = 64
82      , PrecisionExceeded                  = 65
83      , ScaleExceeded                      = 66
84      , NotFloat                           = 67
85      , SchemaRootError                    = 68
86      , WrongTargetNamespace               = 69
87      , SimpleTypeHasChild                 = 70
88      , NoDatatypeValidatorForSimpleType   = 71
89      , GrammarNotFound                    = 72
90      , DisplayErrorMessage                = 73
91      , NillNotAllowed                     = 74
92      , NilAttrNotEmpty                    = 75
93      , FixedDifferentFromActual           = 76
94      , NoDatatypeValidatorForAttribute    = 77
95      , GenericError                       = 78
96      , ElementNotQualified                = 79
97      , ElementNotUnQualified              = 80
98      , VC_IllegalRefInStandalone          = 81
99      , NoDefAttForStandalone              = 82
100      , NoAttNormForStandalone             = 83
101      , NoWSForStandalone                  = 84
102      , VC_EntityNotFound                  = 85
103      , PartialMarkupInPE                  = 86
104      , DatatypeValidationFailure          = 87
105      , UniqueParticleAttributionFail      = 88
106      , NoAbstractInXsiType                = 89
107      , NoDirectUseAbstractElement         = 90
108      , NoUseAbstractType                  = 91
109      , BadXsiType                         = 92
110      , NonDerivedXsiType                  = 93
111      , NoSubforBlock                      = 94
112      , AttributeNotQualified              = 95
113      , AttributeNotUnQualified            = 96
114      , IC_FieldMultipleMatch              = 97
115      , IC_UnknownField                    = 98
116      , IC_AbsentKeyValue                  = 99
117      , IC_UniqueNotEnoughValues           = 100
118      , IC_KeyNotEnoughValues              = 101
119      , IC_KeyRefNotEnoughValues           = 102
120      , IC_KeyMatchesNillable              = 103
121      , IC_DuplicateUnique                 = 104
122      , IC_DuplicateKey                    = 105
123      , IC_KeyRefOutOfScope                = 106
124      , IC_KeyNotFound                     = 107
125      , NonWSContent                       = 108
126      , EmptyElemNotationAttr              = 109
127      , EmptyElemHasContent                = 110
128      , ElemOneNotationAttr                = 111
129      , AttrDupToken                       = 112
130      , ElemChildrenHasInvalidWS           = 113
131      , E_HighBounds                       = 114
132      , W_LowBounds                        = 115
133      , W_HighBounds                       = 116
134      , F_LowBounds                        = 117
135      , F_HighBounds                       = 118
136    };
137
138    static bool isFatal(const XMLValid::Codes toCheck)
139    {
140        return ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds));
141    }
142
143    static bool isWarning(const XMLValid::Codes toCheck)
144    {
145        return ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds));
146    }
147
148    static bool isError(const XMLValid::Codes toCheck)
149    {
150        return ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds));
151    }
152
153    static XMLErrorReporter::ErrTypes errorType(const XMLValid::Codes toCheck)
154    {
155       if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
156           return XMLErrorReporter::ErrType_Warning;
157       else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
158            return XMLErrorReporter::ErrType_Fatal;
159       else if ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds))
160            return XMLErrorReporter::ErrType_Error;
161       return XMLErrorReporter::ErrTypes_Unknown;
162    }
163    static DOMError::ErrorSeverity  DOMErrorType(const XMLValid::Codes toCheck)
164    {
165       if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
166           return DOMError::DOM_SEVERITY_WARNING;
167       else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
168            return DOMError::DOM_SEVERITY_FATAL_ERROR;
169       else return DOMError::DOM_SEVERITY_ERROR;
170    }
171
172private:
173    // -----------------------------------------------------------------------
174    //  Unimplemented constructors and operators
175    // -----------------------------------------------------------------------
176    XMLValid();
177};
178
179XERCES_CPP_NAMESPACE_END
180
181#endif
182
Note: See TracBrowser for help on using the repository browser.