Xerces-C++ 3.2.3

XMLValidityCodes.hpp
Go to the documentation of this file.
1 // This file is generated, don't edit it!!
2
3 #if !defined(XERCESC_INCLUDE_GUARD_ERRHEADER_XMLValid)
4 #define XERCESC_INCLUDE_GUARD_ERRHEADER_XMLValid
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 XMLValid
13 {
14 public :
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 , FeatureUnsupported = 28
46 , GroupContentRestricted = 29
47 , UnknownBaseDatatype = 30
48 , NoContentForRef = 31
49 , DatatypeError = 32
50 , ProhibitedAttributePresent = 33
51 , IllegalXMLSpace = 34
52 , WrongTargetNamespace = 35
53 , SimpleTypeHasChild = 36
54 , NoDatatypeValidatorForSimpleType = 37
55 , GrammarNotFound = 38
56 , DisplayErrorMessage = 39
57 , NillNotAllowed = 40
58 , NilAttrNotEmpty = 41
59 , FixedDifferentFromActual = 42
60 , NoDatatypeValidatorForAttribute = 43
61 , GenericError = 44
62 , ElementNotQualified = 45
63 , ElementNotUnQualified = 46
64 , VC_IllegalRefInStandalone = 47
65 , NoDefAttForStandalone = 48
66 , NoAttNormForStandalone = 49
67 , NoWSForStandalone = 50
68 , VC_EntityNotFound = 51
69 , PartialMarkupInPE = 52
70 , DatatypeValidationFailure = 53
71 , UniqueParticleAttributionFail = 54
72 , NoAbstractInXsiType = 55
73 , NoDirectUseAbstractElement = 56
74 , NoUseAbstractType = 57
75 , BadXsiType = 58
76 , NonDerivedXsiType = 59
77 , ElemNoSubforBlock = 60
78 , TypeNoSubforBlock = 61
79 , AttributeNotQualified = 62
80 , AttributeNotUnQualified = 63
81 , IC_FieldMultipleMatch = 64
82 , IC_UnknownField = 65
83 , IC_AbsentKeyValue = 66
84 , IC_KeyNotEnoughValues = 67
85 , IC_KeyMatchesNillable = 68
86 , IC_DuplicateUnique = 69
87 , IC_DuplicateKey = 70
88 , IC_KeyRefOutOfScope = 71
89 , IC_KeyNotFound = 72
90 , NonWSContent = 73
91 , EmptyElemNotationAttr = 74
92 , EmptyElemHasContent = 75
93 , ElemOneNotationAttr = 76
94 , AttrDupToken = 77
95 , ElemChildrenHasInvalidWS = 78
96 , E_HighBounds = 79
97 , W_LowBounds = 80
98 , W_HighBounds = 81
99 , F_LowBounds = 82
100 , F_HighBounds = 83
101 };
102
103 static bool isFatal(const XMLValid::Codes toCheck)
104 {
105 return ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds));
106 }
107
108 static bool isWarning(const XMLValid::Codes toCheck)
109 {
110 return ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds));
111 }
112
113 static bool isError(const XMLValid::Codes toCheck)
114 {
115 return ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds));
116 }
117
118 static XMLErrorReporter::ErrTypes errorType(const XMLValid::Codes toCheck)
119 {
120 if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
121 return XMLErrorReporter::ErrType_Warning;
122 else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
123 return XMLErrorReporter::ErrType_Fatal;
124 else if ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds))
125 return XMLErrorReporter::ErrType_Error;
126 return XMLErrorReporter::ErrTypes_Unknown;
127 }
128 static DOMError::ErrorSeverity DOMErrorType(const XMLValid::Codes toCheck)
129 {
130 if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
131 return DOMError::DOM_SEVERITY_WARNING;
132 else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
133 return DOMError::DOM_SEVERITY_FATAL_ERROR;
134 else return DOMError::DOM_SEVERITY_ERROR;
135 }
136
137 private:
138 // -----------------------------------------------------------------------
139 // Unimplemented constructors and operators
140 // -----------------------------------------------------------------------
141 XMLValid();
142 };
143
144 XERCES_CPP_NAMESPACE_END
145
146 #endif
147
XMLValid::ElementAlreadyExists
@ ElementAlreadyExists
Definition: XMLValidityCodes.hpp:27
XMLValid::AttNotDefined
@ AttNotDefined
Definition: XMLValidityCodes.hpp:20
XMLValid::UndeclaredElemInDocType
@ UndeclaredElemInDocType
Definition: XMLValidityCodes.hpp:32
XMLValid::EmptyNotValidForContent
@ EmptyNotValidForContent
Definition: XMLValidityCodes.hpp:33
XMLValid::BadIDAttrDefType
@ BadIDAttrDefType
Definition: XMLValidityCodes.hpp:25
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XMLValid::IllegalXMLSpace
@ IllegalXMLSpace
Definition: XMLValidityCodes.hpp:51
XMLValid::MultipleIdAttrs
@ MultipleIdAttrs
Definition: XMLValidityCodes.hpp:28
XMLErrorReporter::ErrTypes
ErrTypes
Definition: XMLErrorReporter.hpp:48
XMLValid::IC_DuplicateUnique
@ IC_DuplicateUnique
Definition: XMLValidityCodes.hpp:86
XMLValid::NoAttNormForStandalone
@ NoAttNormForStandalone
Definition: XMLValidityCodes.hpp:66
XMLValid::AttributeNotQualified
@ AttributeNotQualified
Definition: XMLValidityCodes.hpp:79
XMLErrorReporter::ErrType_Error
@ ErrType_Error
Definition: XMLErrorReporter.hpp:51
XMLValid::E_HighBounds
@ E_HighBounds
Definition: XMLValidityCodes.hpp:96
XMLValid::NotationNotDeclared
@ NotationNotDeclared
Definition: XMLValidityCodes.hpp:21
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XMLValid::ElemChildrenHasInvalidWS
@ ElemChildrenHasInvalidWS
Definition: XMLValidityCodes.hpp:95
XMLErrorReporter::ErrType_Warning
@ ErrType_Warning
Definition: XMLErrorReporter.hpp:50
XMLValid::NoDatatypeValidatorForAttribute
@ NoDatatypeValidatorForAttribute
Definition: XMLValidityCodes.hpp:60
XMLValid::SimpleTypeHasChild
@ SimpleTypeHasChild
Definition: XMLValidityCodes.hpp:53
XMLValid::GroupContentRestricted
@ GroupContentRestricted
Definition: XMLValidityCodes.hpp:46
XMLValid::NoCharDataInCM
@ NoCharDataInCM
Definition: XMLValidityCodes.hpp:39
XMLValid::E_LowBounds
@ E_LowBounds
Definition: XMLValidityCodes.hpp:18
XMLValid::NoUseAbstractType
@ NoUseAbstractType
Definition: XMLValidityCodes.hpp:74
DOMError.hpp
XMLValid::InvalidEmptyAttValue
@ InvalidEmptyAttValue
Definition: XMLValidityCodes.hpp:26
XMLValid::GrammarNotFound
@ GrammarNotFound
Definition: XMLValidityCodes.hpp:55
XMLValid::RootElemNotLikeDocType
@ RootElemNotLikeDocType
Definition: XMLValidityCodes.hpp:22
XMLValid::UnknownEntityRefAttr
@ UnknownEntityRefAttr
Definition: XMLValidityCodes.hpp:36
XMLValid::F_HighBounds
@ F_HighBounds
Definition: XMLValidityCodes.hpp:100
XMLValid
Definition: XMLValidityCodes.hpp:12
XMLValid::isError
static bool isError(const XMLValid::Codes toCheck)
Definition: XMLValidityCodes.hpp:113
DOMError::ErrorSeverity
ErrorSeverity
The severity of the error described by the DOMError.
Definition: DOMError.hpp:99
XMLValid::isFatal
static bool isFatal(const XMLValid::Codes toCheck)
Definition: XMLValidityCodes.hpp:103
XMLErrorReporter.hpp
XMLValid::AttrDupToken
@ AttrDupToken
Definition: XMLValidityCodes.hpp:94
XMLValid::NilAttrNotEmpty
@ NilAttrNotEmpty
Definition: XMLValidityCodes.hpp:58
XMLValid::PartialMarkupInPE
@ PartialMarkupInPE
Definition: XMLValidityCodes.hpp:69
XMLValid::errorType
static XMLErrorReporter::ErrTypes errorType(const XMLValid::Codes toCheck)
Definition: XMLValidityCodes.hpp:118
XMLValid::W_LowBounds
@ W_LowBounds
Definition: XMLValidityCodes.hpp:97
XMLValid::DatatypeError
@ DatatypeError
Definition: XMLValidityCodes.hpp:49
XMLValid::AttNotDefinedForElement
@ AttNotDefinedForElement
Definition: XMLValidityCodes.hpp:34
XMLValid::IDNotDeclared
@ IDNotDeclared
Definition: XMLValidityCodes.hpp:30
DOMError::DOM_SEVERITY_WARNING
@ DOM_SEVERITY_WARNING
Definition: DOMError.hpp:101
DOMError::DOM_SEVERITY_ERROR
@ DOM_SEVERITY_ERROR
Definition: DOMError.hpp:102
XMLValid::NotSameAsFixedValue
@ NotSameAsFixedValue
Definition: XMLValidityCodes.hpp:43
XMLValid::IC_KeyNotFound
@ IC_KeyNotFound
Definition: XMLValidityCodes.hpp:89
XMLValid::AttributeNotUnQualified
@ AttributeNotUnQualified
Definition: XMLValidityCodes.hpp:80
XMLValid::NonWSContent
@ NonWSContent
Definition: XMLValidityCodes.hpp:90
XMLValid::IC_UnknownField
@ IC_UnknownField
Definition: XMLValidityCodes.hpp:82
XMLValid::BadXsiType
@ BadXsiType
Definition: XMLValidityCodes.hpp:75
XMLValid::ProhibitedAttributePresent
@ ProhibitedAttributePresent
Definition: XMLValidityCodes.hpp:50
XMLErrorReporter::ErrType_Fatal
@ ErrType_Fatal
Definition: XMLErrorReporter.hpp:52
XMLValid::NoMultipleValues
@ NoMultipleValues
Definition: XMLValidityCodes.hpp:42
XMLValid::RepElemInMixed
@ RepElemInMixed
Definition: XMLValidityCodes.hpp:44
XMLValid::IC_DuplicateKey
@ IC_DuplicateKey
Definition: XMLValidityCodes.hpp:87
XMLValid::NillNotAllowed
@ NillNotAllowed
Definition: XMLValidityCodes.hpp:57
XMLValid::FixedDifferentFromActual
@ FixedDifferentFromActual
Definition: XMLValidityCodes.hpp:59
XMLValid::WrongTargetNamespace
@ WrongTargetNamespace
Definition: XMLValidityCodes.hpp:52
XMLValid::ElementNotValidForContent
@ ElementNotValidForContent
Definition: XMLValidityCodes.hpp:24
XMLValid::NoDefAttForStandalone
@ NoDefAttForStandalone
Definition: XMLValidityCodes.hpp:65
XMLValid::ElemNoSubforBlock
@ ElemNoSubforBlock
Definition: XMLValidityCodes.hpp:77
DOMError::DOM_SEVERITY_FATAL_ERROR
@ DOM_SEVERITY_FATAL_ERROR
Definition: DOMError.hpp:103
XMLValid::EmptyElemHasContent
@ EmptyElemHasContent
Definition: XMLValidityCodes.hpp:92
XMLValid::RequiredAttrNotProvided
@ RequiredAttrNotProvided
Definition: XMLValidityCodes.hpp:23
XMLValid::isWarning
static bool isWarning(const XMLValid::Codes toCheck)
Definition: XMLValidityCodes.hpp:108
XMLValid::ElementNotDefined
@ ElementNotDefined
Definition: XMLValidityCodes.hpp:19
XercesDefs.hpp
XMLValid::Codes
Codes
Definition: XMLValidityCodes.hpp:15
XMLValid::IC_KeyMatchesNillable
@ IC_KeyMatchesNillable
Definition: XMLValidityCodes.hpp:85
XMLValid::ElementNotUnQualified
@ ElementNotUnQualified
Definition: XMLValidityCodes.hpp:63
XMLValid::DatatypeValidationFailure
@ DatatypeValidationFailure
Definition: XMLValidityCodes.hpp:70
XMLValid::NoAbstractInXsiType
@ NoAbstractInXsiType
Definition: XMLValidityCodes.hpp:72
XMLValid::NoWSForStandalone
@ NoWSForStandalone
Definition: XMLValidityCodes.hpp:67
XMLValid::BadEntityRefAttr
@ BadEntityRefAttr
Definition: XMLValidityCodes.hpp:35
XMLValid::F_LowBounds
@ F_LowBounds
Definition: XMLValidityCodes.hpp:99
XMLValid::ReusedIDValue
@ ReusedIDValue
Definition: XMLValidityCodes.hpp:29
XMLValid::FeatureUnsupported
@ FeatureUnsupported
Definition: XMLValidityCodes.hpp:45
XMLValid::UnknownNotRefAttr
@ UnknownNotRefAttr
Definition: XMLValidityCodes.hpp:31
XMLValid::NotEnoughElemsForCM
@ NotEnoughElemsForCM
Definition: XMLValidityCodes.hpp:38
XMLValid::UnknownBaseDatatype
@ UnknownBaseDatatype
Definition: XMLValidityCodes.hpp:47
XMLValid::IC_KeyNotEnoughValues
@ IC_KeyNotEnoughValues
Definition: XMLValidityCodes.hpp:84
XMLValid::AttrValNotName
@ AttrValNotName
Definition: XMLValidityCodes.hpp:41
XMLValid::TypeNoSubforBlock
@ TypeNoSubforBlock
Definition: XMLValidityCodes.hpp:78
XMLValid::NoContentForRef
@ NoContentForRef
Definition: XMLValidityCodes.hpp:48
XMLValid::IC_KeyRefOutOfScope
@ IC_KeyRefOutOfScope
Definition: XMLValidityCodes.hpp:88
XMLValid::IC_FieldMultipleMatch
@ IC_FieldMultipleMatch
Definition: XMLValidityCodes.hpp:81
XMLValid::NoError
@ NoError
Definition: XMLValidityCodes.hpp:17
XMLValid::VC_IllegalRefInStandalone
@ VC_IllegalRefInStandalone
Definition: XMLValidityCodes.hpp:64
XMLErrorReporter::ErrTypes_Unknown
@ ErrTypes_Unknown
Definition: XMLErrorReporter.hpp:54
XMLValid::EmptyElemNotationAttr
@ EmptyElemNotationAttr
Definition: XMLValidityCodes.hpp:91
XMLValid::VC_EntityNotFound
@ VC_EntityNotFound
Definition: XMLValidityCodes.hpp:68
XMLValid::ElementNotQualified
@ ElementNotQualified
Definition: XMLValidityCodes.hpp:62
XMLValid::DisplayErrorMessage
@ DisplayErrorMessage
Definition: XMLValidityCodes.hpp:56
XMLValid::DoesNotMatchEnumList
@ DoesNotMatchEnumList
Definition: XMLValidityCodes.hpp:40
XMLValid::UniqueParticleAttributionFail
@ UniqueParticleAttributionFail
Definition: XMLValidityCodes.hpp:71
XMLValid::NoDirectUseAbstractElement
@ NoDirectUseAbstractElement
Definition: XMLValidityCodes.hpp:73
XMLValid::IC_AbsentKeyValue
@ IC_AbsentKeyValue
Definition: XMLValidityCodes.hpp:83
XMLValid::DOMErrorType
static DOMError::ErrorSeverity DOMErrorType(const XMLValid::Codes toCheck)
Definition: XMLValidityCodes.hpp:128
XMLValid::ColonNotValidWithNS
@ ColonNotValidWithNS
Definition: XMLValidityCodes.hpp:37
XMLValid::W_HighBounds
@ W_HighBounds
Definition: XMLValidityCodes.hpp:98
XMLValid::ElemOneNotationAttr
@ ElemOneNotationAttr
Definition: XMLValidityCodes.hpp:93
XMLValid::GenericError
@ GenericError
Definition: XMLValidityCodes.hpp:61
XMLValid::NonDerivedXsiType
@ NonDerivedXsiType
Definition: XMLValidityCodes.hpp:76
XMLValid::NoDatatypeValidatorForSimpleType
@ NoDatatypeValidatorForSimpleType
Definition: XMLValidityCodes.hpp:54