XMLErrorCodes.hpp
上传用户:zhuqijet
上传日期:2013-06-25
资源大小:10074k
文件大小:17k
源码类别:

词法分析

开发平台:

Visual C++

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