// Copyright (c) 2005-2014 Code Synthesis Tools CC
//
// This program was generated by CodeSynthesis XSD, an XML Schema to
// C++ data binding compiler.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
// In addition, as a special exception, Code Synthesis Tools CC gives
// permission to link this program with the Xerces-C++ library (or with
// modified versions of Xerces-C++ that use the same license as Xerces-C++),
// and distribute linked combinations including the two. You must obey
// the GNU General Public License version 2 in all respects for all of
// the code used other than Xerces-C++. If you modify this copy of the
// program, you may extend this exception to your version of the program,
// but you are not obligated to do so. If you do not wish to do so, delete
// this exception statement from your version.
//
// Furthermore, Code Synthesis Tools CC makes a special exception for
// the Free/Libre and Open Source Software (FLOSS) which is described
// in the accompanying FLOSSE file.
//

#ifndef CXX_WORK_XSD_4_0_0_XSD_TESTS_CXX_TREE_DEFAULT_GENERAL_TEST_HXX
#define CXX_WORK_XSD_4_0_0_XSD_TESTS_CXX_TREE_DEFAULT_GENERAL_TEST_HXX

#ifndef XSD_USE_CHAR
#define XSD_USE_CHAR
#endif

#ifndef XSD_CXX_TREE_USE_CHAR
#define XSD_CXX_TREE_USE_CHAR
#endif

// Begin prologue.
//
//
// End prologue.

#include <xsd/cxx/config.hxx>

#if (XSD_INT_VERSION != 4000000L)
#error XSD runtime version mismatch
#endif

#include <xsd/cxx/pre.hxx>

#include <xsd/cxx/xml/char-utf8.hxx>

#include <xsd/cxx/tree/exceptions.hxx>
#include <xsd/cxx/tree/elements.hxx>
#include <xsd/cxx/tree/types.hxx>

#include <xsd/cxx/xml/error-handler.hxx>

#include <xsd/cxx/xml/dom/auto-ptr.hxx>

#include <xsd/cxx/tree/parsing.hxx>
#include <xsd/cxx/tree/parsing/byte.hxx>
#include <xsd/cxx/tree/parsing/unsigned-byte.hxx>
#include <xsd/cxx/tree/parsing/short.hxx>
#include <xsd/cxx/tree/parsing/unsigned-short.hxx>
#include <xsd/cxx/tree/parsing/int.hxx>
#include <xsd/cxx/tree/parsing/unsigned-int.hxx>
#include <xsd/cxx/tree/parsing/long.hxx>
#include <xsd/cxx/tree/parsing/unsigned-long.hxx>
#include <xsd/cxx/tree/parsing/boolean.hxx>
#include <xsd/cxx/tree/parsing/float.hxx>
#include <xsd/cxx/tree/parsing/double.hxx>
#include <xsd/cxx/tree/parsing/decimal.hxx>

#include <xsd/cxx/xml/dom/serialization-header.hxx>
#include <xsd/cxx/tree/serialization.hxx>
#include <xsd/cxx/tree/serialization/byte.hxx>
#include <xsd/cxx/tree/serialization/unsigned-byte.hxx>
#include <xsd/cxx/tree/serialization/short.hxx>
#include <xsd/cxx/tree/serialization/unsigned-short.hxx>
#include <xsd/cxx/tree/serialization/int.hxx>
#include <xsd/cxx/tree/serialization/unsigned-int.hxx>
#include <xsd/cxx/tree/serialization/long.hxx>
#include <xsd/cxx/tree/serialization/unsigned-long.hxx>
#include <xsd/cxx/tree/serialization/boolean.hxx>
#include <xsd/cxx/tree/serialization/float.hxx>
#include <xsd/cxx/tree/serialization/double.hxx>
#include <xsd/cxx/tree/serialization/decimal.hxx>

#include <xsd/cxx/tree/std-ostream-operators.hxx>

namespace xml_schema
{
  // anyType and anySimpleType.
  //
  typedef ::xsd::cxx::tree::type type;
  typedef ::xsd::cxx::tree::simple_type< char, type > simple_type;
  typedef ::xsd::cxx::tree::type container;

  // 8-bit
  //
  typedef signed char byte;
  typedef unsigned char unsigned_byte;

  // 16-bit
  //
  typedef short short_;
  typedef unsigned short unsigned_short;

  // 32-bit
  //
  typedef int int_;
  typedef unsigned int unsigned_int;

  // 64-bit
  //
  typedef long long long_;
  typedef unsigned long long unsigned_long;

  // Supposed to be arbitrary-length integral types.
  //
  typedef long long integer;
  typedef long long non_positive_integer;
  typedef unsigned long long non_negative_integer;
  typedef unsigned long long positive_integer;
  typedef long long negative_integer;

  // Boolean.
  //
  typedef bool boolean;

  // Floating-point types.
  //
  typedef float float_;
  typedef double double_;
  typedef double decimal;

  // String types.
  //
  typedef ::xsd::cxx::tree::string< char, simple_type > string;
  typedef ::xsd::cxx::tree::normalized_string< char, string > normalized_string;
  typedef ::xsd::cxx::tree::token< char, normalized_string > token;
  typedef ::xsd::cxx::tree::name< char, token > name;
  typedef ::xsd::cxx::tree::nmtoken< char, token > nmtoken;
  typedef ::xsd::cxx::tree::nmtokens< char, simple_type, nmtoken > nmtokens;
  typedef ::xsd::cxx::tree::ncname< char, name > ncname;
  typedef ::xsd::cxx::tree::language< char, token > language;

  // ID/IDREF.
  //
  typedef ::xsd::cxx::tree::id< char, ncname > id;
  typedef ::xsd::cxx::tree::idref< char, ncname, type > idref;
  typedef ::xsd::cxx::tree::idrefs< char, simple_type, idref > idrefs;

  // URI.
  //
  typedef ::xsd::cxx::tree::uri< char, simple_type > uri;

  // Qualified name.
  //
  typedef ::xsd::cxx::tree::qname< char, simple_type, uri, ncname > qname;

  // Binary.
  //
  typedef ::xsd::cxx::tree::buffer< char > buffer;
  typedef ::xsd::cxx::tree::base64_binary< char, simple_type > base64_binary;
  typedef ::xsd::cxx::tree::hex_binary< char, simple_type > hex_binary;

  // Date/time.
  //
  typedef ::xsd::cxx::tree::time_zone time_zone;
  typedef ::xsd::cxx::tree::date< char, simple_type > date;
  typedef ::xsd::cxx::tree::date_time< char, simple_type > date_time;
  typedef ::xsd::cxx::tree::duration< char, simple_type > duration;
  typedef ::xsd::cxx::tree::gday< char, simple_type > gday;
  typedef ::xsd::cxx::tree::gmonth< char, simple_type > gmonth;
  typedef ::xsd::cxx::tree::gmonth_day< char, simple_type > gmonth_day;
  typedef ::xsd::cxx::tree::gyear< char, simple_type > gyear;
  typedef ::xsd::cxx::tree::gyear_month< char, simple_type > gyear_month;
  typedef ::xsd::cxx::tree::time< char, simple_type > time;

  // Entity.
  //
  typedef ::xsd::cxx::tree::entity< char, ncname > entity;
  typedef ::xsd::cxx::tree::entities< char, simple_type, entity > entities;

  typedef ::xsd::cxx::tree::content_order content_order;
  // Namespace information and list stream. Used in
  // serialization functions.
  //
  typedef ::xsd::cxx::xml::dom::namespace_info< char > namespace_info;
  typedef ::xsd::cxx::xml::dom::namespace_infomap< char > namespace_infomap;
  typedef ::xsd::cxx::tree::list_stream< char > list_stream;
  typedef ::xsd::cxx::tree::as_double< double_ > as_double;
  typedef ::xsd::cxx::tree::as_decimal< decimal > as_decimal;
  typedef ::xsd::cxx::tree::facet facet;

  // Flags and properties.
  //
  typedef ::xsd::cxx::tree::flags flags;
  typedef ::xsd::cxx::tree::properties< char > properties;

  // Parsing/serialization diagnostics.
  //
  typedef ::xsd::cxx::tree::severity severity;
  typedef ::xsd::cxx::tree::error< char > error;
  typedef ::xsd::cxx::tree::diagnostics< char > diagnostics;

  // Exceptions.
  //
  typedef ::xsd::cxx::tree::exception< char > exception;
  typedef ::xsd::cxx::tree::bounds< char > bounds;
  typedef ::xsd::cxx::tree::duplicate_id< char > duplicate_id;
  typedef ::xsd::cxx::tree::parsing< char > parsing;
  typedef ::xsd::cxx::tree::expected_element< char > expected_element;
  typedef ::xsd::cxx::tree::unexpected_element< char > unexpected_element;
  typedef ::xsd::cxx::tree::expected_attribute< char > expected_attribute;
  typedef ::xsd::cxx::tree::unexpected_enumerator< char > unexpected_enumerator;
  typedef ::xsd::cxx::tree::expected_text_content< char > expected_text_content;
  typedef ::xsd::cxx::tree::no_prefix_mapping< char > no_prefix_mapping;
  typedef ::xsd::cxx::tree::serialization< char > serialization;

  // Error handler callback interface.
  //
  typedef ::xsd::cxx::xml::error_handler< char > error_handler;

  // DOM interaction.
  //
  namespace dom
  {
    // Automatic pointer for DOMDocument.
    //
    using ::xsd::cxx::xml::dom::auto_ptr;

#ifndef XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA
#define XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA
    // DOM user data key for back pointers to tree nodes.
    //
    const XMLCh* const tree_node_key = ::xsd::cxx::tree::user_data_keys::node;
#endif
  }
}

// Forward declarations.
//
namespace test
{
  class union_;
  class union_test;
  class fix_list;
  class var_list;
  class list_item;
  class usr_list;
  class union_list;
  class list_test;
  class int_base;
  class str_base;
  class int_;
  class str;
  class union_derived;
  class list_derived;
  class simple_test;
  class date_derived;
  class date_test;
  class time_test;
  class date_time_test;
  class duration_test;
  class day_test;
  class month_test;
  class year_test;
  class month_day_test;
  class year_month_test;
  class type;
}


#include <memory>    // ::std::auto_ptr
#include <limits>    // std::numeric_limits
#include <algorithm> // std::binary_search

#include <xsd/cxx/xml/char-utf8.hxx>

#include <xsd/cxx/tree/exceptions.hxx>
#include <xsd/cxx/tree/elements.hxx>
#include <xsd/cxx/tree/containers.hxx>
#include <xsd/cxx/tree/list.hxx>

#include <xsd/cxx/xml/dom/parsing-header.hxx>

#ifndef XSD_DONT_INCLUDE_INLINE
#define XSD_DONT_INCLUDE_INLINE

