[xsd-users] Problems Generanting XML with Optional Tag

Leandro Maia maiabhmg at gmail.com
Thu Mar 26 15:01:50 EDT 2009


Hi,

I have a XSD and the CXX and HXX files generated by CodeSynthesis 
tool... Everything works fine, but, SOMETIMES, when I generate the 
output, the tool generate a XML that is not according to the XSD.

The XSD, XML with problem, CXX and HXX are attached.

The problem is in the line 112 of the XML.

May someone help me with this problem ?

Regards.

--
Leandro Maia

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Identificador.xsd
Type: application/xml
Size: 1606 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20090326/d7b37f57/Identificador.xml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Identificador.xml
Type: text/xml
Size: 54193 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20090326/d7b37f57/Identificador.bin
-------------- next part --------------
// Copyright (C) 2005-2008 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.
//

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

#include <xsd/cxx/pre.hxx>

#include "Identificador.hxx"

namespace eIdentificador
{
  // classType
  // 

  classType::
  classType (value v)
  : ::xml_schema::string (_xsd_classType_literals_[v])
  {
  }

  classType::
  classType (const char* v)
  : ::xml_schema::string (v)
  {
  }

  classType::
  classType (const ::std::string& v)
  : ::xml_schema::string (v)
  {
  }

  classType::
  classType (const ::xml_schema::string& v)
  : ::xml_schema::string (v)
  {
  }

  classType::
  classType (const classType& v,
             ::xml_schema::flags f,
             ::xml_schema::container* c)
  : ::xml_schema::string (v, f, c)
  {
  }

  classType& classType::
  operator= (value v)
  {
    static_cast< ::xml_schema::string& > (*this) = 
    ::xml_schema::string (_xsd_classType_literals_[v]);

    return *this;
  }


  // idType
  // 

  const idType::nome_type& idType::
  nome () const
  {
    return this->nome_.get ();
  }

  idType::nome_type& idType::
  nome ()
  {
    return this->nome_.get ();
  }

  void idType::
  nome (const nome_type& x)
  {
    this->nome_.set (x);
  }

  void idType::
  nome (::std::auto_ptr< nome_type > x)
  {
    this->nome_.set (x);
  }

  const idType::eId_type& idType::
  eId () const
  {
    return this->eId_.get ();
  }

  idType::eId_type& idType::
  eId ()
  {
    return this->eId_.get ();
  }

  void idType::
  eId (const eId_type& x)
  {
    this->eId_.set (x);
  }

  void idType::
  eId (::std::auto_ptr< eId_type > x)
  {
    this->eId_.set (x);
  }

  const idType::classe_type& idType::
  classe () const
  {
    return this->classe_.get ();
  }

  idType::classe_type& idType::
  classe ()
  {
    return this->classe_.get ();
  }

  void idType::
  classe (const classe_type& x)
  {
    this->classe_.set (x);
  }

  void idType::
  classe (::std::auto_ptr< classe_type > x)
  {
    this->classe_.set (x);
  }

  const idType::obs_type& idType::
  obs () const
  {
    return this->obs_.get ();
  }

  idType::obs_type& idType::
  obs ()
  {
    return this->obs_.get ();
  }

  void idType::
  obs (const obs_type& x)
  {
    this->obs_.set (x);
  }

  void idType::
  obs (::std::auto_ptr< obs_type > x)
  {
    this->obs_.set (x);
  }

  const idType::ativo_type& idType::
  ativo () const
  {
    return this->ativo_.get ();
  }

  idType::ativo_type& idType::
  ativo ()
  {
    return this->ativo_.get ();
  }

  void idType::
  ativo (const ativo_type& x)
  {
    this->ativo_.set (x);
  }

  const idType::filhos_optional& idType::
  filhos () const
  {
    return this->filhos_;
  }

  idType::filhos_optional& idType::
  filhos ()
  {
    return this->filhos_;
  }

  void idType::
  filhos (const filhos_type& x)
  {
    this->filhos_.set (x);
  }

  void idType::
  filhos (const filhos_optional& x)
  {
    this->filhos_ = x;
  }

  void idType::
  filhos (::std::auto_ptr< filhos_type > x)
  {
    this->filhos_.set (x);
  }

  const idType::id_type& idType::
  id () const
  {
    return this->id_.get ();
  }

  idType::id_type& idType::
  id ()
  {
    return this->id_.get ();
  }

  void idType::
  id (const id_type& x)
  {
    this->id_.set (x);
  }


  // childType
  // 

  const childType::identificador_sequence& childType::
  identificador () const
  {
    return this->identificador_;
  }

  childType::identificador_sequence& childType::
  identificador ()
  {
    return this->identificador_;
  }

  void childType::
  identificador (const identificador_sequence& s)
  {
    this->identificador_ = s;
  }


  // idLstType
  // 

  const idLstType::identificador_sequence& idLstType::
  identificador () const
  {
    return this->identificador_;
  }

