Xerces-C++ 3.3.0

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