aboutsummaryrefslogtreecommitdiff
path: root/libxsde/xsde/cxx/schema-error.cxx
blob: 8c3602c912755e7e6d0a08a43de48201549ef3e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// file      : xsde/cxx/schema-error.cxx
// author    : Boris Kolpackov <boris@codesynthesis.com>
// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
// license   : GNU GPL v2 + exceptions; see accompanying LICENSE file

#include <xsde/cxx/schema-error.hxx>

namespace xsde
{
  namespace cxx
  {
    static const char* const text_[] =
    {
      "no error",
      "expected attribute not encountered",
      "unexpected attribute encountered",
      "expected element not encountered",
      "unexpected element encountered",
      "unexpected characters encountered",
      "invalid boolean value",
      "invalid byte value",
      "invalid unsignedByte value",
      "invalid short value",
      "invalid unsignedShort value",
      "invalid int value",
      "invalid unsignedInt value",
      "invalid long value",
      "invalid unsignedLong value",
      "invalid integer value",
      "invalid negativeInteger value",
      "invalid nonPositiveInteger value",
      "invalid positiveInteger value",
      "invalid nonNegativeInteger value",
      "invalid float value",
      "invalid double value",
      "invalid decimal value",
      "invalid normalizedString value",
      "invalid token value",
      "invalid Name value",
      "invalid NMTOKEN value",
      "invalid NMTOKENS value",
      "invalid NCName value",
      "invalid ID value",
      "invalid IDREF value",
      "invalid IDREFS value",
      "invalid language value",
      "invalid QName value",
      "invalid base64Binary value",
      "invalid hexBinary value",
      "invalid gDay value",
      "invalid gMonth value",
      "invalid gYear value",
      "invalid gMonthDay value",
      "invalid gYearMonth value",
      "invalid date value",
      "invalid time value",
      "invalid dateTime value",
      "invalid duration value",
      "value is greater than maximum allowed",
      "value is less than minimum allowed",
      "value is not in enumeration",
      "value does not match pattern",
      "length is greater than maximum allowed",
      "length is less than minimum allowed",
      "length is not equal to prescribed length",
      "invalid xsi:type attribute",
      "dynamic and static types are not related by inheritance"
    };

    const char* schema_error::
    text (value v)
    {
      return text_[v];
    }
  }
}