  idLstType::identificador_sequence& idLstType::
  identificador ()
  {
    return this->identificador_;
  }

  void idLstType::
  identificador (const identificador_sequence& s)
  {
    this->identificador_ = s;
  }
}

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

namespace eIdentificador
{
  // classType
  //

  classType::
  classType (const xercesc::DOMElement& e,
             ::xml_schema::flags f,
             ::xml_schema::container* c)
  : ::xml_schema::string (e, f, c)
  {
    _xsd_classType_convert ();
  }

  classType::
  classType (const xercesc::DOMAttr& a,
             ::xml_schema::flags f,
             ::xml_schema::container* c)
  : ::xml_schema::string (a, f, c)
  {
    _xsd_classType_convert ();
  }

  classType::
  classType (const ::std::string& s,
             const xercesc::DOMElement* e,
             ::xml_schema::flags f,
             ::xml_schema::container* c)
  : ::xml_schema::string (s, e, f, c)
  {
    _xsd_classType_convert ();
  }

  classType* classType::
  _clone (::xml_schema::flags f,
          ::xml_schema::container* c) const
  {
    return new class classType (*this, f, c);
  }

  classType::value classType::
  _xsd_classType_convert () const
  {
    ::xsd::cxx::tree::enum_comparator< char > c (_xsd_classType_literals_);
    const value* i (::std::lower_bound (
                      _xsd_classType_indexes_,
                      _xsd_classType_indexes_ + 7,
                      *this,
                      c));

    if (i == _xsd_classType_indexes_ + 7 || _xsd_classType_literals_[*i] != *this)
    {
      throw ::xsd::cxx::tree::unexpected_enumerator < char > (*this);
    }

    return *i;
  }

  const char* const classType::
  _xsd_classType_literals_[7] =
  {
    "GERAL",
    "MONTADORA",
    "VEICULO",
    "MOTOR_MODELO",
    "ANO",
    "INTERFACE",
    "SISTEMA"
  };

  const classType::value classType::
  _xsd_classType_indexes_[7] =
  {
    ::eIdentificador::classType::ANO,
    ::eIdentificador::classType::GERAL,
    ::eIdentificador::classType::INTERFACE,
    ::eIdentificador::classType::MONTADORA,
    ::eIdentificador::classType::MOTOR_MODELO,
    ::eIdentificador::classType::SISTEMA,
    ::eIdentificador::classType::VEICULO
  };

  // idType
  //

  idType::
  idType (const nome_type& nome,
          const eId_type& eId,
          const classe_type& classe,
          const obs_type& obs,
          const ativo_type& ativo,
          const id_type& id)
  : ::xml_schema::type (),
    nome_ (nome, ::xml_schema::flags (), this),
    eId_ (eId, ::xml_schema::flags (), this),
    classe_ (classe, ::xml_schema::flags (), this),
    obs_ (obs, ::xml_schema::flags (), this),
    ativo_ (ativo, ::xml_schema::flags (), this),
    filhos_ (::xml_schema::flags (), this),
    id_ (id, ::xml_schema::flags (), this)
  {
  }

  idType::
  idType (const idType& x,
          ::xml_schema::flags f,
          ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    nome_ (x.nome_, f, this),
    eId_ (x.eId_, f, this),
    classe_ (x.classe_, f, this),
    obs_ (x.obs_, f, this),
    ativo_ (x.ativo_, f, this),
    filhos_ (x.filhos_, f, this),
    id_ (x.id_, f, this)
  {
  }

  idType::
  idType (const xercesc::DOMElement& e,
          ::xml_schema::flags f,
          ::xml_schema::container* c)
  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
    nome_ (f, this),
    eId_ (f, this),
    classe_ (f, this),
    obs_ (f, this),
    ativo_ (f, this),
    filhos_ (f, this),
    id_ (f, this)
  {
    if ((f & ::xml_schema::flags::base) == 0)
    {
      ::xsd::cxx::xml::dom::parser< char > p (e, true, true);
      this->parse (p, f);
    }
  }

  void idType::
  parse (::xsd::cxx::xml::dom::parser< char >& p,
         ::xml_schema::flags f)
  {
    for (; p.more_elements (); p.next_element ())
    {
      const xercesc::DOMElement& i (p.cur_element ());
      const ::xsd::cxx::xml::qualified_name< char > n (
        ::xsd::cxx::xml::dom::name< char > (i));

      // nome
      //
      if (n.name () == "nome" && n.namespace_ ().empty ())
      {
        ::std::auto_ptr< nome_type > r (
          nome_traits::create (i, f, this));

        if (!nome_.present ())
        {
          this->nome_.set (r);
          continue;
        }
      }

      // eId
      //
      if (n.name () == "eId" && n.namespace_ ().empty ())
      {
        ::std::auto_ptr< eId_type > r (
          eId_traits::create (i, f, this));

        if (!eId_.present ())
        {
          this->eId_.set (r);
          continue;
        }
      }

      // classe
      //
      if (n.name () == "classe" && n.namespace_ ().empty ())
      {
        ::std::auto_ptr< classe_type > r (
          classe_traits::create (i, f, this));

        if (!classe_.present ())
        {
          this->classe_.set (r);
          continue;
        }
      }

      // obs
      //
      if (n.name () == "obs" && n.namespace_ ().empty ())
      {
        ::std::auto_ptr< obs_type > r (
          obs_traits::create (i, f, this));

        if (!obs_.present ())
        {
          this->obs_.set (r);
          continue;
        }
      }

      // ativo
      //
      if (n.name () == "ativo" && n.namespace_ ().empty ())
      {
        if (!ativo_.present ())
        {
          this->ativo_.set (ativo_traits::create (i, f, this));
          continue;
        }
      }

      // filhos
      //
      if (n.name () == "filhos" && n.namespace_ ().empty ())
      {
        ::std::auto_ptr< filhos_type > r (
          filhos_traits::create (i, f, this));

        if (!this->filhos_)
        {
          this->filhos_.set (r);
          continue;
        }
      }

      break;
    }

    if (!nome_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "nome",
        "");
    }

    if (!eId_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "eId",
        "");
    }