#undef XSD_DONT_INCLUDE_INLINE
#else

#endif // XSD_DONT_INCLUDE_INLINE

namespace test
{
  class union_: public ::xml_schema::string
  {
    public:

    union_ ();

    union_ (const char* v);

    union_ (const ::std::string& v);

    union_ (const ::xercesc::DOMElement& e,
            ::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0);

    union_ (const ::xercesc::DOMAttr& a,
            ::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0);

    union_ (const ::std::string& s,
            const ::xercesc::DOMElement* e,
            ::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0);

    union_ (const union_& x,
            ::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0);

    virtual union_*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;
  };

  class union_test: public ::xml_schema::type
  {
    public:
    // a
    //
    typedef ::test::union_ a_type;
    typedef ::xsd::cxx::tree::traits< a_type, char > a_traits;

    const a_type&
    a () const;

    a_type&
    a ();

    void
    a (const a_type& x);

    void
    a (::std::auto_ptr< a_type > p);

    static const a_type&
    a_default_value ();

    // Constructors.
    //
    union_test ();

    union_test (const ::xercesc::DOMElement& e,
                ::xml_schema::flags f = 0,
                ::xml_schema::container* c = 0);

    union_test (const union_test& x,
                ::xml_schema::flags f = 0,
                ::xml_schema::container* c = 0);

    virtual union_test*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    union_test&
    operator= (const union_test& x);

    virtual 
    ~union_test ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< a_type > a_;
    static const a_type a_default_value_;
  };

