XMLValidityCodes.hpp
上传用户:huihehuasu
上传日期:2007-01-10
资源大小:6948k
文件大小:6k
源码类别:

xml/soap/webservice

开发平台:

C/C++

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