    if (!classe_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "classe",
        "");
    }

    if (!obs_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "obs",
        "");
    }

    if (!ativo_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "ativo",
        "");
    }

    while (p.more_attributes ())
    {
      const xercesc::DOMAttr& i (p.next_attribute ());
      const ::xsd::cxx::xml::qualified_name< char > n (
        ::xsd::cxx::xml::dom::name< char > (i));

      if (n.name () == "id" && n.namespace_ ().empty ())
      {
        this->id_.set (id_traits::create (i, f, this));
        continue;
      }
    }

    if (!id_.present ())
    {
      throw ::xsd::cxx::tree::expected_attribute< char > (
        "id",
        "");
    }
  }

  idType* idType::
  _clone (::xml_schema::flags f,
          ::xml_schema::container* c) const
  {
    return new class idType (*this, f, c);
  }

  idType::
  ~idType ()
  {
  }

  // childType
  //

  childType::
  childType ()
  : ::xml_schema::type (),
    identificador_ (::xml_schema::flags (), this)
  {
  }

  childType::
  childType (const childType& x,
             ::xml_schema::flags f,
             ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    identificador_ (x.identificador_, f, this)
  {
  }

  childType::
  childType (const xercesc::DOMElement& e,
             ::xml_schema::flags f,
             ::xml_schema::container* c)
  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
    identificador_ (f, this)
  {
    if ((f & ::xml_schema::flags::base) == 0)
    {
      ::xsd::cxx::xml::dom::parser< char > p (e, true, false);
      this->parse (p, f);
    }
  }

  void childType::
  parse (::xsd::cxx::xml::dom::parser< char >& p,
         ::xml_schema::flags f)
  {
    for (; p.more_elements (); p.next_element ())
    {
      const xercesc::DOMElement& i (p.cur_element ());
      const ::xsd::cxx::xml::qualified_name< char > n (
        ::xsd::cxx::xml::dom::name< char > (i));

      // identificador
      //
      if (n.name () == "identificador" && n.namespace_ ().empty ())
      {
        ::std::auto_ptr< identificador_type > r (
          identificador_traits::create (i, f, this));

        this->identificador_.push_back (r);
        continue;
      }

      break;
    }
  }

  childType* childType::
  _clone (::xml_schema::flags f,
          ::xml_schema::container* c) const
  {
    return new class childType (*this, f, c);
  }

  childType::
  ~childType ()
  {
  }

  // idLstType
  //

  idLstType::
  idLstType ()
  : ::xml_schema::type (),
    identificador_ (::xml_schema::flags (), this)
  {
  }

  idLstType::
  idLstType (const idLstType& x,
             ::xml_schema::flags f,
             ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    identificador_ (x.identificador_, f, this)
  {
  }

  idLstType::
  idLstType (const xercesc::DOMElement& e,
             ::xml_schema::flags f,
             ::xml_schema::container* c)
  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
    identificador_ (f, this)
  {
    if ((f & ::xml_schema::flags::base) == 0)
    {
      ::xsd::cxx::xml::dom::parser< char > p (e, true, false);
      this->parse (p, f);
    }
  }

  void idLstType::
  parse (::xsd::cxx::xml::dom::parser< char >& p,
         ::xml_schema::flags f)
  {
    for (; p.more_elements (); p.next_element ())
    {
      const xercesc::DOMElement& i (p.cur_element ());
      const ::xsd::cxx::xml::qualified_name< char > n (
        ::xsd::cxx::xml::dom::name< char > (i));

      // identificador
      //
      if (n.name () == "identificador" && n.namespace_ ().empty ())
      {
        ::std::auto_ptr< identificador_type > r (
          identificador_traits::create (i, f, this));

        this->identificador_.push_back (r);
        continue;
      }

      break;
    }
  }

  idLstType* idLstType::
  _clone (::xml_schema::flags f,
          ::xml_schema::container* c) const
  {
    return new class idLstType (*this, f, c);
  }

  idLstType::
  ~idLstType ()
  {
  }
}

#include <ostream>

namespace eIdentificador
{
  ::std::ostream&
  operator<< (::std::ostream& o, classType::value i)
  {
    return o << classType::_xsd_classType_literals_[i];
  }

  ::std::ostream&
  operator<< (::std::ostream& o, const classType& i)
  {
    return o << static_cast< const ::xml_schema::string& > (i);
  }

  ::std::ostream&
  operator<< (::std::ostream& o, const idType& i)
  {
    o << ::std::endl << "nome: " << i.nome ();
    o << ::std::endl << "eId: " << i.eId ();
    o << ::std::endl << "classe: " << i.classe ();
    o << ::std::endl << "obs: " << i.obs ();
    o << ::std::endl << "ativo: " << i.ativo ();
    if (i.filhos ())
    {
      o << ::std::endl << "filhos: " << *i.filhos ();
    }

    o << ::std::endl << "id: " << i.id ();
    return o;
  }

  ::std::ostream&
  operator<< (::std::ostream& o, const childType& i)
  {
    for (childType::identificador_const_iterator
         b (i.identificador ().begin ()), e (i.identificador ().end ());
         b != e; ++b)
    {
      o << ::std::endl << "identificador: " << *b;
    }

    return o;
  }

  ::std::ostream&
  operator<< (::std::ostream& o, const idLstType& i)
  {
    for (idLstType::identificador_const_iterator
         b (i.identificador ().begin ()), e (i.identificador ().end ());
         b != e; ++b)
    {
      o << ::std::endl << "identificador: " << *b;
    }

    return o;
  }
}

#include <istream>
#include <xsd/cxx/xml/sax/std-input-source.hxx>
#include <xsd/cxx/tree/error-handler.hxx>

namespace eIdentificador
{
  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (const ::std::string& u,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    ::xsd::cxx::xml::auto_initializer i (
      (f & ::xml_schema::flags::dont_initialize) == 0,
      (f & ::xml_schema::flags::keep_dom) == 0);

    ::xsd::cxx::tree::error_handler< char > h;

    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::parse< char > (u, h, p, f));

    h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();

    ::std::auto_ptr< ::eIdentificador::idLstType > r (
      ::eIdentificador::identificadores (
        d, f | ::xml_schema::flags::own_dom, p));

    return r;
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (const ::std::string& u,
                   ::xml_schema::error_handler& h,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    ::xsd::cxx::xml::auto_initializer i (
      (f & ::xml_schema::flags::dont_initialize) == 0,
      (f & ::xml_schema::flags::keep_dom) == 0);

    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::parse< char > (u, h, p, f));

    if (!d.get ())
      throw ::xsd::cxx::tree::parsing< char > ();

    ::std::auto_ptr< ::eIdentificador::idLstType > r (
      ::eIdentificador::identificadores (
        d, f | ::xml_schema::flags::own_dom, p));

    return r;
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (const ::std::string& u,
                   xercesc::DOMErrorHandler& h,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::parse< char > (u, h, p, f));

    if (!d.get ())
      throw ::xsd::cxx::tree::parsing< char > ();

    ::std::auto_ptr< ::eIdentificador::idLstType > r (
      ::eIdentificador::identificadores (
        d, f | ::xml_schema::flags::own_dom, p));

    return r;
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (::std::istream& is,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    ::xsd::cxx::xml::auto_initializer i (
      (f & ::xml_schema::flags::dont_initialize) == 0,
      (f & ::xml_schema::flags::keep_dom) == 0);

    ::xsd::cxx::xml::sax::std_input_source isrc (is);
    return ::eIdentificador::identificadores (isrc, f, p);
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (::std::istream& is,
                   ::xml_schema::error_handler& h,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    ::xsd::cxx::xml::auto_initializer i (
      (f & ::xml_schema::flags::dont_initialize) == 0,
      (f & ::xml_schema::flags::keep_dom) == 0);

    ::xsd::cxx::xml::sax::std_input_source isrc (is);
    return ::eIdentificador::identificadores (isrc, h, f, p);
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (::std::istream& is,
                   xercesc::DOMErrorHandler& h,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    ::xsd::cxx::xml::sax::std_input_source isrc (is);
    return ::eIdentificador::identificadores (isrc, h, f, p);
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (::std::istream& is,
                   const ::std::string& sid,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    ::xsd::cxx::xml::auto_initializer i (
      (f & ::xml_schema::flags::dont_initialize) == 0,
      (f & ::xml_schema::flags::keep_dom) == 0);

    ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
    return ::eIdentificador::identificadores (isrc, f, p);
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (::std::istream& is,
                   const ::std::string& sid,
                   ::xml_schema::error_handler& h,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    ::xsd::cxx::xml::auto_initializer i (
      (f & ::xml_schema::flags::dont_initialize) == 0,
      (f & ::xml_schema::flags::keep_dom) == 0);

    ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
    return ::eIdentificador::identificadores (isrc, h, f, p);
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (::std::istream& is,
                   const ::std::string& sid,
                   xercesc::DOMErrorHandler& h,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
    return ::eIdentificador::identificadores (isrc, h, f, p);
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (xercesc::InputSource& i,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    ::xsd::cxx::tree::error_handler< char > h;

    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::parse< char > (i, h, p, f));

    h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();

    ::std::auto_ptr< ::eIdentificador::idLstType > r (
      ::eIdentificador::identificadores (
        d, f | ::xml_schema::flags::own_dom, p));

    return r;
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (xercesc::InputSource& i,
                   ::xml_schema::error_handler& h,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::parse< char > (i, h, p, f));

    if (!d.get ())
      throw ::xsd::cxx::tree::parsing< char > ();

    ::std::auto_ptr< ::eIdentificador::idLstType > r (
      ::eIdentificador::identificadores (
        d, f | ::xml_schema::flags::own_dom, p));

    return r;
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (xercesc::InputSource& i,
                   xercesc::DOMErrorHandler& h,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::parse< char > (i, h, p, f));

    if (!d.get ())
      throw ::xsd::cxx::tree::parsing< char > ();

    ::std::auto_ptr< ::eIdentificador::idLstType > r (
      ::eIdentificador::identificadores (
        d, f | ::xml_schema::flags::own_dom, p));

    return r;
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (const xercesc::DOMDocument& d,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties& p)
  {
    if (f & ::xml_schema::flags::keep_dom)
    {
      ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > c (
        static_cast< xercesc::DOMDocument* > (d.cloneNode (true)));

      ::std::auto_ptr< ::eIdentificador::idLstType > r (
        ::eIdentificador::identificadores (
          c, f | ::xml_schema::flags::own_dom, p));

      return r;
    }

    const xercesc::DOMElement& e (*d.getDocumentElement ());
    const ::xsd::cxx::xml::qualified_name< char > n (
      ::xsd::cxx::xml::dom::name< char > (e));

    if (n.name () == "identificadores" &&
        n.namespace_ () == "http://www.scanitec.com.br/eIdentificador")
    {
      ::std::auto_ptr< ::eIdentificador::idLstType > r (
        ::xsd::cxx::tree::traits< ::eIdentificador::idLstType, char >::create (
          e, f, 0));
      return r;
    }

    throw ::xsd::cxx::tree::unexpected_element < char > (
      n.name (),
      n.namespace_ (),
      "identificadores",
      "http://www.scanitec.com.br/eIdentificador");
  }

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (::xml_schema::dom::auto_ptr< xercesc::DOMDocument >& d,
                   ::xml_schema::flags f,
                   const ::xml_schema::properties&)
  {
    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > c (
      ((f & ::xml_schema::flags::keep_dom) &&
       !(f & ::xml_schema::flags::own_dom))
      ? static_cast< xercesc::DOMDocument* > (d->cloneNode (true))
      : 0);

    xercesc::DOMDocument& doc (c.get () ? *c : *d);
    const xercesc::DOMElement& e (*doc.getDocumentElement ());

    const ::xsd::cxx::xml::qualified_name< char > n (
      ::xsd::cxx::xml::dom::name< char > (e));

    if (f & ::xml_schema::flags::keep_dom)
      doc.setUserData (::xml_schema::dom::tree_node_key,
                       (c.get () ? &c : &d),
                       0);

    if (n.name () == "identificadores" &&
        n.namespace_ () == "http://www.scanitec.com.br/eIdentificador")
    {
      ::std::auto_ptr< ::eIdentificador::idLstType > r (
        ::xsd::cxx::tree::traits< ::eIdentificador::idLstType, char >::create (
          e, f, 0));
      return r;
    }

    throw ::xsd::cxx::tree::unexpected_element < char > (
      n.name (),
      n.namespace_ (),
      "identificadores",
      "http://www.scanitec.com.br/eIdentificador");
  }
}

#include <ostream>
#include <xsd/cxx/xml/dom/serialization-source.hxx>
#include <xsd/cxx/tree/error-handler.hxx>

namespace eIdentificador
{
  void
  operator<< (xercesc::DOMElement& e, const classType& i)
  {
    e << static_cast< const ::xml_schema::string& > (i);
  }

  void
  operator<< (xercesc::DOMAttr& a, const classType& i)
  {
    a << static_cast< const ::xml_schema::string& > (i);
  }

  void
  operator<< (::xml_schema::list_stream& l,
              const classType& i)
  {
    l << static_cast< const ::xml_schema::string& > (i);
  }

  void
  operator<< (xercesc::DOMElement& e, const idType& i)
  {
    e << static_cast< const ::xml_schema::type& > (i);

    // nome
    //
    {
      xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "nome",
          e));

      s << i.nome ();
    }

    // eId
    //
    {
      xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "eId",
          e));

      s << i.eId ();
    }

    // classe
    //
    {
      xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "classe",
          e));

      s << i.classe ();
    }

    // obs
    //
    {
      xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "obs",
          e));

      s << i.obs ();
    }

    // ativo
    //
    {
      xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "ativo",
          e));

      s << i.ativo ();
    }

    // filhos
    //
    if (i.filhos ())
    {
      xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "filhos",
          e));

      s << *i.filhos ();
    }

    // id
    //
    {
      xercesc::DOMAttr& a (
        ::xsd::cxx::xml::dom::create_attribute (
          "id",
          e));

      a << i.id ();
    }
  }

  void
  operator<< (xercesc::DOMElement& e, const childType& i)
  {
    e << static_cast< const ::xml_schema::type& > (i);

    // identificador
    //
    for (childType::identificador_const_iterator
         b (i.identificador ().begin ()), n (i.identificador ().end ());
         b != n; ++b)
    {
      xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "identificador",
          e));

      s << *b;
    }
  }

  void
  operator<< (xercesc::DOMElement& e, const idLstType& i)
  {
    e << static_cast< const ::xml_schema::type& > (i);

    // identificador
    //
    for (idLstType::identificador_const_iterator
         b (i.identificador ().begin ()), n (i.identificador ().end ());
         b != n; ++b)
    {
      xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "identificador",
          e));

      s << *b;
    }
  }

  void
  identificadores (::std::ostream& o,
                   const ::eIdentificador::idLstType& s,
                   const ::xml_schema::namespace_infomap& m,
                   const ::std::string& e,
                   ::xml_schema::flags f)
  {
    ::xsd::cxx::xml::auto_initializer i (
      (f & ::xml_schema::flags::dont_initialize) == 0);

    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::eIdentificador::identificadores (s, m, f));

    ::xsd::cxx::tree::error_handler< char > h;

    ::xsd::cxx::xml::dom::ostream_format_target t (o);
    if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
    {
      h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
    }
  }

  void
  identificadores (::std::ostream& o,
                   const ::eIdentificador::idLstType& s,
                   ::xml_schema::error_handler& h,
                   const ::xml_schema::namespace_infomap& m,
                   const ::std::string& e,
                   ::xml_schema::flags f)
  {
    ::xsd::cxx::xml::auto_initializer i (
      (f & ::xml_schema::flags::dont_initialize) == 0);

    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::eIdentificador::identificadores (s, m, f));
    ::xsd::cxx::xml::dom::ostream_format_target t (o);
    if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
    {
      throw ::xsd::cxx::tree::serialization< char > ();
    }
  }

  void
  identificadores (::std::ostream& o,
                   const ::eIdentificador::idLstType& s,
                   xercesc::DOMErrorHandler& h,
                   const ::xml_schema::namespace_infomap& m,
                   const ::std::string& e,
                   ::xml_schema::flags f)
  {
    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::eIdentificador::identificadores (s, m, f));
    ::xsd::cxx::xml::dom::ostream_format_target t (o);
    if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
    {
      throw ::xsd::cxx::tree::serialization< char > ();
    }
  }

  void
  identificadores (xercesc::XMLFormatTarget& t,
                   const ::eIdentificador::idLstType& s,
                   const ::xml_schema::namespace_infomap& m,
                   const ::std::string& e,
                   ::xml_schema::flags f)
  {
    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::eIdentificador::identificadores (s, m, f));

    ::xsd::cxx::tree::error_handler< char > h;

    if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
    {
      h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
    }
  }

  void
  identificadores (xercesc::XMLFormatTarget& t,
                   const ::eIdentificador::idLstType& s,
                   ::xml_schema::error_handler& h,
                   const ::xml_schema::namespace_infomap& m,
                   const ::std::string& e,
                   ::xml_schema::flags f)
  {
    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::eIdentificador::identificadores (s, m, f));
    if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
    {
      throw ::xsd::cxx::tree::serialization< char > ();
    }
  }

  void
  identificadores (xercesc::XMLFormatTarget& t,
                   const ::eIdentificador::idLstType& s,
                   xercesc::DOMErrorHandler& h,
                   const ::xml_schema::namespace_infomap& m,
                   const ::std::string& e,
                   ::xml_schema::flags f)
  {
    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::eIdentificador::identificadores (s, m, f));
    if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
    {
      throw ::xsd::cxx::tree::serialization< char > ();
    }
  }

  void
  identificadores (xercesc::DOMDocument& d,
                   const ::eIdentificador::idLstType& s,
                   ::xml_schema::flags)
  {
    xercesc::DOMElement& e (*d.getDocumentElement ());
    const ::xsd::cxx::xml::qualified_name< char > n (
      ::xsd::cxx::xml::dom::name< char > (e));

    if (n.name () == "identificadores" &&
        n.namespace_ () == "http://www.scanitec.com.br/eIdentificador")
    {
      e << s;
    }
    else
    {
      throw ::xsd::cxx::tree::unexpected_element < char > (
        n.name (),
        n.namespace_ (),
        "identificadores",
        "http://www.scanitec.com.br/eIdentificador");
    }
  }

  ::xml_schema::dom::auto_ptr< xercesc::DOMDocument >
  identificadores (const ::eIdentificador::idLstType& s,
                   const ::xml_schema::namespace_infomap& m,
                   ::xml_schema::flags f)
  {
    ::xml_schema::dom::auto_ptr< xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::serialize< char > (
        "identificadores",
        "http://www.scanitec.com.br/eIdentificador",
        m, f));

    ::eIdentificador::identificadores (*d, s, f);
    return d;
  }
}