  class fix_list: public ::xml_schema::simple_type,
    public ::xsd::cxx::tree::list< ::xml_schema::int_, char >
  {
    public:
    fix_list ();

    fix_list (size_type n, const ::xml_schema::int_& x);

    template < typename I >
    fix_list (const I& begin, const I& end)
    : ::xsd::cxx::tree::list< ::xml_schema::int_, char > (begin, end, this)
    {
    }

    fix_list (const ::xercesc::DOMElement& e,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    fix_list (const ::xercesc::DOMAttr& a,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    fix_list (const ::std::string& s,
              const ::xercesc::DOMElement* e,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    fix_list (const fix_list& x,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    virtual fix_list*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    virtual 
    ~fix_list ();
  };

  class var_list: public ::xml_schema::simple_type,
    public ::xsd::cxx::tree::list< ::xml_schema::string, char >
  {
    public:
    var_list ();

    var_list (size_type n, const ::xml_schema::string& x);

    template < typename I >
    var_list (const I& begin, const I& end)
    : ::xsd::cxx::tree::list< ::xml_schema::string, char > (begin, end, this)
    {
    }

    var_list (const ::xercesc::DOMElement& e,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    var_list (const ::xercesc::DOMAttr& a,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    var_list (const ::std::string& s,
              const ::xercesc::DOMElement* e,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    var_list (const var_list& x,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    virtual var_list*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    virtual 
    ~var_list ();
  };

  class list_item: public ::xml_schema::string
  {
    public:
    // Constructors.
    //
    list_item ();

    list_item (const char*);

    list_item (const ::std::string&);

    list_item (const ::xml_schema::string&);

    list_item (const ::xercesc::DOMElement& e,
               ::xml_schema::flags f = 0,
               ::xml_schema::container* c = 0);

    list_item (const ::xercesc::DOMAttr& a,
               ::xml_schema::flags f = 0,
               ::xml_schema::container* c = 0);

    list_item (const ::std::string& s,
               const ::xercesc::DOMElement* e,
               ::xml_schema::flags f = 0,
               ::xml_schema::container* c = 0);

    list_item (const list_item& x,
               ::xml_schema::flags f = 0,
               ::xml_schema::container* c = 0);

    virtual list_item*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    virtual 
    ~list_item ();
  };

  class usr_list: public ::xml_schema::simple_type,
    public ::xsd::cxx::tree::list< ::test::list_item, char >
  {
    public:
    usr_list ();

    usr_list (size_type n, const ::test::list_item& x);

    template < typename I >
    usr_list (const I& begin, const I& end)
    : ::xsd::cxx::tree::list< ::test::list_item, char > (begin, end, this)
    {
    }

    usr_list (const ::xercesc::DOMElement& e,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    usr_list (const ::xercesc::DOMAttr& a,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    usr_list (const ::std::string& s,
              const ::xercesc::DOMElement* e,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    usr_list (const usr_list& x,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    virtual usr_list*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    virtual 
    ~usr_list ();
  };

  class union_list: public ::xml_schema::simple_type,
    public ::xsd::cxx::tree::list< ::test::union_, char >
  {
    public:
    union_list ();

    union_list (size_type n, const ::test::union_& x);

    template < typename I >
    union_list (const I& begin, const I& end)
    : ::xsd::cxx::tree::list< ::test::union_, char > (begin, end, this)
    {
    }

    union_list (const ::xercesc::DOMElement& e,
                ::xml_schema::flags f = 0,
                ::xml_schema::container* c = 0);

    union_list (const ::xercesc::DOMAttr& a,
                ::xml_schema::flags f = 0,
                ::xml_schema::container* c = 0);

    union_list (const ::std::string& s,
                const ::xercesc::DOMElement* e,
                ::xml_schema::flags f = 0,
                ::xml_schema::container* c = 0);

    union_list (const union_list& x,
                ::xml_schema::flags f = 0,
                ::xml_schema::container* c = 0);

    virtual union_list*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    virtual 
    ~union_list ();
  };

  class list_test: public ::xml_schema::type
  {
    public:
    // a
    //
    typedef ::test::fix_list a_type;
    typedef ::xsd::cxx::tree::traits< a_type, char > a_traits;

    const a_type&
    a () const;

    a_type&
    a ();

    void
    a (const a_type& x);

    void
    a (::std::auto_ptr< a_type > p);

    static const a_type&
    a_default_value ();

    // b
    //
    typedef ::test::var_list b_type;
    typedef ::xsd::cxx::tree::traits< b_type, char > b_traits;

    const b_type&
    b () const;

    b_type&
    b ();

    void
    b (const b_type& x);

    void
    b (::std::auto_ptr< b_type > p);

    static const b_type&
    b_default_value ();

    // c
    //
    typedef ::test::usr_list c_type;
    typedef ::xsd::cxx::tree::traits< c_type, char > c_traits;

    const c_type&
    c () const;

    c_type&
    c ();

    void
    c (const c_type& x);

    void
    c (::std::auto_ptr< c_type > p);

    static const c_type&
    c_default_value ();

    // d
    //
    typedef ::test::union_list d_type;
    typedef ::xsd::cxx::tree::traits< d_type, char > d_traits;

    const d_type&
    d () const;

    d_type&
    d ();

    void
    d (const d_type& x);

    void
    d (::std::auto_ptr< d_type > p);

    static const d_type&
    d_default_value ();

    // Constructors.
    //
    list_test ();

    list_test (const ::xercesc::DOMElement& e,
               ::xml_schema::flags f = 0,
               ::xml_schema::container* c = 0);

    list_test (const list_test& x,
               ::xml_schema::flags f = 0,
               ::xml_schema::container* c = 0);

    virtual list_test*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    list_test&
    operator= (const list_test& x);

    virtual 
    ~list_test ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< a_type > a_;
    static const a_type a_default_value_;
    ::xsd::cxx::tree::one< b_type > b_;
    static const b_type b_default_value_;
    ::xsd::cxx::tree::one< c_type > c_;
    static const c_type c_default_value_;
    ::xsd::cxx::tree::one< d_type > d_;
    static const d_type d_default_value_;
  };

  class int_base: public ::xsd::cxx::tree::fundamental_base< ::xml_schema::int_, char, ::xml_schema::simple_type >
  {
    public:
    // Constructors.
    //
    int_base ();

    int_base (const ::xml_schema::int_&);

    int_base (const ::xercesc::DOMElement& e,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    int_base (const ::xercesc::DOMAttr& a,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    int_base (const ::std::string& s,
              const ::xercesc::DOMElement* e,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    int_base (const int_base& x,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    virtual int_base*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    virtual 
    ~int_base ();
  };

  class str_base: public ::xml_schema::string
  {
    public:
    // Constructors.
    //
    str_base ();

    str_base (const char*);

    str_base (const ::std::string&);

    str_base (const ::xml_schema::string&);

    str_base (const ::xercesc::DOMElement& e,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    str_base (const ::xercesc::DOMAttr& a,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    str_base (const ::std::string& s,
              const ::xercesc::DOMElement* e,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    str_base (const str_base& x,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    virtual str_base*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    virtual 
    ~str_base ();
  };

  class int_: public ::test::int_base
  {
    public:
    // Constructors.
    //
    int_ ();

    int_ (const ::xml_schema::int_&);

    int_ (const ::xercesc::DOMElement& e,
          ::xml_schema::flags f = 0,
          ::xml_schema::container* c = 0);

    int_ (const ::xercesc::DOMAttr& a,
          ::xml_schema::flags f = 0,
          ::xml_schema::container* c = 0);

    int_ (const ::std::string& s,
          const ::xercesc::DOMElement* e,
          ::xml_schema::flags f = 0,
          ::xml_schema::container* c = 0);

    int_ (const int_& x,
          ::xml_schema::flags f = 0,
          ::xml_schema::container* c = 0);

    virtual int_*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    virtual 
    ~int_ ();
  };

  class str: public ::test::str_base
  {
    public:
    // Constructors.
    //
    str ();

    str (const char*);

    str (const ::std::string&);

    str (const ::xml_schema::string&);

    str (const ::xercesc::DOMElement& e,
         ::xml_schema::flags f = 0,
         ::xml_schema::container* c = 0);

    str (const ::xercesc::DOMAttr& a,
         ::xml_schema::flags f = 0,
         ::xml_schema::container* c = 0);

    str (const ::std::string& s,
         const ::xercesc::DOMElement* e,
         ::xml_schema::flags f = 0,
         ::xml_schema::container* c = 0);

    str (const str& x,
         ::xml_schema::flags f = 0,
         ::xml_schema::container* c = 0);

    virtual str*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    virtual 
    ~str ();
  };

  class union_derived: public ::test::union_
  {
    public:
    // Constructors.
    //
    union_derived ();

    union_derived (const char*);

    union_derived (const ::std::string&);

    union_derived (const ::test::union_&);

    union_derived (const ::xercesc::DOMElement& e,
                   ::xml_schema::flags f = 0,
                   ::xml_schema::container* c = 0);

    union_derived (const ::xercesc::DOMAttr& a,
                   ::xml_schema::flags f = 0,
                   ::xml_schema::container* c = 0);

    union_derived (const ::std::string& s,
                   const ::xercesc::DOMElement* e,
                   ::xml_schema::flags f = 0,
                   ::xml_schema::container* c = 0);

    union_derived (const union_derived& x,
                   ::xml_schema::flags f = 0,
                   ::xml_schema::container* c = 0);

    virtual union_derived*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    virtual 
    ~union_derived ();
  };

  class list_derived: public ::test::usr_list
  {
    public:
    // Constructors.
    //
    list_derived ();

    list_derived (const ::test::usr_list&);

    list_derived (const ::xercesc::DOMElement& e,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

    list_derived (const ::xercesc::DOMAttr& a,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

    list_derived (const ::std::string& s,
                  const ::xercesc::DOMElement* e,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

    list_derived (const list_derived& x,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

    virtual list_derived*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    virtual 
    ~list_derived ();
  };

  class simple_test: public ::xml_schema::type
  {
    public:
    // a
    //
    typedef ::test::int_base a_type;
    typedef ::xsd::cxx::tree::traits< a_type, char > a_traits;

    const a_type&
    a () const;

    a_type&
    a ();

    void
    a (const a_type& x);

    void
    a (::std::auto_ptr< a_type > p);

    static a_type
    a_default_value ();

    // b
    //
    typedef ::test::str_base b_type;
    typedef ::xsd::cxx::tree::traits< b_type, char > b_traits;

    const b_type&
    b () const;

    b_type&
    b ();

    void
    b (const b_type& x);

    void
    b (::std::auto_ptr< b_type > p);

    static const b_type&
    b_default_value ();

    // c
    //
    typedef ::test::int_ c_type;
    typedef ::xsd::cxx::tree::traits< c_type, char > c_traits;

    const c_type&
    c () const;

    c_type&
    c ();

    void
    c (const c_type& x);

    void
    c (::std::auto_ptr< c_type > p);

    static c_type
    c_default_value ();

    // d
    //
    typedef ::test::str d_type;
    typedef ::xsd::cxx::tree::traits< d_type, char > d_traits;

    const d_type&
    d () const;

    d_type&
    d ();

    void
    d (const d_type& x);

    void
    d (::std::auto_ptr< d_type > p);

    static const d_type&
    d_default_value ();

    // e
    //
    typedef ::test::union_derived e_type;
    typedef ::xsd::cxx::tree::traits< e_type, char > e_traits;

    const e_type&
    e () const;

    e_type&
    e ();

    void
    e (const e_type& x);

    void
    e (::std::auto_ptr< e_type > p);

    static const e_type&
    e_default_value ();

    // f
    //
    typedef ::test::list_derived f_type;
    typedef ::xsd::cxx::tree::traits< f_type, char > f_traits;

    const f_type&
    f () const;

    f_type&
    f ();

    void
    f (const f_type& x);

    void
    f (::std::auto_ptr< f_type > p);

    static const f_type&
    f_default_value ();

    // Constructors.
    //
    simple_test ();

    simple_test (const ::xercesc::DOMElement& e,
                 ::xml_schema::flags f = 0,
                 ::xml_schema::container* c = 0);

    simple_test (const simple_test& x,
                 ::xml_schema::flags f = 0,
                 ::xml_schema::container* c = 0);

    virtual simple_test*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    simple_test&
    operator= (const simple_test& x);

    virtual 
    ~simple_test ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< a_type > a_;
    ::xsd::cxx::tree::one< b_type > b_;
    static const b_type b_default_value_;
    ::xsd::cxx::tree::one< c_type > c_;
    ::xsd::cxx::tree::one< d_type > d_;
    static const d_type d_default_value_;
    ::xsd::cxx::tree::one< e_type > e_;
    static const e_type e_default_value_;
    ::xsd::cxx::tree::one< f_type > f_;
    static const f_type f_default_value_;
  };

  class date_derived: public ::xml_schema::date
  {
    public:
    // Constructors.
    //
    date_derived ();

    date_derived (const ::xml_schema::date&);

    date_derived (const ::xercesc::DOMElement& e,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

    date_derived (const ::xercesc::DOMAttr& a,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

    date_derived (const ::std::string& s,
                  const ::xercesc::DOMElement* e,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

    date_derived (const date_derived& x,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

    virtual date_derived*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    virtual 
    ~date_derived ();
  };

  class date_test: public ::xml_schema::type
  {
    public:
    // a
    //
    typedef ::xml_schema::date a_type;
    typedef ::xsd::cxx::tree::traits< a_type, char > a_traits;

    const a_type&
    a () const;

    a_type&
    a ();

    void
    a (const a_type& x);

    void
    a (::std::auto_ptr< a_type > p);

    static const a_type&
    a_default_value ();

    // b
    //
    typedef ::xml_schema::date b_type;
    typedef ::xsd::cxx::tree::traits< b_type, char > b_traits;

    const b_type&
    b () const;

    b_type&
    b ();

    void
    b (const b_type& x);

    void
    b (::std::auto_ptr< b_type > p);

    static const b_type&
    b_default_value ();

    // c
    //
    typedef ::xml_schema::date c_type;
    typedef ::xsd::cxx::tree::traits< c_type, char > c_traits;

    const c_type&
    c () const;

    c_type&
    c ();

    void
    c (const c_type& x);

    void
    c (::std::auto_ptr< c_type > p);

    static const c_type&
    c_default_value ();

    // d
    //
    typedef ::xml_schema::date d_type;
    typedef ::xsd::cxx::tree::traits< d_type, char > d_traits;

    const d_type&
    d () const;

    d_type&
    d ();

    void
    d (const d_type& x);

    void
    d (::std::auto_ptr< d_type > p);

    static const d_type&
    d_default_value ();

    // e
    //
    typedef ::xml_schema::date e_type;
    typedef ::xsd::cxx::tree::traits< e_type, char > e_traits;

    const e_type&
    e () const;

    e_type&
    e ();

    void
    e (const e_type& x);

    void
    e (::std::auto_ptr< e_type > p);

    static const e_type&
    e_default_value ();

    // f
    //
    typedef ::xml_schema::date f_type;
    typedef ::xsd::cxx::tree::traits< f_type, char > f_traits;

    const f_type&
    f () const;

    f_type&
    f ();

    void
    f (const f_type& x);

    void
    f (::std::auto_ptr< f_type > p);

    static const f_type&
    f_default_value ();

    // g
    //
    typedef ::test::date_derived g_type;
    typedef ::xsd::cxx::tree::traits< g_type, char > g_traits;

    const g_type&
    g () const;

    g_type&
    g ();

    void
    g (const g_type& x);

    void
    g (::std::auto_ptr< g_type > p);

    static const g_type&
    g_default_value ();

    // Constructors.
    //
    date_test ();

    date_test (const ::xercesc::DOMElement& e,
               ::xml_schema::flags f = 0,
               ::xml_schema::container* c = 0);

    date_test (const date_test& x,
               ::xml_schema::flags f = 0,
               ::xml_schema::container* c = 0);

    virtual date_test*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    date_test&
    operator= (const date_test& x);

    virtual 
    ~date_test ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< a_type > a_;
    static const a_type a_default_value_;
    ::xsd::cxx::tree::one< b_type > b_;
    static const b_type b_default_value_;
    ::xsd::cxx::tree::one< c_type > c_;
    static const c_type c_default_value_;
    ::xsd::cxx::tree::one< d_type > d_;
    static const d_type d_default_value_;
    ::xsd::cxx::tree::one< e_type > e_;
    static const e_type e_default_value_;
    ::xsd::cxx::tree::one< f_type > f_;
    static const f_type f_default_value_;
    ::xsd::cxx::tree::one< g_type > g_;
    static const g_type g_default_value_;
  };

  class time_test: public ::xml_schema::type
  {
    public:
    // a
    //
    typedef ::xml_schema::time a_type;
    typedef ::xsd::cxx::tree::traits< a_type, char > a_traits;

    const a_type&
    a () const;

    a_type&
    a ();

    void
    a (const a_type& x);

    void
    a (::std::auto_ptr< a_type > p);

    static const a_type&
    a_default_value ();

    // b
    //
    typedef ::xml_schema::time b_type;
    typedef ::xsd::cxx::tree::traits< b_type, char > b_traits;

    const b_type&
    b () const;

    b_type&
    b ();

    void
    b (const b_type& x);

    void
    b (::std::auto_ptr< b_type > p);

    static const b_type&
    b_default_value ();

    // c
    //
    typedef ::xml_schema::time c_type;
    typedef ::xsd::cxx::tree::traits< c_type, char > c_traits;

    const c_type&
    c () const;

    c_type&
    c ();

    void
    c (const c_type& x);

    void
    c (::std::auto_ptr< c_type > p);

    static const c_type&
    c_default_value ();

    // d
    //
    typedef ::xml_schema::time d_type;
    typedef ::xsd::cxx::tree::traits< d_type, char > d_traits;

    const d_type&
    d () const;

    d_type&
    d ();

    void
    d (const d_type& x);

    void
    d (::std::auto_ptr< d_type > p);

    static const d_type&
    d_default_value ();

    // e
    //
    typedef ::xml_schema::time e_type;
    typedef ::xsd::cxx::tree::traits< e_type, char > e_traits;

    const e_type&
    e () const;

    e_type&
    e ();

    void
    e (const e_type& x);

    void
    e (::std::auto_ptr< e_type > p);

    static const e_type&
    e_default_value ();

    // f
    //
    typedef ::xml_schema::time f_type;
    typedef ::xsd::cxx::tree::traits< f_type, char > f_traits;

    const f_type&
    f () const;

    f_type&
    f ();

    void
    f (const f_type& x);

    void
    f (::std::auto_ptr< f_type > p);

    static const f_type&
    f_default_value ();

    // Constructors.
    //
    time_test ();

    time_test (const ::xercesc::DOMElement& e,
               ::xml_schema::flags f = 0,
               ::xml_schema::container* c = 0);

    time_test (const time_test& x,
               ::xml_schema::flags f = 0,
               ::xml_schema::container* c = 0);

    virtual time_test*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    time_test&
    operator= (const time_test& x);

    virtual 
    ~time_test ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< a_type > a_;
    static const a_type a_default_value_;
    ::xsd::cxx::tree::one< b_type > b_;
    static const b_type b_default_value_;
    ::xsd::cxx::tree::one< c_type > c_;
    static const c_type c_default_value_;
    ::xsd::cxx::tree::one< d_type > d_;
    static const d_type d_default_value_;
    ::xsd::cxx::tree::one< e_type > e_;
    static const e_type e_default_value_;
    ::xsd::cxx::tree::one< f_type > f_;
    static const f_type f_default_value_;
  };

  class date_time_test: public ::xml_schema::type
  {
    public:
    // a
    //
    typedef ::xml_schema::date_time a_type;
    typedef ::xsd::cxx::tree::traits< a_type, char > a_traits;

    const a_type&
    a () const;

    a_type&
    a ();

    void
    a (const a_type& x);

    void
    a (::std::auto_ptr< a_type > p);

    static const a_type&
    a_default_value ();

    // b
    //
    typedef ::xml_schema::date_time b_type;
    typedef ::xsd::cxx::tree::traits< b_type, char > b_traits;

    const b_type&
    b () const;

    b_type&
    b ();

    void
    b (const b_type& x);

    void
    b (::std::auto_ptr< b_type > p);

    static const b_type&
    b_default_value ();

    // c
    //
    typedef ::xml_schema::date_time c_type;
    typedef ::xsd::cxx::tree::traits< c_type, char > c_traits;

    const c_type&
    c () const;

    c_type&
    c ();

    void
    c (const c_type& x);

    void
    c (::std::auto_ptr< c_type > p);

    static const c_type&
    c_default_value ();

    // Constructors.
    //
    date_time_test ();

    date_time_test (const ::xercesc::DOMElement& e,
                    ::xml_schema::flags f = 0,
                    ::xml_schema::container* c = 0);

    date_time_test (const date_time_test& x,
                    ::xml_schema::flags f = 0,
                    ::xml_schema::container* c = 0);

    virtual date_time_test*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    date_time_test&
    operator= (const date_time_test& x);

    virtual 
    ~date_time_test ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< a_type > a_;
    static const a_type a_default_value_;
    ::xsd::cxx::tree::one< b_type > b_;
    static const b_type b_default_value_;
    ::xsd::cxx::tree::one< c_type > c_;
    static const c_type c_default_value_;
  };

  class duration_test: public ::xml_schema::type
  {
    public:
    // a
    //
    typedef ::xml_schema::duration a_type;
    typedef ::xsd::cxx::tree::traits< a_type, char > a_traits;

    const a_type&
    a () const;

    a_type&
    a ();

    void
    a (const a_type& x);

    void
    a (::std::auto_ptr< a_type > p);

    static const a_type&
    a_default_value ();

    // b
    //
    typedef ::xml_schema::duration b_type;
    typedef ::xsd::cxx::tree::traits< b_type, char > b_traits;

    const b_type&
    b () const;

    b_type&
    b ();

    void
    b (const b_type& x);

    void
    b (::std::auto_ptr< b_type > p);

    static const b_type&
    b_default_value ();

    // c
    //
    typedef ::xml_schema::duration c_type;
    typedef ::xsd::cxx::tree::traits< c_type, char > c_traits;

    const c_type&
    c () const;

    c_type&
    c ();

    void
    c (const c_type& x);

    void
    c (::std::auto_ptr< c_type > p);

    static const c_type&
    c_default_value ();

    // d
    //
    typedef ::xml_schema::duration d_type;
    typedef ::xsd::cxx::tree::traits< d_type, char > d_traits;

    const d_type&
    d () const;

    d_type&
    d ();

    void
    d (const d_type& x);

    void
    d (::std::auto_ptr< d_type > p);

    static const d_type&
    d_default_value ();

    // e
    //
    typedef ::xml_schema::duration e_type;
    typedef ::xsd::cxx::tree::traits< e_type, char > e_traits;

    const e_type&
    e () const;

    e_type&
    e ();

    void
    e (const e_type& x);

    void
    e (::std::auto_ptr< e_type > p);

    static const e_type&
    e_default_value ();

    // f
    //
    typedef ::xml_schema::duration f_type;
    typedef ::xsd::cxx::tree::traits< f_type, char > f_traits;

    const f_type&
    f () const;

    f_type&
    f ();

    void
    f (const f_type& x);

    void
    f (::std::auto_ptr< f_type > p);

    static const f_type&
    f_default_value ();

    // g
    //
    typedef ::xml_schema::duration g_type;
    typedef ::xsd::cxx::tree::traits< g_type, char > g_traits;

    const g_type&
    g () const;

    g_type&
    g ();

    void
    g (const g_type& x);

    void
    g (::std::auto_ptr< g_type > p);

    static const g_type&
    g_default_value ();

    // Constructors.
    //
    duration_test ();

    duration_test (const ::xercesc::DOMElement& e,
                   ::xml_schema::flags f = 0,
                   ::xml_schema::container* c = 0);

    duration_test (const duration_test& x,
                   ::xml_schema::flags f = 0,
                   ::xml_schema::container* c = 0);

    virtual duration_test*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    duration_test&
    operator= (const duration_test& x);

    virtual 
    ~duration_test ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< a_type > a_;
    static const a_type a_default_value_;
    ::xsd::cxx::tree::one< b_type > b_;
    static const b_type b_default_value_;
    ::xsd::cxx::tree::one< c_type > c_;
    static const c_type c_default_value_;
    ::xsd::cxx::tree::one< d_type > d_;
    static const d_type d_default_value_;
    ::xsd::cxx::tree::one< e_type > e_;
    static const e_type e_default_value_;
    ::xsd::cxx::tree::one< f_type > f_;
    static const f_type f_default_value_;
    ::xsd::cxx::tree::one< g_type > g_;
    static const g_type g_default_value_;
  };

  class day_test: public ::xml_schema::type
  {
    public:
    // a
    //
    typedef ::xml_schema::gday a_type;
    typedef ::xsd::cxx::tree::traits< a_type, char > a_traits;

    const a_type&
    a () const;

    a_type&
    a ();

    void
    a (const a_type& x);

    void
    a (::std::auto_ptr< a_type > p);

    static const a_type&
    a_default_value ();

    // b
    //
    typedef ::xml_schema::gday b_type;
    typedef ::xsd::cxx::tree::traits< b_type, char > b_traits;

    const b_type&
    b () const;

    b_type&
    b ();

    void
    b (const b_type& x);

    void
    b (::std::auto_ptr< b_type > p);

    static const b_type&
    b_default_value ();

    // c
    //
    typedef ::xml_schema::gday c_type;
    typedef ::xsd::cxx::tree::traits< c_type, char > c_traits;

    const c_type&
    c () const;

    c_type&
    c ();

    void
    c (const c_type& x);

    void
    c (::std::auto_ptr< c_type > p);

    static const c_type&
    c_default_value ();

    // Constructors.
    //
    day_test ();

    day_test (const ::xercesc::DOMElement& e,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    day_test (const day_test& x,
              ::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0);

    virtual day_test*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    day_test&
    operator= (const day_test& x);

    virtual 
    ~day_test ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< a_type > a_;
    static const a_type a_default_value_;
    ::xsd::cxx::tree::one< b_type > b_;
    static const b_type b_default_value_;
    ::xsd::cxx::tree::one< c_type > c_;
    static const c_type c_default_value_;
  };

  class month_test: public ::xml_schema::type
  {
    public:
    // a
    //
    typedef ::xml_schema::gmonth a_type;
    typedef ::xsd::cxx::tree::traits< a_type, char > a_traits;

    const a_type&
    a () const;

    a_type&
    a ();

    void
    a (const a_type& x);

    void
    a (::std::auto_ptr< a_type > p);

    static const a_type&
    a_default_value ();

    // b
    //
    typedef ::xml_schema::gmonth b_type;
    typedef ::xsd::cxx::tree::traits< b_type, char > b_traits;

    const b_type&
    b () const;

    b_type&
    b ();

    void
    b (const b_type& x);

    void
    b (::std::auto_ptr< b_type > p);

    static const b_type&
    b_default_value ();

    // c
    //
    typedef ::xml_schema::gmonth c_type;
    typedef ::xsd::cxx::tree::traits< c_type, char > c_traits;

    const c_type&
    c () const;

    c_type&
    c ();

    void
    c (const c_type& x);

    void
    c (::std::auto_ptr< c_type > p);

    static const c_type&
    c_default_value ();

    // Constructors.
    //
    month_test ();

    month_test (const ::xercesc::DOMElement& e,
                ::xml_schema::flags f = 0,
                ::xml_schema::container* c = 0);

    month_test (const month_test& x,
                ::xml_schema::flags f = 0,
                ::xml_schema::container* c = 0);

    virtual month_test*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    month_test&
    operator= (const month_test& x);

    virtual 
    ~month_test ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< a_type > a_;
    static const a_type a_default_value_;
    ::xsd::cxx::tree::one< b_type > b_;
    static const b_type b_default_value_;
    ::xsd::cxx::tree::one< c_type > c_;
    static const c_type c_default_value_;
  };

  class year_test: public ::xml_schema::type
  {
    public:
    // a
    //
    typedef ::xml_schema::gyear a_type;
    typedef ::xsd::cxx::tree::traits< a_type, char > a_traits;

    const a_type&
    a () const;

    a_type&
    a ();

    void
    a (const a_type& x);

    void
    a (::std::auto_ptr< a_type > p);

    static const a_type&
    a_default_value ();

    // b
    //
    typedef ::xml_schema::gyear b_type;
    typedef ::xsd::cxx::tree::traits< b_type, char > b_traits;

    const b_type&
    b () const;

    b_type&
    b ();

    void
    b (const b_type& x);

    void
    b (::std::auto_ptr< b_type > p);

    static const b_type&
    b_default_value ();

    // c
    //
    typedef ::xml_schema::gyear c_type;
    typedef ::xsd::cxx::tree::traits< c_type, char > c_traits;

    const c_type&
    c () const;

    c_type&
    c ();

    void
    c (const c_type& x);

    void
    c (::std::auto_ptr< c_type > p);

    static const c_type&
    c_default_value ();

    // Constructors.
    //
    year_test ();

    year_test (const ::xercesc::DOMElement& e,
               ::xml_schema::flags f = 0,
               ::xml_schema::container* c = 0);

    year_test (const year_test& x,
               ::xml_schema::flags f = 0,
               ::xml_schema::container* c = 0);

    virtual year_test*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    year_test&
    operator= (const year_test& x);

    virtual 
    ~year_test ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< a_type > a_;
    static const a_type a_default_value_;
    ::xsd::cxx::tree::one< b_type > b_;
    static const b_type b_default_value_;
    ::xsd::cxx::tree::one< c_type > c_;
    static const c_type c_default_value_;
  };

  class month_day_test: public ::xml_schema::type
  {
    public:
    // a
    //
    typedef ::xml_schema::gmonth_day a_type;
    typedef ::xsd::cxx::tree::traits< a_type, char > a_traits;

    const a_type&
    a () const;

    a_type&
    a ();

    void
    a (const a_type& x);

    void
    a (::std::auto_ptr< a_type > p);

    static const a_type&
    a_default_value ();

    // b
    //
    typedef ::xml_schema::gmonth_day b_type;
    typedef ::xsd::cxx::tree::traits< b_type, char > b_traits;

    const b_type&
    b () const;

    b_type&
    b ();

    void
    b (const b_type& x);

    void
    b (::std::auto_ptr< b_type > p);

    static const b_type&
    b_default_value ();

    // c
    //
    typedef ::xml_schema::gmonth_day c_type;
    typedef ::xsd::cxx::tree::traits< c_type, char > c_traits;

    const c_type&
    c () const;

    c_type&
    c ();

    void
    c (const c_type& x);

    void
    c (::std::auto_ptr< c_type > p);

    static const c_type&
    c_default_value ();

    // Constructors.
    //
    month_day_test ();

    month_day_test (const ::xercesc::DOMElement& e,
                    ::xml_schema::flags f = 0,
                    ::xml_schema::container* c = 0);

    month_day_test (const month_day_test& x,
                    ::xml_schema::flags f = 0,
                    ::xml_schema::container* c = 0);

    virtual month_day_test*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    month_day_test&
    operator= (const month_day_test& x);

    virtual 
    ~month_day_test ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< a_type > a_;
    static const a_type a_default_value_;
    ::xsd::cxx::tree::one< b_type > b_;
    static const b_type b_default_value_;
    ::xsd::cxx::tree::one< c_type > c_;
    static const c_type c_default_value_;
  };

  class year_month_test: public ::xml_schema::type
  {
    public:
    // a
    //
    typedef ::xml_schema::gyear_month a_type;
    typedef ::xsd::cxx::tree::traits< a_type, char > a_traits;

    const a_type&
    a () const;

    a_type&
    a ();

    void
    a (const a_type& x);

    void
    a (::std::auto_ptr< a_type > p);

    static const a_type&
    a_default_value ();

    // b
    //
    typedef ::xml_schema::gyear_month b_type;
    typedef ::xsd::cxx::tree::traits< b_type, char > b_traits;

    const b_type&
    b () const;

    b_type&
    b ();

    void
    b (const b_type& x);

    void
    b (::std::auto_ptr< b_type > p);

    static const b_type&
    b_default_value ();

    // c
    //
    typedef ::xml_schema::gyear_month c_type;
    typedef ::xsd::cxx::tree::traits< c_type, char > c_traits;

    const c_type&
    c () const;

    c_type&
    c ();

    void
    c (const c_type& x);

    void
    c (::std::auto_ptr< c_type > p);

    static const c_type&
    c_default_value ();

    // Constructors.
    //
    year_month_test ();

    year_month_test (const ::xercesc::DOMElement& e,
                     ::xml_schema::flags f = 0,
                     ::xml_schema::container* c = 0);

    year_month_test (const year_month_test& x,
                     ::xml_schema::flags f = 0,
                     ::xml_schema::container* c = 0);

    virtual year_month_test*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    year_month_test&
    operator= (const year_month_test& x);

    virtual 
    ~year_month_test ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< a_type > a_;
    static const a_type a_default_value_;
    ::xsd::cxx::tree::one< b_type > b_;
    static const b_type b_default_value_;
    ::xsd::cxx::tree::one< c_type > c_;
    static const c_type c_default_value_;
  };

  class type: public ::xml_schema::type
  {
    public:
    // union
    //
    typedef ::test::union_test union_type;
    typedef ::xsd::cxx::tree::traits< union_type, char > union_traits;

    const union_type&
    union_ () const;

    union_type&
    union_ ();

    void
    union_ (const union_type& x);

    void
    union_ (::std::auto_ptr< union_type > p);

    // list
    //
    typedef ::test::list_test list_type;
    typedef ::xsd::cxx::tree::traits< list_type, char > list_traits;

    const list_type&
    list () const;

    list_type&
    list ();

    void
    list (const list_type& x);

    void
    list (::std::auto_ptr< list_type > p);

    // simple
    //
    typedef ::test::simple_test simple_type;
    typedef ::xsd::cxx::tree::traits< simple_type, char > simple_traits;

    const simple_type&
    simple () const;

    simple_type&
    simple ();

    void
    simple (const simple_type& x);

    void
    simple (::std::auto_ptr< simple_type > p);

    // date
    //
    typedef ::test::date_test date_type;
    typedef ::xsd::cxx::tree::traits< date_type, char > date_traits;

    const date_type&
    date () const;

    date_type&
    date ();

    void
    date (const date_type& x);

    void
    date (::std::auto_ptr< date_type > p);

    // time
    //
    typedef ::test::time_test time_type;
    typedef ::xsd::cxx::tree::traits< time_type, char > time_traits;

    const time_type&
    time () const;

    time_type&
    time ();

    void
    time (const time_type& x);

    void
    time (::std::auto_ptr< time_type > p);

    // date-time
    //
    typedef ::test::date_time_test date_time_type;
    typedef ::xsd::cxx::tree::traits< date_time_type, char > date_time_traits;

    const date_time_type&
    date_time () const;

    date_time_type&
    date_time ();

    void
    date_time (const date_time_type& x);

    void
    date_time (::std::auto_ptr< date_time_type > p);

    // duration
    //
    typedef ::test::duration_test duration_type;
    typedef ::xsd::cxx::tree::traits< duration_type, char > duration_traits;

    const duration_type&
    duration () const;

    duration_type&
    duration ();

    void
    duration (const duration_type& x);

    void
    duration (::std::auto_ptr< duration_type > p);

    // day
    //
    typedef ::test::day_test day_type;
    typedef ::xsd::cxx::tree::traits< day_type, char > day_traits;

    const day_type&
    day () const;

    day_type&
    day ();

    void
    day (const day_type& x);

    void
    day (::std::auto_ptr< day_type > p);

    // month
    //
    typedef ::test::month_test month_type;
    typedef ::xsd::cxx::tree::traits< month_type, char > month_traits;

    const month_type&
    month () const;

    month_type&
    month ();

    void
    month (const month_type& x);

    void
    month (::std::auto_ptr< month_type > p);

    // year
    //
    typedef ::test::year_test year_type;
    typedef ::xsd::cxx::tree::traits< year_type, char > year_traits;

    const year_type&
    year () const;

    year_type&
    year ();

    void
    year (const year_type& x);

    void
    year (::std::auto_ptr< year_type > p);

    // month-day
    //
    typedef ::test::month_day_test month_day_type;
    typedef ::xsd::cxx::tree::traits< month_day_type, char > month_day_traits;

    const month_day_type&
    month_day () const;

    month_day_type&
    month_day ();

    void
    month_day (const month_day_type& x);

    void
    month_day (::std::auto_ptr< month_day_type > p);

    // year-month
    //
    typedef ::test::year_month_test year_month_type;
    typedef ::xsd::cxx::tree::traits< year_month_type, char > year_month_traits;

    const year_month_type&
    year_month () const;

    year_month_type&
    year_month ();

    void
    year_month (const year_month_type& x);

    void
    year_month (::std::auto_ptr< year_month_type > p);

    // bool1
    //
    typedef ::xml_schema::boolean bool1_type;
    typedef ::xsd::cxx::tree::traits< bool1_type, char > bool1_traits;

    const bool1_type&
    bool1 () const;

    bool1_type&
    bool1 ();

    void
    bool1 (const bool1_type& x);

    static bool1_type
    bool1_default_value ();

    // bool2
    //
    typedef ::xml_schema::boolean bool2_type;
    typedef ::xsd::cxx::tree::traits< bool2_type, char > bool2_traits;

    const bool2_type&
    bool2 () const;

    bool2_type&
    bool2 ();

    void
    bool2 (const bool2_type& x);

    static bool2_type
    bool2_default_value ();

    // bool3
    //
    typedef ::xml_schema::boolean bool3_type;
    typedef ::xsd::cxx::tree::traits< bool3_type, char > bool3_traits;

    const bool3_type&
    bool3 () const;

    bool3_type&
    bool3 ();

    void
    bool3 (const bool3_type& x);

    static bool3_type
    bool3_default_value ();

    // bool4
    //
    typedef ::xml_schema::boolean bool4_type;
    typedef ::xsd::cxx::tree::traits< bool4_type, char > bool4_traits;

    const bool4_type&
    bool4 () const;

    bool4_type&
    bool4 ();

    void
    bool4 (const bool4_type& x);

    static bool4_type
    bool4_default_value ();

    // byte
    //
    typedef ::xml_schema::byte byte_type;
    typedef ::xsd::cxx::tree::traits< byte_type, char > byte_traits;

    const byte_type&
    byte () const;

    byte_type&
    byte ();

    void
    byte (const byte_type& x);

    static byte_type
    byte_default_value ();

    // ubyte
    //
    typedef ::xml_schema::unsigned_byte ubyte_type;
    typedef ::xsd::cxx::tree::traits< ubyte_type, char > ubyte_traits;

    const ubyte_type&
    ubyte () const;

    ubyte_type&
    ubyte ();

    void
    ubyte (const ubyte_type& x);

    static ubyte_type
    ubyte_default_value ();

    // short
    //
    typedef ::xml_schema::short_ short_type;
    typedef ::xsd::cxx::tree::traits< short_type, char > short_traits;

    const short_type&
    short_ () const;

    short_type&
    short_ ();

    void
    short_ (const short_type& x);

    static short_type
    short_default_value ();

    // ushort
    //
    typedef ::xml_schema::unsigned_short ushort_type;
    typedef ::xsd::cxx::tree::traits< ushort_type, char > ushort_traits;

    const ushort_type&
    ushort () const;

    ushort_type&
    ushort ();

    void
    ushort (const ushort_type& x);

    static ushort_type
    ushort_default_value ();

    // int
    //
    typedef ::xml_schema::int_ int_type;
    typedef ::xsd::cxx::tree::traits< int_type, char > int_traits;

    const int_type&
    int_ () const;

    int_type&
    int_ ();

    void
    int_ (const int_type& x);

    static int_type
    int_default_value ();

    // uint
    //
    typedef ::xml_schema::unsigned_int uint_type;
    typedef ::xsd::cxx::tree::traits< uint_type, char > uint_traits;

    const uint_type&
    uint () const;

    uint_type&
    uint ();

    void
    uint (const uint_type& x);

    static uint_type
    uint_default_value ();

    // long
    //
    typedef ::xml_schema::long_ long_type;
    typedef ::xsd::cxx::tree::traits< long_type, char > long_traits;

    const long_type&
    long_ () const;

    long_type&
    long_ ();

    void
    long_ (const long_type& x);

    static long_type
    long_default_value ();

    // ulong
    //
    typedef ::xml_schema::unsigned_long ulong_type;
    typedef ::xsd::cxx::tree::traits< ulong_type, char > ulong_traits;

    const ulong_type&
    ulong () const;

    ulong_type&
    ulong ();

    void
    ulong (const ulong_type& x);

    static ulong_type
    ulong_default_value ();

    // integer
    //
    typedef ::xml_schema::integer integer_type;
    typedef ::xsd::cxx::tree::traits< integer_type, char > integer_traits;

    const integer_type&
    integer () const;

    integer_type&
    integer ();

    void
    integer (const integer_type& x);

    static integer_type
    integer_default_value ();

    // npinteger
    //
    typedef ::xml_schema::non_positive_integer npinteger_type;
    typedef ::xsd::cxx::tree::traits< npinteger_type, char > npinteger_traits;

    const npinteger_type&
    npinteger () const;

    npinteger_type&
    npinteger ();

    void
    npinteger (const npinteger_type& x);

    static npinteger_type
    npinteger_default_value ();

    // nninteger
    //
    typedef ::xml_schema::non_negative_integer nninteger_type;
    typedef ::xsd::cxx::tree::traits< nninteger_type, char > nninteger_traits;

    const nninteger_type&
    nninteger () const;

    nninteger_type&
    nninteger ();

    void
    nninteger (const nninteger_type& x);

    static nninteger_type
    nninteger_default_value ();

    // pinteger
    //
    typedef ::xml_schema::positive_integer pinteger_type;
    typedef ::xsd::cxx::tree::traits< pinteger_type, char > pinteger_traits;

    const pinteger_type&
    pinteger () const;

    pinteger_type&
    pinteger ();

    void
    pinteger (const pinteger_type& x);

    static pinteger_type
    pinteger_default_value ();

    // ninteger
    //
    typedef ::xml_schema::negative_integer ninteger_type;
    typedef ::xsd::cxx::tree::traits< ninteger_type, char > ninteger_traits;

    const ninteger_type&
    ninteger () const;

    ninteger_type&
    ninteger ();

    void
    ninteger (const ninteger_type& x);

    static ninteger_type
    ninteger_default_value ();

    // float1
    //
    typedef ::xml_schema::float_ float1_type;
    typedef ::xsd::cxx::tree::traits< float1_type, char > float1_traits;

    const float1_type&
    float1 () const;

    float1_type&
    float1 ();

    void
    float1 (const float1_type& x);

    static float1_type
    float1_default_value ();

    // float2
    //
    typedef ::xml_schema::float_ float2_type;
    typedef ::xsd::cxx::tree::traits< float2_type, char > float2_traits;

    const float2_type&
    float2 () const;

    float2_type&
    float2 ();

    void
    float2 (const float2_type& x);

    static float2_type
    float2_default_value ();

    // float3
    //
    typedef ::xml_schema::float_ float3_type;
    typedef ::xsd::cxx::tree::traits< float3_type, char > float3_traits;

    const float3_type&
    float3 () const;

    float3_type&
    float3 ();

    void
    float3 (const float3_type& x);

    static float3_type
    float3_default_value ();

    // float4
    //
    typedef ::xml_schema::float_ float4_type;
    typedef ::xsd::cxx::tree::traits< float4_type, char > float4_traits;

    const float4_type&
    float4 () const;

    float4_type&
    float4 ();

    void
    float4 (const float4_type& x);

    static float4_type
    float4_default_value ();

    // float5
    //
    typedef ::xml_schema::float_ float5_type;
    typedef ::xsd::cxx::tree::traits< float5_type, char > float5_traits;

    const float5_type&
    float5 () const;

    float5_type&
    float5 ();

    void
    float5 (const float5_type& x);

    static float5_type
    float5_default_value ();

    // double1
    //
    typedef ::xml_schema::double_ double1_type;
    typedef ::xsd::cxx::tree::traits< double1_type, char, ::xsd::cxx::tree::schema_type::double_ > double1_traits;

    const double1_type&
    double1 () const;

    double1_type&
    double1 ();

    void
    double1 (const double1_type& x);

    static double1_type
    double1_default_value ();

    // double2
    //
    typedef ::xml_schema::double_ double2_type;
    typedef ::xsd::cxx::tree::traits< double2_type, char, ::xsd::cxx::tree::schema_type::double_ > double2_traits;

    const double2_type&
    double2 () const;

    double2_type&
    double2 ();

    void
    double2 (const double2_type& x);

    static double2_type
    double2_default_value ();

    // double3
    //
    typedef ::xml_schema::double_ double3_type;
    typedef ::xsd::cxx::tree::traits< double3_type, char, ::xsd::cxx::tree::schema_type::double_ > double3_traits;

    const double3_type&
    double3 () const;

    double3_type&
    double3 ();

    void
    double3 (const double3_type& x);

    static double3_type
    double3_default_value ();

    // double4
    //
    typedef ::xml_schema::double_ double4_type;
    typedef ::xsd::cxx::tree::traits< double4_type, char, ::xsd::cxx::tree::schema_type::double_ > double4_traits;

    const double4_type&
    double4 () const;

    double4_type&
    double4 ();

    void
    double4 (const double4_type& x);

    static double4_type
    double4_default_value ();

    // double5
    //
    typedef ::xml_schema::double_ double5_type;
    typedef ::xsd::cxx::tree::traits< double5_type, char, ::xsd::cxx::tree::schema_type::double_ > double5_traits;

    const double5_type&
    double5 () const;

    double5_type&
    double5 ();

    void
    double5 (const double5_type& x);

    static double5_type
    double5_default_value ();

    // decimal1
    //
    typedef ::xml_schema::decimal decimal1_type;
    typedef ::xsd::cxx::tree::traits< decimal1_type, char, ::xsd::cxx::tree::schema_type::decimal > decimal1_traits;

    const decimal1_type&
    decimal1 () const;

    decimal1_type&
    decimal1 ();

    void
    decimal1 (const decimal1_type& x);

    static decimal1_type
    decimal1_default_value ();

    // decimal2
    //
    typedef ::xml_schema::decimal decimal2_type;
    typedef ::xsd::cxx::tree::traits< decimal2_type, char, ::xsd::cxx::tree::schema_type::decimal > decimal2_traits;

    const decimal2_type&
    decimal2 () const;

    decimal2_type&
    decimal2 ();

    void
    decimal2 (const decimal2_type& x);

    static decimal2_type
    decimal2_default_value ();

    // string1
    //
    typedef ::xml_schema::string string1_type;
    typedef ::xsd::cxx::tree::traits< string1_type, char > string1_traits;

    const string1_type&
    string1 () const;

    string1_type&
    string1 ();

    void
    string1 (const string1_type& x);

    void
    string1 (::std::auto_ptr< string1_type > p);

    static const string1_type&
    string1_default_value ();

    // string2
    //
    typedef ::xml_schema::string string2_type;
    typedef ::xsd::cxx::tree::traits< string2_type, char > string2_traits;

    const string2_type&
    string2 () const;

    string2_type&
    string2 ();

    void
    string2 (const string2_type& x);

    void
    string2 (::std::auto_ptr< string2_type > p);

    static const string2_type&
    string2_default_value ();

    // nstring
    //
    typedef ::xml_schema::normalized_string nstring_type;
    typedef ::xsd::cxx::tree::traits< nstring_type, char > nstring_traits;

    const nstring_type&
    nstring () const;

    nstring_type&
    nstring ();

    void
    nstring (const nstring_type& x);

    void
    nstring (::std::auto_ptr< nstring_type > p);

    static const nstring_type&
    nstring_default_value ();

    // token
    //
    typedef ::xml_schema::token token_type;
    typedef ::xsd::cxx::tree::traits< token_type, char > token_traits;

    const token_type&
    token () const;

    token_type&
    token ();

    void
    token (const token_type& x);

    void
    token (::std::auto_ptr< token_type > p);

    static const token_type&
    token_default_value ();

    // nmtoken
    //
    typedef ::xml_schema::nmtoken nmtoken_type;
    typedef ::xsd::cxx::tree::traits< nmtoken_type, char > nmtoken_traits;

    const nmtoken_type&
    nmtoken () const;

    nmtoken_type&
    nmtoken ();

    void
    nmtoken (const nmtoken_type& x);

    void
    nmtoken (::std::auto_ptr< nmtoken_type > p);

    static const nmtoken_type&
    nmtoken_default_value ();

    // nmtokens1
    //
    typedef ::xml_schema::nmtokens nmtokens1_type;
    typedef ::xsd::cxx::tree::traits< nmtokens1_type, char > nmtokens1_traits;

    const nmtokens1_type&
    nmtokens1 () const;

    nmtokens1_type&
    nmtokens1 ();

    void
    nmtokens1 (const nmtokens1_type& x);

    void
    nmtokens1 (::std::auto_ptr< nmtokens1_type > p);

    static const nmtokens1_type&
    nmtokens1_default_value ();

    // nmtokens2
    //
    typedef ::xml_schema::nmtokens nmtokens2_type;
    typedef ::xsd::cxx::tree::traits< nmtokens2_type, char > nmtokens2_traits;

    const nmtokens2_type&
    nmtokens2 () const;

    nmtokens2_type&
    nmtokens2 ();

    void
    nmtokens2 (const nmtokens2_type& x);

    void
    nmtokens2 (::std::auto_ptr< nmtokens2_type > p);

    static const nmtokens2_type&
    nmtokens2_default_value ();

    // ncname
    //
    typedef ::xml_schema::ncname ncname_type;
    typedef ::xsd::cxx::tree::traits< ncname_type, char > ncname_traits;

    const ncname_type&
    ncname () const;

    ncname_type&
    ncname ();

    void
    ncname (const ncname_type& x);

    void
    ncname (::std::auto_ptr< ncname_type > p);

    static const ncname_type&
    ncname_default_value ();

    // language
    //
    typedef ::xml_schema::language language_type;
    typedef ::xsd::cxx::tree::traits< language_type, char > language_traits;

    const language_type&
    language () const;

    language_type&
    language ();

    void
    language (const language_type& x);

    void
    language (::std::auto_ptr< language_type > p);

    static const language_type&
    language_default_value ();

    // id
    //
    typedef ::xml_schema::id id_type;
    typedef ::xsd::cxx::tree::optional< id_type > id_optional;
    typedef ::xsd::cxx::tree::traits< id_type, char > id_traits;

    const id_optional&
    id () const;

    id_optional&
    id ();

    void
    id (const id_type& x);

    void
    id (const id_optional& x);

    void
    id (::std::auto_ptr< id_type > p);

    // idref
    //
    typedef ::xml_schema::idref idref_type;
    typedef ::xsd::cxx::tree::traits< idref_type, char > idref_traits;

    const idref_type&
    idref () const;

    idref_type&
    idref ();

    void
    idref (const idref_type& x);

    void
    idref (::std::auto_ptr< idref_type > p);

    static const idref_type&
    idref_default_value ();

    // idrefs
    //
    typedef ::xml_schema::idrefs idrefs_type;
    typedef ::xsd::cxx::tree::traits< idrefs_type, char > idrefs_traits;

    const idrefs_type&
    idrefs () const;

    idrefs_type&
    idrefs ();

    void
    idrefs (const idrefs_type& x);

    void
    idrefs (::std::auto_ptr< idrefs_type > p);

    static const idrefs_type&
    idrefs_default_value ();

    // uri
    //
    typedef ::xml_schema::uri uri_type;
    typedef ::xsd::cxx::tree::traits< uri_type, char > uri_traits;

    const uri_type&
    uri () const;

    uri_type&
    uri ();

    void
    uri (const uri_type& x);

    void
    uri (::std::auto_ptr< uri_type > p);

    static const uri_type&
    uri_default_value ();

    // qname1
    //
    typedef ::xml_schema::qname qname1_type;
    typedef ::xsd::cxx::tree::traits< qname1_type, char > qname1_traits;

    const qname1_type&
    qname1 () const;

    qname1_type&
    qname1 ();

    void
    qname1 (const qname1_type& x);

    void
    qname1 (::std::auto_ptr< qname1_type > p);

    static const qname1_type&
    qname1_default_value ();

    // qname2
    //
    typedef ::xml_schema::qname qname2_type;
    typedef ::xsd::cxx::tree::traits< qname2_type, char > qname2_traits;

    const qname2_type&
    qname2 () const;

    qname2_type&
    qname2 ();

    void
    qname2 (const qname2_type& x);

    void
    qname2 (::std::auto_ptr< qname2_type > p);

    static const qname2_type&
    qname2_default_value ();

    // base64_bin1
    //
    typedef ::xml_schema::base64_binary base64_bin1_type;
    typedef ::xsd::cxx::tree::traits< base64_bin1_type, char > base64_bin1_traits;

    const base64_bin1_type&
    base64_bin1 () const;

    base64_bin1_type&
    base64_bin1 ();

    void
    base64_bin1 (const base64_bin1_type& x);

    void
    base64_bin1 (::std::auto_ptr< base64_bin1_type > p);

    static const base64_bin1_type&
    base64_bin1_default_value ();

    // base64_bin2
    //
    typedef ::xml_schema::base64_binary base64_bin2_type;
    typedef ::xsd::cxx::tree::traits< base64_bin2_type, char > base64_bin2_traits;

    const base64_bin2_type&
    base64_bin2 () const;

    base64_bin2_type&
    base64_bin2 ();

    void
    base64_bin2 (const base64_bin2_type& x);

    void
    base64_bin2 (::std::auto_ptr< base64_bin2_type > p);

    static const base64_bin2_type&
    base64_bin2_default_value ();

    // hex_bin1
    //
    typedef ::xml_schema::hex_binary hex_bin1_type;
    typedef ::xsd::cxx::tree::traits< hex_bin1_type, char > hex_bin1_traits;

    const hex_bin1_type&
    hex_bin1 () const;

    hex_bin1_type&
    hex_bin1 ();

    void
    hex_bin1 (const hex_bin1_type& x);

    void
    hex_bin1 (::std::auto_ptr< hex_bin1_type > p);

    static const hex_bin1_type&
    hex_bin1_default_value ();

    // hex_bin2
    //
    typedef ::xml_schema::hex_binary hex_bin2_type;
    typedef ::xsd::cxx::tree::traits< hex_bin2_type, char > hex_bin2_traits;

    const hex_bin2_type&
    hex_bin2 () const;

    hex_bin2_type&
    hex_bin2 ();

    void
    hex_bin2 (const hex_bin2_type& x);

    void
    hex_bin2 (::std::auto_ptr< hex_bin2_type > p);

    static const hex_bin2_type&
    hex_bin2_default_value ();

    // fix1
    //
    typedef ::xml_schema::int_ fix1_type;
    typedef ::xsd::cxx::tree::traits< fix1_type, char > fix1_traits;

    const fix1_type&
    fix1 () const;

    static fix1_type
    fix1_default_value ();

    // fix2
    //
    typedef ::xml_schema::int_ fix2_type;
    typedef ::xsd::cxx::tree::traits< fix2_type, char > fix2_traits;

    const fix2_type&
    fix2 () const;

    static fix2_type
    fix2_default_value ();

    // fix3
    //
    typedef ::xml_schema::string fix3_type;
    typedef ::xsd::cxx::tree::traits< fix3_type, char > fix3_traits;

    const fix3_type&
    fix3 () const;

    static const fix3_type&
    fix3_default_value ();

    // fix4
    //
    typedef ::xml_schema::string fix4_type;
    typedef ::xsd::cxx::tree::traits< fix4_type, char > fix4_traits;

    const fix4_type&
    fix4 () const;

    static const fix4_type&
    fix4_default_value ();

    // fix5
    //
    typedef ::xml_schema::nmtokens fix5_type;
    typedef ::xsd::cxx::tree::traits< fix5_type, char > fix5_traits;

    const fix5_type&
    fix5 () const;

    static const fix5_type&
    fix5_default_value ();

    // fix6
    //
    typedef ::xml_schema::nmtokens fix6_type;
    typedef ::xsd::cxx::tree::traits< fix6_type, char > fix6_traits;

    const fix6_type&
    fix6 () const;

    static const fix6_type&
    fix6_default_value ();

    // Constructors.
    //
    type ();

    type (const union_type&,
          const list_type&,
          const simple_type&,
          const date_type&,
          const time_type&,
          const date_time_type&,
          const duration_type&,
          const day_type&,
          const month_type&,
          const year_type&,
          const month_day_type&,
          const year_month_type&);

    type (::std::auto_ptr< union_type >,
          ::std::auto_ptr< list_type >,
          ::std::auto_ptr< simple_type >,
          ::std::auto_ptr< date_type >,
          ::std::auto_ptr< time_type >,
          ::std::auto_ptr< date_time_type >,
          ::std::auto_ptr< duration_type >,
          ::std::auto_ptr< day_type >,
          ::std::auto_ptr< month_type >,
          ::std::auto_ptr< year_type >,
          ::std::auto_ptr< month_day_type >,
          ::std::auto_ptr< year_month_type >);

    type (const ::xercesc::DOMElement& e,
          ::xml_schema::flags f = 0,
          ::xml_schema::container* c = 0);

    type (const type& x,
          ::xml_schema::flags f = 0,
          ::xml_schema::container* c = 0);

    virtual type*
    _clone (::xml_schema::flags f = 0,
            ::xml_schema::container* c = 0) const;

    type&
    operator= (const type& x);

    virtual 
    ~type ();

    // Implementation.
    //
    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::flags);

    protected:
    ::xsd::cxx::tree::one< union_type > union__;
    ::xsd::cxx::tree::one< list_type > list_;
    ::xsd::cxx::tree::one< simple_type > simple_;
    ::xsd::cxx::tree::one< date_type > date_;
    ::xsd::cxx::tree::one< time_type > time_;
    ::xsd::cxx::tree::one< date_time_type > date_time_;
    ::xsd::cxx::tree::one< duration_type > duration_;
    ::xsd::cxx::tree::one< day_type > day_;
    ::xsd::cxx::tree::one< month_type > month_;
    ::xsd::cxx::tree::one< year_type > year_;
    ::xsd::cxx::tree::one< month_day_type > month_day_;
    ::xsd::cxx::tree::one< year_month_type > year_month_;
    ::xsd::cxx::tree::one< bool1_type > bool1_;
    ::xsd::cxx::tree::one< bool2_type > bool2_;
    ::xsd::cxx::tree::one< bool3_type > bool3_;
    ::xsd::cxx::tree::one< bool4_type > bool4_;
    ::xsd::cxx::tree::one< byte_type > byte_;
    ::xsd::cxx::tree::one< ubyte_type > ubyte_;
    ::xsd::cxx::tree::one< short_type > short__;
    ::xsd::cxx::tree::one< ushort_type > ushort_;
    ::xsd::cxx::tree::one< int_type > int__;
    ::xsd::cxx::tree::one< uint_type > uint_;
    ::xsd::cxx::tree::one< long_type > long__;
    ::xsd::cxx::tree::one< ulong_type > ulong_;
    ::xsd::cxx::tree::one< integer_type > integer_;
    ::xsd::cxx::tree::one< npinteger_type > npinteger_;
    ::xsd::cxx::tree::one< nninteger_type > nninteger_;
    ::xsd::cxx::tree::one< pinteger_type > pinteger_;
    ::xsd::cxx::tree::one< ninteger_type > ninteger_;
    ::xsd::cxx::tree::one< float1_type > float1_;
    ::xsd::cxx::tree::one< float2_type > float2_;
    ::xsd::cxx::tree::one< float3_type > float3_;
    ::xsd::cxx::tree::one< float4_type > float4_;
    ::xsd::cxx::tree::one< float5_type > float5_;
    ::xsd::cxx::tree::one< double1_type > double1_;
    ::xsd::cxx::tree::one< double2_type > double2_;
    ::xsd::cxx::tree::one< double3_type > double3_;
    ::xsd::cxx::tree::one< double4_type > double4_;
    ::xsd::cxx::tree::one< double5_type > double5_;
    ::xsd::cxx::tree::one< decimal1_type > decimal1_;
    ::xsd::cxx::tree::one< decimal2_type > decimal2_;
    ::xsd::cxx::tree::one< string1_type > string1_;
    static const string1_type string1_default_value_;
    ::xsd::cxx::tree::one< string2_type > string2_;
    static const string2_type string2_default_value_;
    ::xsd::cxx::tree::one< nstring_type > nstring_;
    static const nstring_type nstring_default_value_;
    ::xsd::cxx::tree::one< token_type > token_;
    static const token_type token_default_value_;
    ::xsd::cxx::tree::one< nmtoken_type > nmtoken_;
    static const nmtoken_type nmtoken_default_value_;
    ::xsd::cxx::tree::one< nmtokens1_type > nmtokens1_;
    static const nmtokens1_type nmtokens1_default_value_;
    ::xsd::cxx::tree::one< nmtokens2_type > nmtokens2_;
    static const nmtokens2_type nmtokens2_default_value_;
    ::xsd::cxx::tree::one< ncname_type > ncname_;
    static const ncname_type ncname_default_value_;
    ::xsd::cxx::tree::one< language_type > language_;
    static const language_type language_default_value_;
    id_optional id_;
    ::xsd::cxx::tree::one< idref_type > idref_;
    static const idref_type idref_default_value_;
    ::xsd::cxx::tree::one< idrefs_type > idrefs_;
    static const idrefs_type idrefs_default_value_;
    ::xsd::cxx::tree::one< uri_type > uri_;
    static const uri_type uri_default_value_;
    ::xsd::cxx::tree::one< qname1_type > qname1_;
    static const qname1_type qname1_default_value_;
    ::xsd::cxx::tree::one< qname2_type > qname2_;
    static const qname2_type qname2_default_value_;
    ::xsd::cxx::tree::one< base64_bin1_type > base64_bin1_;
    static const base64_bin1_type base64_bin1_default_value_;
    ::xsd::cxx::tree::one< base64_bin2_type > base64_bin2_;
    static const base64_bin2_type base64_bin2_default_value_;
    ::xsd::cxx::tree::one< hex_bin1_type > hex_bin1_;
    static const hex_bin1_type hex_bin1_default_value_;
    ::xsd::cxx::tree::one< hex_bin2_type > hex_bin2_;
    static const hex_bin2_type hex_bin2_default_value_;
    ::xsd::cxx::tree::one< fix1_type > fix1_;
    ::xsd::cxx::tree::one< fix2_type > fix2_;
    ::xsd::cxx::tree::one< fix3_type > fix3_;
    static const fix3_type fix3_default_value_;
    ::xsd::cxx::tree::one< fix4_type > fix4_;
    static const fix4_type fix4_default_value_;
    ::xsd::cxx::tree::one< fix5_type > fix5_;
    static const fix5_type fix5_default_value_;
    ::xsd::cxx::tree::one< fix6_type > fix6_;
    static const fix6_type fix6_default_value_;
  };
}

#ifndef XSD_DONT_INCLUDE_INLINE

#endif // XSD_DONT_INCLUDE_INLINE

#include <iosfwd>

namespace test
{
  ::std::ostream&
  operator<< (::std::ostream&, const union_&);

  ::std::ostream&
  operator<< (::std::ostream&, const union_test&);

  ::std::ostream&
  operator<< (::std::ostream&, const fix_list&);

  ::std::ostream&
  operator<< (::std::ostream&, const var_list&);

  ::std::ostream&
  operator<< (::std::ostream&, const list_item&);

  ::std::ostream&
  operator<< (::std::ostream&, const usr_list&);

  ::std::ostream&
  operator<< (::std::ostream&, const union_list&);

  ::std::ostream&
  operator<< (::std::ostream&, const list_test&);

  ::std::ostream&
  operator<< (::std::ostream&, const int_base&);

  ::std::ostream&
  operator<< (::std::ostream&, const str_base&);

  ::std::ostream&
  operator<< (::std::ostream&, const int_&);

  ::std::ostream&
  operator<< (::std::ostream&, const str&);

  ::std::ostream&
  operator<< (::std::ostream&, const union_derived&);

  ::std::ostream&
  operator<< (::std::ostream&, const list_derived&);

  ::std::ostream&
  operator<< (::std::ostream&, const simple_test&);

  ::std::ostream&
  operator<< (::std::ostream&, const date_derived&);

  ::std::ostream&
  operator<< (::std::ostream&, const date_test&);

  ::std::ostream&
  operator<< (::std::ostream&, const time_test&);

  ::std::ostream&
  operator<< (::std::ostream&, const date_time_test&);

  ::std::ostream&
  operator<< (::std::ostream&, const duration_test&);

  ::std::ostream&
  operator<< (::std::ostream&, const day_test&);

  ::std::ostream&
  operator<< (::std::ostream&, const month_test&);

  ::std::ostream&
  operator<< (::std::ostream&, const year_test&);

  ::std::ostream&
  operator<< (::std::ostream&, const month_day_test&);

  ::std::ostream&
  operator<< (::std::ostream&, const year_month_test&);

  ::std::ostream&
  operator<< (::std::ostream&, const type&);
}

#include <iosfwd>

#include <xercesc/sax/InputSource.hpp>
#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMErrorHandler.hpp>

namespace test
{
  // Parse a URI or a local file.
  //

  ::std::auto_ptr< ::test::type >
  root (const ::std::string& uri,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::test::type >
  root (const ::std::string& uri,
        ::xml_schema::error_handler& eh,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::test::type >
  root (const ::std::string& uri,
        ::xercesc::DOMErrorHandler& eh,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  // Parse std::istream.
  //

  ::std::auto_ptr< ::test::type >
  root (::std::istream& is,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::test::type >
  root (::std::istream& is,
        ::xml_schema::error_handler& eh,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::test::type >
  root (::std::istream& is,
        ::xercesc::DOMErrorHandler& eh,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::test::type >
  root (::std::istream& is,
        const ::std::string& id,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::test::type >
  root (::std::istream& is,
        const ::std::string& id,
        ::xml_schema::error_handler& eh,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::test::type >
  root (::std::istream& is,
        const ::std::string& id,
        ::xercesc::DOMErrorHandler& eh,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  // Parse xercesc::InputSource.
  //

  ::std::auto_ptr< ::test::type >
  root (::xercesc::InputSource& is,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::test::type >
  root (::xercesc::InputSource& is,
        ::xml_schema::error_handler& eh,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::test::type >
  root (::xercesc::InputSource& is,
        ::xercesc::DOMErrorHandler& eh,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  // Parse xercesc::DOMDocument.
  //

  ::std::auto_ptr< ::test::type >
  root (const ::xercesc::DOMDocument& d,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::test::type >
  root (::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d,
        ::xml_schema::flags f = 0,
        const ::xml_schema::properties& p = ::xml_schema::properties ());
}

#include <iosfwd>

#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMErrorHandler.hpp>
#include <xercesc/framework/XMLFormatter.hpp>

#include <xsd/cxx/xml/dom/auto-ptr.hxx>

namespace test
{
  void
  operator<< (::xercesc::DOMElement&, const union_&);

  void
  operator<< (::xercesc::DOMAttr&, const union_&);

  void
  operator<< (::xml_schema::list_stream&,
              const union_&);

  void
  operator<< (::xercesc::DOMElement&, const union_test&);

  void
  operator<< (::xercesc::DOMElement&, const fix_list&);

  void
  operator<< (::xercesc::DOMAttr&, const fix_list&);

  void
  operator<< (::xml_schema::list_stream&,
              const fix_list&);

  void
  operator<< (::xercesc::DOMElement&, const var_list&);

  void
  operator<< (::xercesc::DOMAttr&, const var_list&);

  void
  operator<< (::xml_schema::list_stream&,
              const var_list&);

  void
  operator<< (::xercesc::DOMElement&, const list_item&);

  void
  operator<< (::xercesc::DOMAttr&, const list_item&);

  void
  operator<< (::xml_schema::list_stream&,
              const list_item&);

  void
  operator<< (::xercesc::DOMElement&, const usr_list&);

  void
  operator<< (::xercesc::DOMAttr&, const usr_list&);

  void
  operator<< (::xml_schema::list_stream&,
              const usr_list&);

  void
  operator<< (::xercesc::DOMElement&, const union_list&);

  void
  operator<< (::xercesc::DOMAttr&, const union_list&);

  void
  operator<< (::xml_schema::list_stream&,
              const union_list&);

  void
  operator<< (::xercesc::DOMElement&, const list_test&);

  void
  operator<< (::xercesc::DOMElement&, const int_base&);

  void
  operator<< (::xercesc::DOMAttr&, const int_base&);

  void
  operator<< (::xml_schema::list_stream&,
              const int_base&);

  void
  operator<< (::xercesc::DOMElement&, const str_base&);

  void
  operator<< (::xercesc::DOMAttr&, const str_base&);

  void
  operator<< (::xml_schema::list_stream&,
              const str_base&);

  void
  operator<< (::xercesc::DOMElement&, const int_&);

  void
  operator<< (::xercesc::DOMAttr&, const int_&);

  void
  operator<< (::xml_schema::list_stream&,
              const int_&);

  void
  operator<< (::xercesc::DOMElement&, const str&);

  void
  operator<< (::xercesc::DOMAttr&, const str&);

  void
  operator<< (::xml_schema::list_stream&,
              const str&);

  void
  operator<< (::xercesc::DOMElement&, const union_derived&);

  void
  operator<< (::xercesc::DOMAttr&, const union_derived&);

  void
  operator<< (::xml_schema::list_stream&,
              const union_derived&);

  void
  operator<< (::xercesc::DOMElement&, const list_derived&);

  void
  operator<< (::xercesc::DOMAttr&, const list_derived&);

  void
  operator<< (::xml_schema::list_stream&,
              const list_derived&);

  void
  operator<< (::xercesc::DOMElement&, const simple_test&);

  void
  operator<< (::xercesc::DOMElement&, const date_derived&);

  void
  operator<< (::xercesc::DOMAttr&, const date_derived&);

  void
  operator<< (::xml_schema::list_stream&,
              const date_derived&);

  void
  operator<< (::xercesc::DOMElement&, const date_test&);

  void
  operator<< (::xercesc::DOMElement&, const time_test&);

  void
  operator<< (::xercesc::DOMElement&, const date_time_test&);

  void
  operator<< (::xercesc::DOMElement&, const duration_test&);

  void
  operator<< (::xercesc::DOMElement&, const day_test&);

  void
  operator<< (::xercesc::DOMElement&, const month_test&);

  void
  operator<< (::xercesc::DOMElement&, const year_test&);

  void
  operator<< (::xercesc::DOMElement&, const month_day_test&);

  void
  operator<< (::xercesc::DOMElement&, const year_month_test&);

  void
  operator<< (::xercesc::DOMElement&, const type&);

  // Serialize to std::ostream.
  //

  void
  root (::std::ostream& os,
        const ::test::type& x, 
        const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
        const ::std::string& e = "UTF-8",
        ::xml_schema::flags f = 0);

  void
  root (::std::ostream& os,
        const ::test::type& x, 
        ::xml_schema::error_handler& eh,
        const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
        const ::std::string& e = "UTF-8",
        ::xml_schema::flags f = 0);

  void
  root (::std::ostream& os,
        const ::test::type& x, 
        ::xercesc::DOMErrorHandler& eh,
        const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
        const ::std::string& e = "UTF-8",
        ::xml_schema::flags f = 0);

  // Serialize to xercesc::XMLFormatTarget.
  //

  void
  root (::xercesc::XMLFormatTarget& ft,
        const ::test::type& x, 
        const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
        const ::std::string& e = "UTF-8",
        ::xml_schema::flags f = 0);

  void
  root (::xercesc::XMLFormatTarget& ft,
        const ::test::type& x, 
        ::xml_schema::error_handler& eh,
        const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
        const ::std::string& e = "UTF-8",
        ::xml_schema::flags f = 0);

  void
  root (::xercesc::XMLFormatTarget& ft,
        const ::test::type& x, 
        ::xercesc::DOMErrorHandler& eh,
        const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
        const ::std::string& e = "UTF-8",
        ::xml_schema::flags f = 0);

  // Serialize to an existing xercesc::DOMDocument.
  //

  void
  root (::xercesc::DOMDocument& d,
        const ::test::type& x,
        ::xml_schema::flags f = 0);

  // Serialize to a new xercesc::DOMDocument.
  //

  ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >
  root (const ::test::type& x, 
        const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
        ::xml_schema::flags f = 0);
}

#ifndef XSD_DONT_INCLUDE_INLINE
#include "test.ixx"
#endif // XSD_DONT_INCLUDE_INLINE

#include <xsd/cxx/post.hxx>

// Begin epilogue.
//
//
// End epilogue.

#endif // CXX_WORK_XSD_4_0_0_XSD_TESTS_CXX_TREE_DEFAULT_GENERAL_TEST_HXX
