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

词法分析

开发平台:

Visual C++

  1. // This file is generated, don't edit it!!
  2. #if !defined(ERRHEADER_XMLValid)
  3. #define ERRHEADER_XMLValid
  4. #include <xercesc/framework/XMLErrorReporter.hpp>
  5. #include <xercesc/util/XercesDefs.hpp>
  6. XERCES_CPP_NAMESPACE_BEGIN
  7. class XMLValid
  8. {
  9. public :
  10.     enum Codes
  11.     {
  12.         NoError                            = 0
  13.       , E_LowBounds                        = 1
  14.       , ElementNotDefined                  = 2
  15.       , AttNotDefined                      = 3
  16.       , NotationNotDeclared                = 4
  17.       , RootElemNotLikeDocType             = 5
  18.       , RequiredAttrNotProvided            = 6
  19.       , ElementNotValidForContent          = 7
  20.       , BadIDAttrDefType                   = 8
  21.       , InvalidEmptyAttValue               = 9
  22.       , ElementAlreadyExists               = 10
  23.       , MultipleIdAttrs                    = 11
  24.       , ReusedIDValue                      = 12
  25.       , IDNotDeclared                      = 13
  26.       , UnknownNotRefAttr                  = 14
  27.       , UndeclaredElemInDocType            = 15
  28.       , EmptyNotValidForContent            = 16
  29.       , AttNotDefinedForElement            = 17
  30.       , BadEntityRefAttr                   = 18
  31.       , UnknownEntityRefAttr               = 19
  32.       , ColonNotValidWithNS                = 20
  33.       , NotEnoughElemsForCM                = 21
  34.       , NoCharDataInCM                     = 22
  35.       , DoesNotMatchEnumList               = 23
  36.       , AttrValNotName                     = 24
  37.       , NoMultipleValues                   = 25
  38.       , NotSameAsFixedValue                = 26
  39.       , RepElemInMixed                     = 27
  40.       , NoValidatorFor                     = 28
  41.       , IncorrectDatatype                  = 29
  42.       , NotADatatype                       = 30
  43.       , TextOnlyContentWithType            = 31
  44.       , FeatureUnsupported                 = 32
  45.       , NestedOnlyInElemOnly               = 33
  46.       , EltRefOnlyInMixedElemOnly          = 34
  47.       , OnlyInEltContent                   = 35
  48.       , OrderIsAll                         = 36
  49.       , DatatypeWithType                   = 37
  50.       , DatatypeQualUnsupported            = 38
  51.       , GroupContentRestricted             = 39
  52.       , UnknownBaseDatatype                = 40
  53.       , OneOfTypeRefArchRef                = 41
  54.       , NoContentForRef                    = 42
  55.       , IncorrectDefaultType               = 43
  56.       , IllegalAttContent                  = 44
  57.       , ValueNotInteger                    = 45
  58.       , DatatypeError                      = 46
  59.       , SchemaError                        = 47
  60.       , TypeAlreadySet                     = 48
  61.       , ProhibitedAttributePresent         = 49
  62.       , IllegalXMLSpace                    = 50
  63.       , NotBoolean                         = 51
  64.       , NotDecimal                         = 52
  65.       , FacetsInconsistent                 = 53
  66.       , IllegalFacetValue                  = 54
  67.       , IllegalDecimalFacet                = 55
  68.       , UnknownFacet                       = 56
  69.       , InvalidEnumValue                   = 57
  70.       , OutOfBounds                        = 58
  71.       , NotAnEnumValue                     = 59
  72.       , NotInteger                         = 60
  73.       , IllegalIntegerFacet                = 61
  74.       , NotReal                            = 62
  75.       , IllegalRealFacet                   = 63
  76.       , ScaleLargerThanPrecision           = 64
  77.       , PrecisionExceeded                  = 65
  78.       , ScaleExceeded                      = 66
  79.       , NotFloat                           = 67
  80.       , SchemaRootError                    = 68
  81.       , WrongTargetNamespace               = 69
  82.       , SimpleTypeHasChild                 = 70
  83.       , NoDatatypeValidatorForSimpleType   = 71
  84.       , GrammarNotFound                    = 72
  85.       , DisplayErrorMessage                = 73
  86.       , NillNotAllowed                     = 74
  87.       , NilAttrNotEmpty                    = 75
  88.       , FixedDifferentFromActual           = 76
  89.       , NoDatatypeValidatorForAttribute    = 77
  90.       , GenericError                       = 78
  91.       , ElementNotQualified                = 79
  92.       , ElementNotUnQualified              = 80
  93.       , VC_IllegalRefInStandalone          = 81
  94.       , NoDefAttForStandalone              = 82
  95.       , NoAttNormForStandalone             = 83
  96.       , NoWSForStandalone                  = 84
  97.       , VC_EntityNotFound                  = 85
  98.       , PartialMarkupInPE                  = 86
  99.       , DatatypeValidationFailure          = 87
  100.       , UniqueParticleAttributionFail      = 88
  101.       , NoAbstractInXsiType                = 89
  102.       , NoDirectUseAbstractElement         = 90
  103.       , NoUseAbstractType                  = 91
  104.       , BadXsiType                         = 92
  105.       , NonDerivedXsiType                  = 93
  106.       , NoSubforBlock                      = 94
  107.       , AttributeNotQualified              = 95
  108.       , AttributeNotUnQualified            = 96
  109.       , IC_FieldMultipleMatch              = 97
  110.       , IC_UnknownField                    = 98
  111.       , IC_AbsentKeyValue                  = 99
  112.       , IC_UniqueNotEnoughValues           = 100
  113.       , IC_KeyNotEnoughValues              = 101
  114.       , IC_KeyRefNotEnoughValues           = 102
  115.       , IC_KeyMatchesNillable              = 103
  116.       , IC_DuplicateUnique                 = 104
  117.       , IC_DuplicateKey                    = 105
  118.       , IC_KeyRefOutOfScope                = 106
  119.       , IC_KeyNotFound                     = 107
  120.       , E_HighBounds                       = 108
  121.       , W_LowBounds                        = 109
  122.       , W_HighBounds                       = 110
  123.       , F_LowBounds                        = 111
  124.       , F_HighBounds                       = 112
  125.     };
  126.     static bool isFatal(const XMLValid::Codes toCheck)
  127.     {
  128.         return ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds));
  129.     }
  130.     static bool isWarning(const XMLValid::Codes toCheck)
  131.     {
  132.         return ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds));
  133.     }
  134.     static bool isError(const XMLValid::Codes toCheck)
  135.     {
  136.         return ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds));
  137.     }
  138.     static XMLErrorReporter::ErrTypes errorType(const XMLValid::Codes toCheck)
  139.     {
  140.        if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
  141.            return XMLErrorReporter::ErrType_Warning;
  142.        else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
  143.             return XMLErrorReporter::ErrType_Fatal;
  144.        else if ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds))
  145.             return XMLErrorReporter::ErrType_Error;
  146.        return XMLErrorReporter::ErrTypes_Unknown;
  147.     }
  148. };
  149. XERCES_CPP_NAMESPACE_END
  150. #endif