#include <xsd/cxx/post.hxx>

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

-------------- next part --------------
// Copyright (C) 2005-2008 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___SRC_IDENTIFICADOR_HXX
#define CXX___SRC_IDENTIFICADOR_HXX

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

#include <xsd/cxx/config.hxx>

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

#include <xsd/cxx/pre.hxx>

#ifndef XSD_USE_CHAR
#define XSD_USE_CHAR
#endif

#ifndef XSD_CXX_TREE_USE_CHAR
#define XSD_CXX_TREE_USE_CHAR
#endif

#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< 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< type, char, ncname > 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;

  // 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;

  // 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;

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

  // 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_IN___XML_SCHEMA
#define XSD_CXX_TREE_TREE_NODE_KEY_IN___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 eIdentificador
{
  class classType;
  class idType;
  class childType;
  class idLstType;
}


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

#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>

namespace eIdentificador
{
  class classType: public ::xml_schema::string
  {
    public:
    enum value
    {
      GERAL,
      MONTADORA,
      VEICULO,
      MOTOR_MODELO,
      ANO,
      INTERFACE,
      SISTEMA
    };

    classType (value v);

    classType (const char* v);

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

    classType (const ::xml_schema::string& v);

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

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

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

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

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

    classType&
    operator= (value v);

    virtual
    operator value () const
    {
      return _xsd_classType_convert ();
    }

    protected:
    value
    _xsd_classType_convert () const;

    public:
    static const char* const _xsd_classType_literals_[7];
    static const value _xsd_classType_indexes_[7];
  };

  class idType: public ::xml_schema::type
  {
    public:
    // nome
    // 
    typedef ::xml_schema::string nome_type;
    typedef ::xsd::cxx::tree::traits< nome_type, char > nome_traits;

    const nome_type&
    nome () const;

    nome_type&
    nome ();

    void
    nome (const nome_type& x);

    void
    nome (::std::auto_ptr< nome_type > p);

    // eId
    // 
    typedef ::xml_schema::string eId_type;
    typedef ::xsd::cxx::tree::traits< eId_type, char > eId_traits;

    const eId_type&
    eId () const;

    eId_type&
    eId ();

    void
    eId (const eId_type& x);

    void
    eId (::std::auto_ptr< eId_type > p);

    // classe
    // 
    typedef ::eIdentificador::classType classe_type;
    typedef ::xsd::cxx::tree::traits< classe_type, char > classe_traits;

    const classe_type&
    classe () const;

    classe_type&
    classe ();

    void
    classe (const classe_type& x);

    void
    classe (::std::auto_ptr< classe_type > p);

    // obs
    // 
    typedef ::xml_schema::string obs_type;
    typedef ::xsd::cxx::tree::traits< obs_type, char > obs_traits;

    const obs_type&
    obs () const;

    obs_type&
    obs ();

    void
    obs (const obs_type& x);

    void
    obs (::std::auto_ptr< obs_type > p);

    // ativo
    // 
    typedef ::xml_schema::boolean ativo_type;
    typedef ::xsd::cxx::tree::traits< ativo_type, char > ativo_traits;

    const ativo_type&
    ativo () const;

    ativo_type&
    ativo ();

    void
    ativo (const ativo_type& x);

    // filhos
    // 
    typedef ::eIdentificador::childType filhos_type;
    typedef ::xsd::cxx::tree::optional< filhos_type > filhos_optional;
    typedef ::xsd::cxx::tree::traits< filhos_type, char > filhos_traits;

    const filhos_optional&
    filhos () const;

    filhos_optional&
    filhos ();

    void
    filhos (const filhos_type& x);

    void
    filhos (const filhos_optional& x);

    void
    filhos (::std::auto_ptr< filhos_type > p);

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

    const id_type&
    id () const;

    id_type&
    id ();

    void
    id (const id_type& x);

    // Constructors.
    //
    idType (const nome_type&,
            const eId_type&,
            const classe_type&,
            const obs_type&,
            const ativo_type&,
            const id_type&);

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

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

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

    virtual 
    ~idType ();

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

    protected:
    ::xsd::cxx::tree::one< nome_type > nome_;
    ::xsd::cxx::tree::one< eId_type > eId_;
    ::xsd::cxx::tree::one< classe_type > classe_;
    ::xsd::cxx::tree::one< obs_type > obs_;
    ::xsd::cxx::tree::one< ativo_type > ativo_;
    filhos_optional filhos_;
    ::xsd::cxx::tree::one< id_type > id_;
  };

  class childType: public ::xml_schema::type
  {
    public:
    // identificador
    // 
    typedef ::eIdentificador::idType identificador_type;
    typedef ::xsd::cxx::tree::sequence< identificador_type > identificador_sequence;
    typedef xsd::cxx::tree::sequence< identificador_type >::iterator identificador_iterator;
    typedef xsd::cxx::tree::sequence< identificador_type >::const_iterator identificador_const_iterator;
    typedef ::xsd::cxx::tree::traits< identificador_type, char > identificador_traits;

    const identificador_sequence&
    identificador () const;

    identificador_sequence&
    identificador ();

    void
    identificador (const identificador_sequence& s);

    // Constructors.
    //
    childType ();

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

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

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

    virtual 
    ~childType ();

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

    protected:
    identificador_sequence identificador_;
  };

  class idLstType: public ::xml_schema::type
  {
    public:
    // identificador
    // 
    typedef ::eIdentificador::idType identificador_type;
    typedef ::xsd::cxx::tree::sequence< identificador_type > identificador_sequence;
    typedef xsd::cxx::tree::sequence< identificador_type >::iterator identificador_iterator;
    typedef xsd::cxx::tree::sequence< identificador_type >::const_iterator identificador_const_iterator;
    typedef ::xsd::cxx::tree::traits< identificador_type, char > identificador_traits;

    const identificador_sequence&
    identificador () const;

    identificador_sequence&
    identificador ();

    void
    identificador (const identificador_sequence& s);

    // Constructors.
    //
    idLstType ();

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

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

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

    virtual 
    ~idLstType ();

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

    protected:
    identificador_sequence identificador_;
  };
}

#include <iosfwd>

namespace eIdentificador
{
  ::std::ostream&
  operator<< (::std::ostream&, classType::value);

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

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

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

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

#include <iosfwd>

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

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

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (const ::std::string& uri,
                   ::xml_schema::flags f = 0,
                   const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (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< ::eIdentificador::idLstType >
  identificadores (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< ::eIdentificador::idLstType >
  identificadores (::std::istream& is,
                   ::xml_schema::flags f = 0,
                   const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (::std::istream& is,
                   ::xml_schema::error_handler& eh,
                   ::xml_schema::flags f = 0,
                   const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (::std::istream& is,
                   xercesc::DOMErrorHandler& eh,
                   ::xml_schema::flags f = 0,
                   const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (::std::istream& is,
                   const ::std::string& id,
                   ::xml_schema::flags f = 0,
                   const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (::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< ::eIdentificador::idLstType >
  identificadores (::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< ::eIdentificador::idLstType >
  identificadores (xercesc::InputSource& is,
                   ::xml_schema::flags f = 0,
                   const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (xercesc::InputSource& is,
                   ::xml_schema::error_handler& eh,
                   ::xml_schema::flags f = 0,
                   const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (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< ::eIdentificador::idLstType >
  identificadores (const xercesc::DOMDocument& d,
                   ::xml_schema::flags f = 0,
                   const ::xml_schema::properties& p = ::xml_schema::properties ());

  ::std::auto_ptr< ::eIdentificador::idLstType >
  identificadores (::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 eIdentificador
{
  void
  operator<< (xercesc::DOMElement&, const classType&);

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

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

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

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

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

  // Serialize to std::ostream.
  //

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

  void
  identificadores (::std::ostream& os,
                   const ::eIdentificador::idLstType& 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
  identificadores (::std::ostream& os,
                   const ::eIdentificador::idLstType& 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
  identificadores (xercesc::XMLFormatTarget& ft,
                   const ::eIdentificador::idLstType& x, 
                   const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
                   const ::std::string& e = "UTF-8",
                   ::xml_schema::flags f = 0);

  void
  identificadores (xercesc::XMLFormatTarget& ft,
                   const ::eIdentificador::idLstType& 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
  identificadores (xercesc::XMLFormatTarget& ft,
                   const ::eIdentificador::idLstType& 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
  identificadores (xercesc::DOMDocument& d,
                   const ::eIdentificador::idLstType& x,
                   ::xml_schema::flags f = 0);

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

  ::xml_schema::dom::auto_ptr< xercesc::DOMDocument >
  identificadores (const ::eIdentificador::idLstType& x, 
                   const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
                   ::xml_schema::flags f = 0);
}

#include <xsd/cxx/post.hxx>

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

#endif // CXX___SRC_IDENTIFICADOR_HXX


More information about the xsd-users mailing list