// Copyright (c) 2005-2023 Code Synthesis.
//
// 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 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 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 "kolabformat-xcal.hxx"

namespace icalendar_2_0
{
  // XlabelParamType
  //


  // XuidParamType
  //


  // XFBevent
  //

  const XFBevent::uid_type& XFBevent::
  uid () const
  {
    return this->uid_.get ();
  }

  XFBevent::uid_type& XFBevent::
  uid ()
  {
    return this->uid_.get ();
  }

  void XFBevent::
  uid (const uid_type& x)
  {
    this->uid_.set (x);
  }

  void XFBevent::
  uid (::std::unique_ptr< uid_type > x)
  {
    this->uid_.set (std::move (x));
  }

  const XFBevent::summary_type& XFBevent::
  summary () const
  {
    return this->summary_.get ();
  }

  XFBevent::summary_type& XFBevent::
  summary ()
  {
    return this->summary_.get ();
  }

  void XFBevent::
  summary (const summary_type& x)
  {
    this->summary_.set (x);
  }

  void XFBevent::
  summary (::std::unique_ptr< summary_type > x)
  {
    this->summary_.set (std::move (x));
  }

  const XFBevent::location_type& XFBevent::
  location () const
  {
    return this->location_.get ();
  }

  XFBevent::location_type& XFBevent::
  location ()
  {
    return this->location_.get ();
  }

  void XFBevent::
  location (const location_type& x)
  {
    this->location_.set (x);
  }

  void XFBevent::
  location (::std::unique_ptr< location_type > x)
  {
    this->location_.set (std::move (x));
  }


  // KolabVersion
  //

  const KolabVersion::text_type& KolabVersion::
  text () const
  {
    return this->text_.get ();
  }

  KolabVersion::text_type& KolabVersion::
  text ()
  {
    return this->text_.get ();
  }

  void KolabVersion::
  text (const text_type& x)
  {
    this->text_.set (x);
  }

  void KolabVersion::
  text (::std::unique_ptr< text_type > x)
  {
    this->text_.set (std::move (x));
  }

  const KolabVersion::text_type& KolabVersion::
  text_default_value ()
  {
    return text_default_value_;
  }


  // CustomType
  //

  const CustomType::identifier_type& CustomType::
  identifier () const
  {
    return this->identifier_.get ();
  }

  CustomType::identifier_type& CustomType::
  identifier ()
  {
    return this->identifier_.get ();
  }

  void CustomType::
  identifier (const identifier_type& x)
  {
    this->identifier_.set (x);
  }

  void CustomType::
  identifier (::std::unique_ptr< identifier_type > x)
  {
    this->identifier_.set (std::move (x));
  }

  const CustomType::value_type& CustomType::
  value () const
  {
    return this->value_.get ();
  }

  CustomType::value_type& CustomType::
  value ()
  {
    return this->value_.get ();
  }

  void CustomType::
  value (const value_type& x)
  {
    this->value_.set (x);
  }

  void CustomType::
  value (::std::unique_ptr< value_type > x)
  {
    this->value_.set (std::move (x));
  }


  // ContactType
  //


  // ValarmType
  //

  const ValarmType::properties_type& ValarmType::
  properties () const
  {
    return this->properties_.get ();
  }

  ValarmType::properties_type& ValarmType::
  properties ()
  {
    return this->properties_.get ();
  }

  void ValarmType::
  properties (const properties_type& x)
  {
    this->properties_.set (x);
  }

  void ValarmType::
  properties (::std::unique_ptr< properties_type > x)
  {
    this->properties_.set (std::move (x));
  }


  // KolabEvent
  //

  const KolabEvent::properties_type& KolabEvent::
  properties () const
  {
    return this->properties_.get ();
  }

  KolabEvent::properties_type& KolabEvent::
  properties ()
  {
    return this->properties_.get ();
  }

  void KolabEvent::
  properties (const properties_type& x)
  {
    this->properties_.set (x);
  }

  void KolabEvent::
  properties (::std::unique_ptr< properties_type > x)
  {
    this->properties_.set (std::move (x));
  }

  const KolabEvent::components_optional& KolabEvent::
  components () const
  {
    return this->components_;
  }

  KolabEvent::components_optional& KolabEvent::
  components ()
  {
    return this->components_;
  }

  void KolabEvent::
  components (const components_type& x)
  {
    this->components_.set (x);
  }

  void KolabEvent::
  components (const components_optional& x)
  {
    this->components_ = x;
  }

  void KolabEvent::
  components (::std::unique_ptr< components_type > x)
  {
    this->components_.set (std::move (x));
  }


  // KolabTodo
  //

  const KolabTodo::properties_type& KolabTodo::
  properties () const
  {
    return this->properties_.get ();
  }

  KolabTodo::properties_type& KolabTodo::
  properties ()
  {
    return this->properties_.get ();
  }

  void KolabTodo::
  properties (const properties_type& x)
  {
    this->properties_.set (x);
  }

  void KolabTodo::
  properties (::std::unique_ptr< properties_type > x)
  {
    this->properties_.set (std::move (x));
  }

  const KolabTodo::components_optional& KolabTodo::
  components () const
  {
    return this->components_;
  }

  KolabTodo::components_optional& KolabTodo::
  components ()
  {
    return this->components_;
  }

  void KolabTodo::
  components (const components_type& x)
  {
    this->components_.set (x);
  }

  void KolabTodo::
  components (const components_optional& x)
  {
    this->components_ = x;
  }

  void KolabTodo::
  components (::std::unique_ptr< components_type > x)
  {
    this->components_.set (std::move (x));
  }


  // KolabJournal
  //

  const KolabJournal::properties_type& KolabJournal::
  properties () const
  {
    return this->properties_.get ();
  }

  KolabJournal::properties_type& KolabJournal::
  properties ()
  {
    return this->properties_.get ();
  }

  void KolabJournal::
  properties (const properties_type& x)
  {
    this->properties_.set (x);
  }

  void KolabJournal::
  properties (::std::unique_ptr< properties_type > x)
  {
    this->properties_.set (std::move (x));
  }


  // KolabFreebusy
  //

  const KolabFreebusy::properties_type& KolabFreebusy::
  properties () const
  {
    return this->properties_.get ();
  }

  KolabFreebusy::properties_type& KolabFreebusy::
  properties ()
  {
    return this->properties_.get ();
  }

  void KolabFreebusy::
  properties (const properties_type& x)
  {
    this->properties_.set (x);
  }

  void KolabFreebusy::
  properties (::std::unique_ptr< properties_type > x)
  {
    this->properties_.set (std::move (x));
  }


  // VcalendarType
  //

  const VcalendarType::properties_type& VcalendarType::
  properties () const
  {
    return this->properties_.get ();
  }

  VcalendarType::properties_type& VcalendarType::
  properties ()
  {
    return this->properties_.get ();
  }

  void VcalendarType::
  properties (const properties_type& x)
  {
    this->properties_.set (x);
  }

  void VcalendarType::
  properties (::std::unique_ptr< properties_type > x)
  {
    this->properties_.set (std::move (x));
  }

  const VcalendarType::components_type& VcalendarType::
  components () const
  {
    return this->components_.get ();
  }

  VcalendarType::components_type& VcalendarType::
  components ()
  {
    return this->components_.get ();
  }

  void VcalendarType::
  components (const components_type& x)
  {
    this->components_.set (x);
  }

  void VcalendarType::
  components (::std::unique_ptr< components_type > x)
  {
    this->components_.set (std::move (x));
  }


  // IcalendarType
  //

  const IcalendarType::vcalendar_type& IcalendarType::
  vcalendar () const
  {
    return this->vcalendar_.get ();
  }

  IcalendarType::vcalendar_type& IcalendarType::
  vcalendar ()
  {
    return this->vcalendar_.get ();
  }

  void IcalendarType::
  vcalendar (const vcalendar_type& x)
  {
    this->vcalendar_.set (x);
  }

  void IcalendarType::
  vcalendar (::std::unique_ptr< vcalendar_type > x)
  {
    this->vcalendar_.set (std::move (x));
  }


  // properties
  //

  const properties::action_type& properties::
  action () const
  {
    return this->action_.get ();
  }

  properties::action_type& properties::
  action ()
  {
    return this->action_.get ();
  }

  void properties::
  action (const action_type& x)
  {
    this->action_.set (x);
  }

  void properties::
  action (::std::unique_ptr< action_type > x)
  {
    this->action_.set (std::move (x));
  }

  const properties::summary_optional& properties::
  summary () const
  {
    return this->summary_;
  }

  properties::summary_optional& properties::
  summary ()
  {
    return this->summary_;
  }

  void properties::
  summary (const summary_type& x)
  {
    this->summary_.set (x);
  }

  void properties::
  summary (const summary_optional& x)
  {
    this->summary_ = x;
  }

  void properties::
  summary (::std::unique_ptr< summary_type > x)
  {
    this->summary_.set (std::move (x));
  }

  const properties::description_optional& properties::
  description () const
  {
    return this->description_;
  }

  properties::description_optional& properties::
  description ()
  {
    return this->description_;
  }

  void properties::
  description (const description_type& x)
  {
    this->description_.set (x);
  }

  void properties::
  description (const description_optional& x)
  {
    this->description_ = x;
  }

  void properties::
  description (::std::unique_ptr< description_type > x)
  {
    this->description_.set (std::move (x));
  }

  const properties::attendee_sequence& properties::
  attendee () const
  {
    return this->attendee_;
  }

  properties::attendee_sequence& properties::
  attendee ()
  {
    return this->attendee_;
  }

  void properties::
  attendee (const attendee_sequence& s)
  {
    this->attendee_ = s;
  }

  const properties::attach_optional& properties::
  attach () const
  {
    return this->attach_;
  }

  properties::attach_optional& properties::
  attach ()
  {
    return this->attach_;
  }

  void properties::
  attach (const attach_type& x)
  {
    this->attach_.set (x);
  }

  void properties::
  attach (const attach_optional& x)
  {
    this->attach_ = x;
  }

  void properties::
  attach (::std::unique_ptr< attach_type > x)
  {
    this->attach_.set (std::move (x));
  }

  const properties::trigger_type& properties::
  trigger () const
  {
    return this->trigger_.get ();
  }

  properties::trigger_type& properties::
  trigger ()
  {
    return this->trigger_.get ();
  }

  void properties::
  trigger (const trigger_type& x)
  {
    this->trigger_.set (x);
  }

  void properties::
  trigger (::std::unique_ptr< trigger_type > x)
  {
    this->trigger_.set (std::move (x));
  }

  const properties::duration_optional& properties::
  duration () const
  {
    return this->duration_;
  }

  properties::duration_optional& properties::
  duration ()
  {
    return this->duration_;
  }

  void properties::
  duration (const duration_type& x)
  {
    this->duration_.set (x);
  }

  void properties::
  duration (const duration_optional& x)
  {
    this->duration_ = x;
  }

  void properties::
  duration (::std::unique_ptr< duration_type > x)
  {
    this->duration_.set (std::move (x));
  }

  const properties::repeat_optional& properties::
  repeat () const
  {
    return this->repeat_;
  }

  properties::repeat_optional& properties::
  repeat ()
  {
    return this->repeat_;
  }

  void properties::
  repeat (const repeat_type& x)
  {
    this->repeat_.set (x);
  }

  void properties::
  repeat (const repeat_optional& x)
  {
    this->repeat_ = x;
  }

  void properties::
  repeat (::std::unique_ptr< repeat_type > x)
  {
    this->repeat_.set (std::move (x));
  }


  // properties1
  //

  const properties1::uid_type& properties1::
  uid () const
  {
    return this->uid_.get ();
  }

  properties1::uid_type& properties1::
  uid ()
  {
    return this->uid_.get ();
  }

  void properties1::
  uid (const uid_type& x)
  {
    this->uid_.set (x);
  }

  void properties1::
  uid (::std::unique_ptr< uid_type > x)
  {
    this->uid_.set (std::move (x));
  }

  const properties1::created_type& properties1::
  created () const
  {
    return this->created_.get ();
  }

  properties1::created_type& properties1::
  created ()
  {
    return this->created_.get ();
  }

  void properties1::
  created (const created_type& x)
  {
    this->created_.set (x);
  }

  void properties1::
  created (::std::unique_ptr< created_type > x)
  {
    this->created_.set (std::move (x));
  }

  const properties1::dtstamp_type& properties1::
  dtstamp () const
  {
    return this->dtstamp_.get ();
  }

  properties1::dtstamp_type& properties1::
  dtstamp ()
  {
    return this->dtstamp_.get ();
  }

  void properties1::
  dtstamp (const dtstamp_type& x)
  {
    this->dtstamp_.set (x);
  }

  void properties1::
  dtstamp (::std::unique_ptr< dtstamp_type > x)
  {
    this->dtstamp_.set (std::move (x));
  }

  const properties1::sequence_optional& properties1::
  sequence () const
  {
    return this->sequence_;
  }

  properties1::sequence_optional& properties1::
  sequence ()
  {
    return this->sequence_;
  }

  void properties1::
  sequence (const sequence_type& x)
  {
    this->sequence_.set (x);
  }

  void properties1::
  sequence (const sequence_optional& x)
  {
    this->sequence_ = x;
  }

  void properties1::
  sequence (::std::unique_ptr< sequence_type > x)
  {
    this->sequence_.set (std::move (x));
  }

  const properties1::class_optional& properties1::
  class_ () const
  {
    return this->class__;
  }

  properties1::class_optional& properties1::
  class_ ()
  {
    return this->class__;
  }

  void properties1::
  class_ (const class_type& x)
  {
    this->class__.set (x);
  }

  void properties1::
  class_ (const class_optional& x)
  {
    this->class__ = x;
  }

  void properties1::
  class_ (::std::unique_ptr< class_type > x)
  {
    this->class__.set (std::move (x));
  }

  const properties1::categories_optional& properties1::
  categories () const
  {
    return this->categories_;
  }

  properties1::categories_optional& properties1::
  categories ()
  {
    return this->categories_;
  }

  void properties1::
  categories (const categories_type& x)
  {
    this->categories_.set (x);
  }

  void properties1::
  categories (const categories_optional& x)
  {
    this->categories_ = x;
  }

  void properties1::
  categories (::std::unique_ptr< categories_type > x)
  {
    this->categories_.set (std::move (x));
  }

  const properties1::dtstart_optional& properties1::
  dtstart () const
  {
    return this->dtstart_;
  }

  properties1::dtstart_optional& properties1::
  dtstart ()
  {
    return this->dtstart_;
  }

  void properties1::
  dtstart (const dtstart_type& x)
  {
    this->dtstart_.set (x);
  }

  void properties1::
  dtstart (const dtstart_optional& x)
  {
    this->dtstart_ = x;
  }

  void properties1::
  dtstart (::std::unique_ptr< dtstart_type > x)
  {
    this->dtstart_.set (std::move (x));
  }

  const properties1::dtend_optional& properties1::
  dtend () const
  {
    return this->dtend_;
  }

  properties1::dtend_optional& properties1::
  dtend ()
  {
    return this->dtend_;
  }

  void properties1::
  dtend (const dtend_type& x)
  {
    this->dtend_.set (x);
  }

  void properties1::
  dtend (const dtend_optional& x)
  {
    this->dtend_ = x;
  }

  void properties1::
  dtend (::std::unique_ptr< dtend_type > x)
  {
    this->dtend_.set (std::move (x));
  }

  const properties1::duration_optional& properties1::
  duration () const
  {
    return this->duration_;
  }

  properties1::duration_optional& properties1::
  duration ()
  {
    return this->duration_;
  }

  void properties1::
  duration (const duration_type& x)
  {
    this->duration_.set (x);
  }

  void properties1::
  duration (const duration_optional& x)
  {
    this->duration_ = x;
  }

  void properties1::
  duration (::std::unique_ptr< duration_type > x)
  {
    this->duration_.set (std::move (x));
  }

  const properties1::transp_optional& properties1::
  transp () const
  {
    return this->transp_;
  }

  properties1::transp_optional& properties1::
  transp ()
  {
    return this->transp_;
  }

  void properties1::
  transp (const transp_type& x)
  {
    this->transp_.set (x);
  }

  void properties1::
  transp (const transp_optional& x)
  {
    this->transp_ = x;
  }

  void properties1::
  transp (::std::unique_ptr< transp_type > x)
  {
    this->transp_.set (std::move (x));
  }

  const properties1::rrule_optional& properties1::
  rrule () const
  {
    return this->rrule_;
  }

  properties1::rrule_optional& properties1::
  rrule ()
  {
    return this->rrule_;
  }

  void properties1::
  rrule (const rrule_type& x)
  {
    this->rrule_.set (x);
  }

  void properties1::
  rrule (const rrule_optional& x)
  {
    this->rrule_ = x;
  }

  void properties1::
  rrule (::std::unique_ptr< rrule_type > x)
  {
    this->rrule_.set (std::move (x));
  }

  const properties1::rdate_optional& properties1::
  rdate () const
  {
    return this->rdate_;
  }

  properties1::rdate_optional& properties1::
  rdate ()
  {
    return this->rdate_;
  }

  void properties1::
  rdate (const rdate_type& x)
  {
    this->rdate_.set (x);
  }

  void properties1::
  rdate (const rdate_optional& x)
  {
    this->rdate_ = x;
  }

  void properties1::
  rdate (::std::unique_ptr< rdate_type > x)
  {
    this->rdate_.set (std::move (x));
  }

  const properties1::exdate_optional& properties1::
  exdate () const
  {
    return this->exdate_;
  }

  properties1::exdate_optional& properties1::
  exdate ()
  {
    return this->exdate_;
  }

  void properties1::
  exdate (const exdate_type& x)
  {
    this->exdate_.set (x);
  }

  void properties1::
  exdate (const exdate_optional& x)
  {
    this->exdate_ = x;
  }

  void properties1::
  exdate (::std::unique_ptr< exdate_type > x)
  {
    this->exdate_.set (std::move (x));
  }

  const properties1::recurrence_id_optional& properties1::
  recurrence_id () const
  {
    return this->recurrence_id_;
  }

  properties1::recurrence_id_optional& properties1::
  recurrence_id ()
  {
    return this->recurrence_id_;
  }

  void properties1::
  recurrence_id (const recurrence_id_type& x)
  {
    this->recurrence_id_.set (x);
  }

  void properties1::
  recurrence_id (const recurrence_id_optional& x)
  {
    this->recurrence_id_ = x;
  }

  void properties1::
  recurrence_id (::std::unique_ptr< recurrence_id_type > x)
  {
    this->recurrence_id_.set (std::move (x));
  }

  const properties1::summary_optional& properties1::
  summary () const
  {
    return this->summary_;
  }

  properties1::summary_optional& properties1::
  summary ()
  {
    return this->summary_;
  }

  void properties1::
  summary (const summary_type& x)
  {
    this->summary_.set (x);
  }

  void properties1::
  summary (const summary_optional& x)
  {
    this->summary_ = x;
  }

  void properties1::
  summary (::std::unique_ptr< summary_type > x)
  {
    this->summary_.set (std::move (x));
  }

  const properties1::description_optional& properties1::
  description () const
  {
    return this->description_;
  }

  properties1::description_optional& properties1::
  description ()
  {
    return this->description_;
  }

  void properties1::
  description (const description_type& x)
  {
    this->description_.set (x);
  }

  void properties1::
  description (const description_optional& x)
  {
    this->description_ = x;
  }

  void properties1::
  description (::std::unique_ptr< description_type > x)
  {
    this->description_.set (std::move (x));
  }

  const properties1::comment_optional& properties1::
  comment () const
  {
    return this->comment_;
  }

  properties1::comment_optional& properties1::
  comment ()
  {
    return this->comment_;
  }

  void properties1::
  comment (const comment_type& x)
  {
    this->comment_.set (x);
  }

  void properties1::
  comment (const comment_optional& x)
  {
    this->comment_ = x;
  }

  void properties1::
  comment (::std::unique_ptr< comment_type > x)
  {
    this->comment_.set (std::move (x));
  }

  const properties1::priority_optional& properties1::
  priority () const
  {
    return this->priority_;
  }

  properties1::priority_optional& properties1::
  priority ()
  {
    return this->priority_;
  }

  void properties1::
  priority (const priority_type& x)
  {
    this->priority_.set (x);
  }

  void properties1::
  priority (const priority_optional& x)
  {
    this->priority_ = x;
  }

  void properties1::
  priority (::std::unique_ptr< priority_type > x)
  {
    this->priority_.set (std::move (x));
  }

  const properties1::status_optional& properties1::
  status () const
  {
    return this->status_;
  }

  properties1::status_optional& properties1::
  status ()
  {
    return this->status_;
  }

  void properties1::
  status (const status_type& x)
  {
    this->status_.set (x);
  }

  void properties1::
  status (const status_optional& x)
  {
    this->status_ = x;
  }

  void properties1::
  status (::std::unique_ptr< status_type > x)
  {
    this->status_.set (std::move (x));
  }

  const properties1::location_optional& properties1::
  location () const
  {
    return this->location_;
  }

  properties1::location_optional& properties1::
  location ()
  {
    return this->location_;
  }

  void properties1::
  location (const location_type& x)
  {
    this->location_.set (x);
  }

  void properties1::
  location (const location_optional& x)
  {
    this->location_ = x;
  }

  void properties1::
  location (::std::unique_ptr< location_type > x)
  {
    this->location_.set (std::move (x));
  }

  const properties1::organizer_optional& properties1::
  organizer () const
  {
    return this->organizer_;
  }

  properties1::organizer_optional& properties1::
  organizer ()
  {
    return this->organizer_;
  }

  void properties1::
  organizer (const organizer_type& x)
  {
    this->organizer_.set (x);
  }

  void properties1::
  organizer (const organizer_optional& x)
  {
    this->organizer_ = x;
  }

  void properties1::
  organizer (::std::unique_ptr< organizer_type > x)
  {
    this->organizer_.set (std::move (x));
  }

  const properties1::url_optional& properties1::
  url () const
  {
    return this->url_;
  }

  properties1::url_optional& properties1::
  url ()
  {
    return this->url_;
  }

  void properties1::
  url (const url_type& x)
  {
    this->url_.set (x);
  }

  void properties1::
  url (const url_optional& x)
  {
    this->url_ = x;
  }

  void properties1::
  url (::std::unique_ptr< url_type > x)
  {
    this->url_.set (std::move (x));
  }

  const properties1::attendee_sequence& properties1::
  attendee () const
  {
    return this->attendee_;
  }

  properties1::attendee_sequence& properties1::
  attendee ()
  {
    return this->attendee_;
  }

  void properties1::
  attendee (const attendee_sequence& s)
  {
    this->attendee_ = s;
  }

  const properties1::attach_sequence& properties1::
  attach () const
  {
    return this->attach_;
  }

  properties1::attach_sequence& properties1::
  attach ()
  {
    return this->attach_;
  }

  void properties1::
  attach (const attach_sequence& s)
  {
    this->attach_ = s;
  }

  const properties1::x_custom_sequence& properties1::
  x_custom () const
  {
    return this->x_custom_;
  }

  properties1::x_custom_sequence& properties1::
  x_custom ()
  {
    return this->x_custom_;
  }

  void properties1::
  x_custom (const x_custom_sequence& s)
  {
    this->x_custom_ = s;
  }


  // components
  //

  const components::valarm_sequence& components::
  valarm () const
  {
    return this->valarm_;
  }

  components::valarm_sequence& components::
  valarm ()
  {
    return this->valarm_;
  }

  void components::
  valarm (const valarm_sequence& s)
  {
    this->valarm_ = s;
  }


  // properties2
  //

  const properties2::uid_type& properties2::
  uid () const
  {
    return this->uid_.get ();
  }

  properties2::uid_type& properties2::
  uid ()
  {
    return this->uid_.get ();
  }

  void properties2::
  uid (const uid_type& x)
  {
    this->uid_.set (x);
  }

  void properties2::
  uid (::std::unique_ptr< uid_type > x)
  {
    this->uid_.set (std::move (x));
  }

  const properties2::created_type& properties2::
  created () const
  {
    return this->created_.get ();
  }

  properties2::created_type& properties2::
  created ()
  {
    return this->created_.get ();
  }

  void properties2::
  created (const created_type& x)
  {
    this->created_.set (x);
  }

  void properties2::
  created (::std::unique_ptr< created_type > x)
  {
    this->created_.set (std::move (x));
  }

  const properties2::dtstamp_type& properties2::
  dtstamp () const
  {
    return this->dtstamp_.get ();
  }

  properties2::dtstamp_type& properties2::
  dtstamp ()
  {
    return this->dtstamp_.get ();
  }

  void properties2::
  dtstamp (const dtstamp_type& x)
  {
    this->dtstamp_.set (x);
  }

  void properties2::
  dtstamp (::std::unique_ptr< dtstamp_type > x)
  {
    this->dtstamp_.set (std::move (x));
  }

  const properties2::sequence_optional& properties2::
  sequence () const
  {
    return this->sequence_;
  }

  properties2::sequence_optional& properties2::
  sequence ()
  {
    return this->sequence_;
  }

  void properties2::
  sequence (const sequence_type& x)
  {
    this->sequence_.set (x);
  }

  void properties2::
  sequence (const sequence_optional& x)
  {
    this->sequence_ = x;
  }

  void properties2::
  sequence (::std::unique_ptr< sequence_type > x)
  {
    this->sequence_.set (std::move (x));
  }

  const properties2::class_optional& properties2::
  class_ () const
  {
    return this->class__;
  }

  properties2::class_optional& properties2::
  class_ ()
  {
    return this->class__;
  }

  void properties2::
  class_ (const class_type& x)
  {
    this->class__.set (x);
  }

  void properties2::
  class_ (const class_optional& x)
  {
    this->class__ = x;
  }

  void properties2::
  class_ (::std::unique_ptr< class_type > x)
  {
    this->class__.set (std::move (x));
  }

  const properties2::categories_optional& properties2::
  categories () const
  {
    return this->categories_;
  }

  properties2::categories_optional& properties2::
  categories ()
  {
    return this->categories_;
  }

  void properties2::
  categories (const categories_type& x)
  {
    this->categories_.set (x);
  }

  void properties2::
  categories (const categories_optional& x)
  {
    this->categories_ = x;
  }

  void properties2::
  categories (::std::unique_ptr< categories_type > x)
  {
    this->categories_.set (std::move (x));
  }

  const properties2::related_to_sequence& properties2::
  related_to () const
  {
    return this->related_to_;
  }

  properties2::related_to_sequence& properties2::
  related_to ()
  {
    return this->related_to_;
  }

  void properties2::
  related_to (const related_to_sequence& s)
  {
    this->related_to_ = s;
  }

  const properties2::dtstart_optional& properties2::
  dtstart () const
  {
    return this->dtstart_;
  }

  properties2::dtstart_optional& properties2::
  dtstart ()
  {
    return this->dtstart_;
  }

  void properties2::
  dtstart (const dtstart_type& x)
  {
    this->dtstart_.set (x);
  }

  void properties2::
  dtstart (const dtstart_optional& x)
  {
    this->dtstart_ = x;
  }

  void properties2::
  dtstart (::std::unique_ptr< dtstart_type > x)
  {
    this->dtstart_.set (std::move (x));
  }

  const properties2::due_optional& properties2::
  due () const
  {
    return this->due_;
  }

  properties2::due_optional& properties2::
  due ()
  {
    return this->due_;
  }

  void properties2::
  due (const due_type& x)
  {
    this->due_.set (x);
  }

  void properties2::
  due (const due_optional& x)
  {
    this->due_ = x;
  }

  void properties2::
  due (::std::unique_ptr< due_type > x)
  {
    this->due_.set (std::move (x));
  }

  const properties2::rrule_optional& properties2::
  rrule () const
  {
    return this->rrule_;
  }

  properties2::rrule_optional& properties2::
  rrule ()
  {
    return this->rrule_;
  }

  void properties2::
  rrule (const rrule_type& x)
  {
    this->rrule_.set (x);
  }

  void properties2::
  rrule (const rrule_optional& x)
  {
    this->rrule_ = x;
  }

  void properties2::
  rrule (::std::unique_ptr< rrule_type > x)
  {
    this->rrule_.set (std::move (x));
  }

  const properties2::rdate_optional& properties2::
  rdate () const
  {
    return this->rdate_;
  }

  properties2::rdate_optional& properties2::
  rdate ()
  {
    return this->rdate_;
  }

  void properties2::
  rdate (const rdate_type& x)
  {
    this->rdate_.set (x);
  }

  void properties2::
  rdate (const rdate_optional& x)
  {
    this->rdate_ = x;
  }

  void properties2::
  rdate (::std::unique_ptr< rdate_type > x)
  {
    this->rdate_.set (std::move (x));
  }

  const properties2::exdate_optional& properties2::
  exdate () const
  {
    return this->exdate_;
  }

  properties2::exdate_optional& properties2::
  exdate ()
  {
    return this->exdate_;
  }

  void properties2::
  exdate (const exdate_type& x)
  {
    this->exdate_.set (x);
  }

  void properties2::
  exdate (const exdate_optional& x)
  {
    this->exdate_ = x;
  }

  void properties2::
  exdate (::std::unique_ptr< exdate_type > x)
  {
    this->exdate_.set (std::move (x));
  }

  const properties2::recurrence_id_optional& properties2::
  recurrence_id () const
  {
    return this->recurrence_id_;
  }

  properties2::recurrence_id_optional& properties2::
  recurrence_id ()
  {
    return this->recurrence_id_;
  }

  void properties2::
  recurrence_id (const recurrence_id_type& x)
  {
    this->recurrence_id_.set (x);
  }

  void properties2::
  recurrence_id (const recurrence_id_optional& x)
  {
    this->recurrence_id_ = x;
  }

  void properties2::
  recurrence_id (::std::unique_ptr< recurrence_id_type > x)
  {
    this->recurrence_id_.set (std::move (x));
  }

  const properties2::summary_optional& properties2::
  summary () const
  {
    return this->summary_;
  }

  properties2::summary_optional& properties2::
  summary ()
  {
    return this->summary_;
  }

  void properties2::
  summary (const summary_type& x)
  {
    this->summary_.set (x);
  }

  void properties2::
  summary (const summary_optional& x)
  {
    this->summary_ = x;
  }

  void properties2::
  summary (::std::unique_ptr< summary_type > x)
  {
    this->summary_.set (std::move (x));
  }

  const properties2::description_optional& properties2::
  description () const
  {
    return this->description_;
  }

  properties2::description_optional& properties2::
  description ()
  {
    return this->description_;
  }

  void properties2::
  description (const description_type& x)
  {
    this->description_.set (x);
  }

  void properties2::
  description (const description_optional& x)
  {
    this->description_ = x;
  }

  void properties2::
  description (::std::unique_ptr< description_type > x)
  {
    this->description_.set (std::move (x));
  }

  const properties2::comment_optional& properties2::
  comment () const
  {
    return this->comment_;
  }

  properties2::comment_optional& properties2::
  comment ()
  {
    return this->comment_;
  }

  void properties2::
  comment (const comment_type& x)
  {
    this->comment_.set (x);
  }

  void properties2::
  comment (const comment_optional& x)
  {
    this->comment_ = x;
  }

  void properties2::
  comment (::std::unique_ptr< comment_type > x)
  {
    this->comment_.set (std::move (x));
  }

  const properties2::priority_optional& properties2::
  priority () const
  {
    return this->priority_;
  }

  properties2::priority_optional& properties2::
  priority ()
  {
    return this->priority_;
  }

  void properties2::
  priority (const priority_type& x)
  {
    this->priority_.set (x);
  }

  void properties2::
  priority (const priority_optional& x)
  {
    this->priority_ = x;
  }

  void properties2::
  priority (::std::unique_ptr< priority_type > x)
  {
    this->priority_.set (std::move (x));
  }

  const properties2::status_optional& properties2::
  status () const
  {
    return this->status_;
  }

  properties2::status_optional& properties2::
  status ()
  {
    return this->status_;
  }

  void properties2::
  status (const status_type& x)
  {
    this->status_.set (x);
  }

  void properties2::
  status (const status_optional& x)
  {
    this->status_ = x;
  }

  void properties2::
  status (::std::unique_ptr< status_type > x)
  {
    this->status_.set (std::move (x));
  }

  const properties2::percent_complete_optional& properties2::
  percent_complete () const
  {
    return this->percent_complete_;
  }

  properties2::percent_complete_optional& properties2::
  percent_complete ()
  {
    return this->percent_complete_;
  }

  void properties2::
  percent_complete (const percent_complete_type& x)
  {
    this->percent_complete_.set (x);
  }

  void properties2::
  percent_complete (const percent_complete_optional& x)
  {
    this->percent_complete_ = x;
  }

  void properties2::
  percent_complete (::std::unique_ptr< percent_complete_type > x)
  {
    this->percent_complete_.set (std::move (x));
  }

  const properties2::location_optional& properties2::
  location () const
  {
    return this->location_;
  }

  properties2::location_optional& properties2::
  location ()
  {
    return this->location_;
  }

  void properties2::
  location (const location_type& x)
  {
    this->location_.set (x);
  }

  void properties2::
  location (const location_optional& x)
  {
    this->location_ = x;
  }

  void properties2::
  location (::std::unique_ptr< location_type > x)
  {
    this->location_.set (std::move (x));
  }

  const properties2::organizer_optional& properties2::
  organizer () const
  {
    return this->organizer_;
  }

  properties2::organizer_optional& properties2::
  organizer ()
  {
    return this->organizer_;
  }

  void properties2::
  organizer (const organizer_type& x)
  {
    this->organizer_.set (x);
  }

  void properties2::
  organizer (const organizer_optional& x)
  {
    this->organizer_ = x;
  }

  void properties2::
  organizer (::std::unique_ptr< organizer_type > x)
  {
    this->organizer_.set (std::move (x));
  }

  const properties2::url_optional& properties2::
  url () const
  {
    return this->url_;
  }

  properties2::url_optional& properties2::
  url ()
  {
    return this->url_;
  }

  void properties2::
  url (const url_type& x)
  {
    this->url_.set (x);
  }

  void properties2::
  url (const url_optional& x)
  {
    this->url_ = x;
  }

  void properties2::
  url (::std::unique_ptr< url_type > x)
  {
    this->url_.set (std::move (x));
  }

  const properties2::attendee_sequence& properties2::
  attendee () const
  {
    return this->attendee_;
  }

  properties2::attendee_sequence& properties2::
  attendee ()
  {
    return this->attendee_;
  }

  void properties2::
  attendee (const attendee_sequence& s)
  {
    this->attendee_ = s;
  }

  const properties2::attach_sequence& properties2::
  attach () const
  {
    return this->attach_;
  }

  properties2::attach_sequence& properties2::
  attach ()
  {
    return this->attach_;
  }

  void properties2::
  attach (const attach_sequence& s)
  {
    this->attach_ = s;
  }

  const properties2::x_custom_sequence& properties2::
  x_custom () const
  {
    return this->x_custom_;
  }

  properties2::x_custom_sequence& properties2::
  x_custom ()
  {
    return this->x_custom_;
  }

  void properties2::
  x_custom (const x_custom_sequence& s)
  {
    this->x_custom_ = s;
  }


  // properties3
  //

  const properties3::uid_type& properties3::
  uid () const
  {
    return this->uid_.get ();
  }

  properties3::uid_type& properties3::
  uid ()
  {
    return this->uid_.get ();
  }

  void properties3::
  uid (const uid_type& x)
  {
    this->uid_.set (x);
  }

  void properties3::
  uid (::std::unique_ptr< uid_type > x)
  {
    this->uid_.set (std::move (x));
  }

  const properties3::created_type& properties3::
  created () const
  {
    return this->created_.get ();
  }

  properties3::created_type& properties3::
  created ()
  {
    return this->created_.get ();
  }

  void properties3::
  created (const created_type& x)
  {
    this->created_.set (x);
  }

  void properties3::
  created (::std::unique_ptr< created_type > x)
  {
    this->created_.set (std::move (x));
  }

  const properties3::dtstamp_type& properties3::
  dtstamp () const
  {
    return this->dtstamp_.get ();
  }

  properties3::dtstamp_type& properties3::
  dtstamp ()
  {
    return this->dtstamp_.get ();
  }

  void properties3::
  dtstamp (const dtstamp_type& x)
  {
    this->dtstamp_.set (x);
  }

  void properties3::
  dtstamp (::std::unique_ptr< dtstamp_type > x)
  {
    this->dtstamp_.set (std::move (x));
  }

  const properties3::sequence_optional& properties3::
  sequence () const
  {
    return this->sequence_;
  }

  properties3::sequence_optional& properties3::
  sequence ()
  {
    return this->sequence_;
  }

  void properties3::
  sequence (const sequence_type& x)
  {
    this->sequence_.set (x);
  }

  void properties3::
  sequence (const sequence_optional& x)
  {
    this->sequence_ = x;
  }

  void properties3::
  sequence (::std::unique_ptr< sequence_type > x)
  {
    this->sequence_.set (std::move (x));
  }

  const properties3::class_optional& properties3::
  class_ () const
  {
    return this->class__;
  }

  properties3::class_optional& properties3::
  class_ ()
  {
    return this->class__;
  }

  void properties3::
  class_ (const class_type& x)
  {
    this->class__.set (x);
  }

  void properties3::
  class_ (const class_optional& x)
  {
    this->class__ = x;
  }

  void properties3::
  class_ (::std::unique_ptr< class_type > x)
  {
    this->class__.set (std::move (x));
  }

  const properties3::categories_optional& properties3::
  categories () const
  {
    return this->categories_;
  }

  properties3::categories_optional& properties3::
  categories ()
  {
    return this->categories_;
  }

  void properties3::
  categories (const categories_type& x)
  {
    this->categories_.set (x);
  }

  void properties3::
  categories (const categories_optional& x)
  {
    this->categories_ = x;
  }

  void properties3::
  categories (::std::unique_ptr< categories_type > x)
  {
    this->categories_.set (std::move (x));
  }

  const properties3::related_to_sequence& properties3::
  related_to () const
  {
    return this->related_to_;
  }

  properties3::related_to_sequence& properties3::
  related_to ()
  {
    return this->related_to_;
  }

  void properties3::
  related_to (const related_to_sequence& s)
  {
    this->related_to_ = s;
  }

  const properties3::dtstart_optional& properties3::
  dtstart () const
  {
    return this->dtstart_;
  }

  properties3::dtstart_optional& properties3::
  dtstart ()
  {
    return this->dtstart_;
  }

  void properties3::
  dtstart (const dtstart_type& x)
  {
    this->dtstart_.set (x);
  }

  void properties3::
  dtstart (const dtstart_optional& x)
  {
    this->dtstart_ = x;
  }

  void properties3::
  dtstart (::std::unique_ptr< dtstart_type > x)
  {
    this->dtstart_.set (std::move (x));
  }

  const properties3::summary_optional& properties3::
  summary () const
  {
    return this->summary_;
  }

  properties3::summary_optional& properties3::
  summary ()
  {
    return this->summary_;
  }

  void properties3::
  summary (const summary_type& x)
  {
    this->summary_.set (x);
  }

  void properties3::
  summary (const summary_optional& x)
  {
    this->summary_ = x;
  }

  void properties3::
  summary (::std::unique_ptr< summary_type > x)
  {
    this->summary_.set (std::move (x));
  }

  const properties3::description_optional& properties3::
  description () const
  {
    return this->description_;
  }

  properties3::description_optional& properties3::
  description ()
  {
    return this->description_;
  }

  void properties3::
  description (const description_type& x)
  {
    this->description_.set (x);
  }

  void properties3::
  description (const description_optional& x)
  {
    this->description_ = x;
  }

  void properties3::
  description (::std::unique_ptr< description_type > x)
  {
    this->description_.set (std::move (x));
  }

  const properties3::comment_optional& properties3::
  comment () const
  {
    return this->comment_;
  }

  properties3::comment_optional& properties3::
  comment ()
  {
    return this->comment_;
  }

  void properties3::
  comment (const comment_type& x)
  {
    this->comment_.set (x);
  }

  void properties3::
  comment (const comment_optional& x)
  {
    this->comment_ = x;
  }

  void properties3::
  comment (::std::unique_ptr< comment_type > x)
  {
    this->comment_.set (std::move (x));
  }

  const properties3::status_optional& properties3::
  status () const
  {
    return this->status_;
  }

  properties3::status_optional& properties3::
  status ()
  {
    return this->status_;
  }

  void properties3::
  status (const status_type& x)
  {
    this->status_.set (x);
  }

  void properties3::
  status (const status_optional& x)
  {
    this->status_ = x;
  }

  void properties3::
  status (::std::unique_ptr< status_type > x)
  {
    this->status_.set (std::move (x));
  }

  const properties3::contact_optional& properties3::
  contact () const
  {
    return this->contact_;
  }

  properties3::contact_optional& properties3::
  contact ()
  {
    return this->contact_;
  }

  void properties3::
  contact (const contact_type& x)
  {
    this->contact_.set (x);
  }

  void properties3::
  contact (const contact_optional& x)
  {
    this->contact_ = x;
  }

  void properties3::
  contact (::std::unique_ptr< contact_type > x)
  {
    this->contact_.set (std::move (x));
  }

  const properties3::attendee_sequence& properties3::
  attendee () const
  {
    return this->attendee_;
  }

  properties3::attendee_sequence& properties3::
  attendee ()
  {
    return this->attendee_;
  }

  void properties3::
  attendee (const attendee_sequence& s)
  {
    this->attendee_ = s;
  }

  const properties3::attach_sequence& properties3::
  attach () const
  {
    return this->attach_;
  }

  properties3::attach_sequence& properties3::
  attach ()
  {
    return this->attach_;
  }

  void properties3::
  attach (const attach_sequence& s)
  {
    this->attach_ = s;
  }

  const properties3::x_custom_sequence& properties3::
  x_custom () const
  {
    return this->x_custom_;
  }

  properties3::x_custom_sequence& properties3::
  x_custom ()
  {
    return this->x_custom_;
  }

  void properties3::
  x_custom (const x_custom_sequence& s)
  {
    this->x_custom_ = s;
  }


  // properties4
  //

  const properties4::uid_type& properties4::
  uid () const
  {
    return this->uid_.get ();
  }

  properties4::uid_type& properties4::
  uid ()
  {
    return this->uid_.get ();
  }

  void properties4::
  uid (const uid_type& x)
  {
    this->uid_.set (x);
  }

  void properties4::
  uid (::std::unique_ptr< uid_type > x)
  {
    this->uid_.set (std::move (x));
  }

  const properties4::dtstamp_type& properties4::
  dtstamp () const
  {
    return this->dtstamp_.get ();
  }

  properties4::dtstamp_type& properties4::
  dtstamp ()
  {
    return this->dtstamp_.get ();
  }

  void properties4::
  dtstamp (const dtstamp_type& x)
  {
    this->dtstamp_.set (x);
  }

  void properties4::
  dtstamp (::std::unique_ptr< dtstamp_type > x)
  {
    this->dtstamp_.set (std::move (x));
  }

  const properties4::dtstart_optional& properties4::
  dtstart () const
  {
    return this->dtstart_;
  }

  properties4::dtstart_optional& properties4::
  dtstart ()
  {
    return this->dtstart_;
  }

  void properties4::
  dtstart (const dtstart_type& x)
  {
    this->dtstart_.set (x);
  }

  void properties4::
  dtstart (const dtstart_optional& x)
  {
    this->dtstart_ = x;
  }

  void properties4::
  dtstart (::std::unique_ptr< dtstart_type > x)
  {
    this->dtstart_.set (std::move (x));
  }

  const properties4::dtend_optional& properties4::
  dtend () const
  {
    return this->dtend_;
  }

  properties4::dtend_optional& properties4::
  dtend ()
  {
    return this->dtend_;
  }

  void properties4::
  dtend (const dtend_type& x)
  {
    this->dtend_.set (x);
  }

  void properties4::
  dtend (const dtend_optional& x)
  {
    this->dtend_ = x;
  }

  void properties4::
  dtend (::std::unique_ptr< dtend_type > x)
  {
    this->dtend_.set (std::move (x));
  }

  const properties4::organizer_optional& properties4::
  organizer () const
  {
    return this->organizer_;
  }

  properties4::organizer_optional& properties4::
  organizer ()
  {
    return this->organizer_;
  }

  void properties4::
  organizer (const organizer_type& x)
  {
    this->organizer_.set (x);
  }

  void properties4::
  organizer (const organizer_optional& x)
  {
    this->organizer_ = x;
  }

  void properties4::
  organizer (::std::unique_ptr< organizer_type > x)
  {
    this->organizer_.set (std::move (x));
  }

  const properties4::freebusy_sequence& properties4::
  freebusy () const
  {
    return this->freebusy_;
  }

  properties4::freebusy_sequence& properties4::
  freebusy ()
  {
    return this->freebusy_;
  }

  void properties4::
  freebusy (const freebusy_sequence& s)
  {
    this->freebusy_ = s;
  }


  // properties5
  //

  const properties5::prodid_type& properties5::
  prodid () const
  {
    return this->prodid_.get ();
  }

  properties5::prodid_type& properties5::
  prodid ()
  {
    return this->prodid_.get ();
  }

  void properties5::
  prodid (const prodid_type& x)
  {
    this->prodid_.set (x);
  }

  void properties5::
  prodid (::std::unique_ptr< prodid_type > x)
  {
    this->prodid_.set (std::move (x));
  }

  const properties5::version_type& properties5::
  version () const
  {
    return this->version_.get ();
  }

  properties5::version_type& properties5::
  version ()
  {
    return this->version_.get ();
  }

  void properties5::
  version (const version_type& x)
  {
    this->version_.set (x);
  }

  void properties5::
  version (::std::unique_ptr< version_type > x)
  {
    this->version_.set (std::move (x));
  }

  const properties5::x_kolab_version_type& properties5::
  x_kolab_version () const
  {
    return this->x_kolab_version_.get ();
  }

  properties5::x_kolab_version_type& properties5::
  x_kolab_version ()
  {
    return this->x_kolab_version_.get ();
  }

  void properties5::
  x_kolab_version (const x_kolab_version_type& x)
  {
    this->x_kolab_version_.set (x);
  }

  void properties5::
  x_kolab_version (::std::unique_ptr< x_kolab_version_type > x)
  {
    this->x_kolab_version_.set (std::move (x));
  }


  // components1
  //

  const components1::vevent_sequence& components1::
  vevent () const
  {
    return this->vevent_;
  }

  components1::vevent_sequence& components1::
  vevent ()
  {
    return this->vevent_;
  }

  void components1::
  vevent (const vevent_sequence& s)
  {
    this->vevent_ = s;
  }

  const components1::vtodo_sequence& components1::
  vtodo () const
  {
    return this->vtodo_;
  }

  components1::vtodo_sequence& components1::
  vtodo ()
  {
    return this->vtodo_;
  }

  void components1::
  vtodo (const vtodo_sequence& s)
  {
    this->vtodo_ = s;
  }

  const components1::vjournal_sequence& components1::
  vjournal () const
  {
    return this->vjournal_;
  }

  components1::vjournal_sequence& components1::
  vjournal ()
  {
    return this->vjournal_;
  }

  void components1::
  vjournal (const vjournal_sequence& s)
  {
    this->vjournal_ = s;
  }

  const components1::vfreebusy_sequence& components1::
  vfreebusy () const
  {
    return this->vfreebusy_;
  }

  components1::vfreebusy_sequence& components1::
  vfreebusy ()
  {
    return this->vfreebusy_;
  }

  void components1::
  vfreebusy (const vfreebusy_sequence& s)
  {
    this->vfreebusy_ = s;
  }
}

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

#include <xsd/cxx/tree/type-factory-map.hxx>

namespace _xsd
{
  static
  const ::xsd::cxx::tree::type_factory_plate< 0, char >
  type_factory_plate_init;
}

namespace icalendar_2_0
{
  // XlabelParamType
  //

  XlabelParamType::
  XlabelParamType (const text_type& text)
  : ::icalendar_2_0::TextParameterType (text)
  {
  }

  XlabelParamType::
  XlabelParamType (const XlabelParamType& x,
                   ::xml_schema::flags f,
                   ::xml_schema::container* c)
  : ::icalendar_2_0::TextParameterType (x, f, c)
  {
  }

  XlabelParamType::
  XlabelParamType (const ::xercesc::DOMElement& e,
                   ::xml_schema::flags f,
                   ::xml_schema::container* c)
  : ::icalendar_2_0::TextParameterType (e, f, c)
  {
  }

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

  XlabelParamType::
  ~XlabelParamType ()
  {
  }

  static
  const ::xsd::cxx::tree::type_factory_initializer< 0, char, XlabelParamType >
  _xsd_XlabelParamType_type_factory_init (
    "XlabelParamType",
    "urn:ietf:params:xml:ns:icalendar-2.0");

  static
  const ::xsd::cxx::tree::element_factory_initializer< 0, char >
  _xsd_x_label_element_factory_init (
    "baseParameter",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    "x-label",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    &::xsd::cxx::tree::factory_impl< ::icalendar_2_0::XlabelParamType >);


  // XuidParamType
  //

  XuidParamType::
  XuidParamType (const text_type& text)
  : ::icalendar_2_0::TextParameterType (text)
  {
  }

  XuidParamType::
  XuidParamType (const XuidParamType& x,
                 ::xml_schema::flags f,
                 ::xml_schema::container* c)
  : ::icalendar_2_0::TextParameterType (x, f, c)
  {
  }

  XuidParamType::
  XuidParamType (const ::xercesc::DOMElement& e,
                 ::xml_schema::flags f,
                 ::xml_schema::container* c)
  : ::icalendar_2_0::TextParameterType (e, f, c)
  {
  }

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

  XuidParamType::
  ~XuidParamType ()
  {
  }

  static
  const ::xsd::cxx::tree::type_factory_initializer< 0, char, XuidParamType >
  _xsd_XuidParamType_type_factory_init (
    "XuidParamType",
    "urn:ietf:params:xml:ns:icalendar-2.0");

  static
  const ::xsd::cxx::tree::element_factory_initializer< 0, char >
  _xsd_x_uid_element_factory_init (
    "baseParameter",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    "x-uid",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    &::xsd::cxx::tree::factory_impl< ::icalendar_2_0::XuidParamType >);


  // XFBevent
  //

  XFBevent::
  XFBevent (const uid_type& uid,
            const summary_type& summary,
            const location_type& location)
  : ::icalendar_2_0::BaseParameterType (),
    uid_ (uid, this),
    summary_ (summary, this),
    location_ (location, this)
  {
  }

  XFBevent::
  XFBevent (const XFBevent& x,
            ::xml_schema::flags f,
            ::xml_schema::container* c)
  : ::icalendar_2_0::BaseParameterType (x, f, c),
    uid_ (x.uid_, f, this),
    summary_ (x.summary_, f, this),
    location_ (x.location_, f, this)
  {
  }

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

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

      // uid
      //
      if (n.name () == "uid" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< uid_type > r (
          uid_traits::create (i, f, this));

        if (!uid_.present ())
        {
          this->uid_.set (::std::move (r));
          continue;
        }
      }

      // summary
      //
      if (n.name () == "summary" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< summary_type > r (
          summary_traits::create (i, f, this));

        if (!summary_.present ())
        {
          this->summary_.set (::std::move (r));
          continue;
        }
      }

      // location
      //
      if (n.name () == "location" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< location_type > r (
          location_traits::create (i, f, this));

        if (!location_.present ())
        {
          this->location_.set (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!uid_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "uid",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!summary_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "summary",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!location_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "location",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  XFBevent& XFBevent::
  operator= (const XFBevent& x)
  {
    if (this != &x)
    {
      static_cast< ::icalendar_2_0::BaseParameterType& > (*this) = x;
      this->uid_ = x.uid_;
      this->summary_ = x.summary_;
      this->location_ = x.location_;
    }

    return *this;
  }

  XFBevent::
  ~XFBevent ()
  {
  }

  static
  const ::xsd::cxx::tree::type_factory_initializer< 0, char, XFBevent >
  _xsd_XFBevent_type_factory_init (
    "XFBevent",
    "urn:ietf:params:xml:ns:icalendar-2.0");

  static
  const ::xsd::cxx::tree::element_factory_initializer< 0, char >
  _xsd_x_event_element_factory_init (
    "baseParameter",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    "x-event",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    &::xsd::cxx::tree::factory_impl< ::icalendar_2_0::XFBevent >);


  // KolabVersion
  //

  const KolabVersion::text_type KolabVersion::text_default_value_ (
    "3.0");

  KolabVersion::
  KolabVersion (const text_type& text)
  : ::icalendar_2_0::BasePropertyType (),
    text_ (text, this)
  {
  }

  KolabVersion::
  KolabVersion (const KolabVersion& x,
                ::xml_schema::flags f,
                ::xml_schema::container* c)
  : ::icalendar_2_0::BasePropertyType (x, f, c),
    text_ (x.text_, f, this)
  {
  }

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

  void KolabVersion::
  parse (::xsd::cxx::xml::dom::parser< char >& p,
         ::xml_schema::flags f)
  {
    this->::icalendar_2_0::BasePropertyType::parse (p, f);

    for (; p.more_content (); p.next_content (false))
    {
      const ::xercesc::DOMElement& i (p.cur_element ());
      const ::xsd::cxx::xml::qualified_name< char > n (
        ::xsd::cxx::xml::dom::name< char > (i));

      // text
      //
      if (n.name () == "text" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< text_type > r (
          text_traits::create (i, f, this));

        if (!text_.present ())
        {
          this->text_.set (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!text_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "text",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  KolabVersion& KolabVersion::
  operator= (const KolabVersion& x)
  {
    if (this != &x)
    {
      static_cast< ::icalendar_2_0::BasePropertyType& > (*this) = x;
      this->text_ = x.text_;
    }

    return *this;
  }

  KolabVersion::
  ~KolabVersion ()
  {
  }

  static
  const ::xsd::cxx::tree::type_factory_initializer< 0, char, KolabVersion >
  _xsd_KolabVersion_type_factory_init (
    "KolabVersion",
    "urn:ietf:params:xml:ns:icalendar-2.0");

  static
  const ::xsd::cxx::tree::element_factory_initializer< 0, char >
  _xsd_x_kolab_version_element_factory_init (
    "baseProperty",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    "x-kolab-version",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    &::xsd::cxx::tree::factory_impl< ::icalendar_2_0::KolabVersion >);


  // CustomType
  //

  CustomType::
  CustomType (const identifier_type& identifier,
              const value_type& value)
  : ::icalendar_2_0::BasePropertyType (),
    identifier_ (identifier, this),
    value_ (value, this)
  {
  }

  CustomType::
  CustomType (const CustomType& x,
              ::xml_schema::flags f,
              ::xml_schema::container* c)
  : ::icalendar_2_0::BasePropertyType (x, f, c),
    identifier_ (x.identifier_, f, this),
    value_ (x.value_, f, this)
  {
  }

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

  void CustomType::
  parse (::xsd::cxx::xml::dom::parser< char >& p,
         ::xml_schema::flags f)
  {
    this->::icalendar_2_0::BasePropertyType::parse (p, f);

    for (; p.more_content (); p.next_content (false))
    {
      const ::xercesc::DOMElement& i (p.cur_element ());
      const ::xsd::cxx::xml::qualified_name< char > n (
        ::xsd::cxx::xml::dom::name< char > (i));

      // identifier
      //
      if (n.name () == "identifier" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< identifier_type > r (
          identifier_traits::create (i, f, this));

        if (!identifier_.present ())
        {
          this->identifier_.set (::std::move (r));
          continue;
        }
      }

      // value
      //
      if (n.name () == "value" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< value_type > r (
          value_traits::create (i, f, this));

        if (!value_.present ())
        {
          this->value_.set (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!identifier_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "identifier",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!value_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "value",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  CustomType& CustomType::
  operator= (const CustomType& x)
  {
    if (this != &x)
    {
      static_cast< ::icalendar_2_0::BasePropertyType& > (*this) = x;
      this->identifier_ = x.identifier_;
      this->value_ = x.value_;
    }

    return *this;
  }

  CustomType::
  ~CustomType ()
  {
  }

  static
  const ::xsd::cxx::tree::type_factory_initializer< 0, char, CustomType >
  _xsd_CustomType_type_factory_init (
    "CustomType",
    "urn:ietf:params:xml:ns:icalendar-2.0");

  // ContactType
  //

  ContactType::
  ContactType (const cal_address_type& cal_address)
  : ::icalendar_2_0::CalAddressPropertyType (cal_address)
  {
  }

  ContactType::
  ContactType (const ContactType& x,
               ::xml_schema::flags f,
               ::xml_schema::container* c)
  : ::icalendar_2_0::CalAddressPropertyType (x, f, c)
  {
  }

  ContactType::
  ContactType (const ::xercesc::DOMElement& e,
               ::xml_schema::flags f,
               ::xml_schema::container* c)
  : ::icalendar_2_0::CalAddressPropertyType (e, f, c)
  {
  }

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

  ContactType::
  ~ContactType ()
  {
  }

  static
  const ::xsd::cxx::tree::type_factory_initializer< 0, char, ContactType >
  _xsd_ContactType_type_factory_init (
    "ContactType",
    "urn:ietf:params:xml:ns:icalendar-2.0");

  // ValarmType
  //

  ValarmType::
  ValarmType (const properties_type& properties)
  : ::xml_schema::type (),
    properties_ (properties, this)
  {
  }

  ValarmType::
  ValarmType (::std::unique_ptr< properties_type > properties)
  : ::xml_schema::type (),
    properties_ (std::move (properties), this)
  {
  }

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

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

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

      // properties
      //
      if (n.name () == "properties" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< properties_type > r (
          properties_traits::create (i, f, this));

        if (!properties_.present ())
        {
          this->properties_.set (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!properties_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "properties",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  ValarmType& ValarmType::
  operator= (const ValarmType& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->properties_ = x.properties_;
    }

    return *this;
  }

  ValarmType::
  ~ValarmType ()
  {
  }

  // KolabEvent
  //

  KolabEvent::
  KolabEvent (const properties_type& properties)
  : ::xml_schema::type (),
    properties_ (properties, this),
    components_ (this)
  {
  }

  KolabEvent::
  KolabEvent (::std::unique_ptr< properties_type > properties)
  : ::xml_schema::type (),
    properties_ (std::move (properties), this),
    components_ (this)
  {
  }

  KolabEvent::
  KolabEvent (const KolabEvent& x,
              ::xml_schema::flags f,
              ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    properties_ (x.properties_, f, this),
    components_ (x.components_, f, this)
  {
  }

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

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

      // properties
      //
      if (n.name () == "properties" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< properties_type > r (
          properties_traits::create (i, f, this));

        if (!properties_.present ())
        {
          this->properties_.set (::std::move (r));
          continue;
        }
      }

      // components
      //
      if (n.name () == "components" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< components_type > r (
          components_traits::create (i, f, this));

        if (!this->components_)
        {
          this->components_.set (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!properties_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "properties",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  KolabEvent& KolabEvent::
  operator= (const KolabEvent& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->properties_ = x.properties_;
      this->components_ = x.components_;
    }

    return *this;
  }

  KolabEvent::
  ~KolabEvent ()
  {
  }

  // KolabTodo
  //

  KolabTodo::
  KolabTodo (const properties_type& properties)
  : ::xml_schema::type (),
    properties_ (properties, this),
    components_ (this)
  {
  }

  KolabTodo::
  KolabTodo (::std::unique_ptr< properties_type > properties)
  : ::xml_schema::type (),
    properties_ (std::move (properties), this),
    components_ (this)
  {
  }

  KolabTodo::
  KolabTodo (const KolabTodo& x,
             ::xml_schema::flags f,
             ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    properties_ (x.properties_, f, this),
    components_ (x.components_, f, this)
  {
  }

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

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

      // properties
      //
      if (n.name () == "properties" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< properties_type > r (
          properties_traits::create (i, f, this));

        if (!properties_.present ())
        {
          this->properties_.set (::std::move (r));
          continue;
        }
      }

      // components
      //
      if (n.name () == "components" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< components_type > r (
          components_traits::create (i, f, this));

        if (!this->components_)
        {
          this->components_.set (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!properties_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "properties",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  KolabTodo& KolabTodo::
  operator= (const KolabTodo& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->properties_ = x.properties_;
      this->components_ = x.components_;
    }

    return *this;
  }

  KolabTodo::
  ~KolabTodo ()
  {
  }

  // KolabJournal
  //

  KolabJournal::
  KolabJournal (const properties_type& properties)
  : ::xml_schema::type (),
    properties_ (properties, this)
  {
  }

  KolabJournal::
  KolabJournal (::std::unique_ptr< properties_type > properties)
  : ::xml_schema::type (),
    properties_ (std::move (properties), this)
  {
  }

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

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

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

      // properties
      //
      if (n.name () == "properties" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< properties_type > r (
          properties_traits::create (i, f, this));

        if (!properties_.present ())
        {
          this->properties_.set (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!properties_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "properties",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  KolabJournal& KolabJournal::
  operator= (const KolabJournal& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->properties_ = x.properties_;
    }

    return *this;
  }

  KolabJournal::
  ~KolabJournal ()
  {
  }

  // KolabFreebusy
  //

  KolabFreebusy::
  KolabFreebusy (const properties_type& properties)
  : ::xml_schema::type (),
    properties_ (properties, this)
  {
  }

  KolabFreebusy::
  KolabFreebusy (::std::unique_ptr< properties_type > properties)
  : ::xml_schema::type (),
    properties_ (std::move (properties), this)
  {
  }

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

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

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

      // properties
      //
      if (n.name () == "properties" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< properties_type > r (
          properties_traits::create (i, f, this));

        if (!properties_.present ())
        {
          this->properties_.set (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!properties_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "properties",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  KolabFreebusy& KolabFreebusy::
  operator= (const KolabFreebusy& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->properties_ = x.properties_;
    }

    return *this;
  }

  KolabFreebusy::
  ~KolabFreebusy ()
  {
  }

  // VcalendarType
  //

  VcalendarType::
  VcalendarType (const properties_type& properties,
                 const components_type& components)
  : ::xml_schema::type (),
    properties_ (properties, this),
    components_ (components, this)
  {
  }

  VcalendarType::
  VcalendarType (::std::unique_ptr< properties_type > properties,
                 ::std::unique_ptr< components_type > components)
  : ::xml_schema::type (),
    properties_ (std::move (properties), this),
    components_ (std::move (components), this)
  {
  }

  VcalendarType::
  VcalendarType (const VcalendarType& x,
                 ::xml_schema::flags f,
                 ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    properties_ (x.properties_, f, this),
    components_ (x.components_, f, this)
  {
  }

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

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

      // properties
      //
      if (n.name () == "properties" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< properties_type > r (
          properties_traits::create (i, f, this));

        if (!properties_.present ())
        {
          this->properties_.set (::std::move (r));
          continue;
        }
      }

      // components
      //
      if (n.name () == "components" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< components_type > r (
          components_traits::create (i, f, this));

        if (!components_.present ())
        {
          this->components_.set (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!properties_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "properties",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!components_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "components",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  VcalendarType& VcalendarType::
  operator= (const VcalendarType& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->properties_ = x.properties_;
      this->components_ = x.components_;
    }

    return *this;
  }

  VcalendarType::
  ~VcalendarType ()
  {
  }

  // IcalendarType
  //

  IcalendarType::
  IcalendarType (const vcalendar_type& vcalendar)
  : ::xml_schema::type (),
    vcalendar_ (vcalendar, this)
  {
  }

  IcalendarType::
  IcalendarType (::std::unique_ptr< vcalendar_type > vcalendar)
  : ::xml_schema::type (),
    vcalendar_ (std::move (vcalendar), this)
  {
  }

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

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

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

      // vcalendar
      //
      if (n.name () == "vcalendar" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< vcalendar_type > r (
          vcalendar_traits::create (i, f, this));

        if (!vcalendar_.present ())
        {
          this->vcalendar_.set (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!vcalendar_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "vcalendar",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  IcalendarType& IcalendarType::
  operator= (const IcalendarType& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->vcalendar_ = x.vcalendar_;
    }

    return *this;
  }

  IcalendarType::
  ~IcalendarType ()
  {
  }

  // properties
  //

  properties::
  properties (const action_type& action,
              const trigger_type& trigger)
  : ::xml_schema::type (),
    action_ (action, this),
    summary_ (this),
    description_ (this),
    attendee_ (this),
    attach_ (this),
    trigger_ (trigger, this),
    duration_ (this),
    repeat_ (this)
  {
  }

  properties::
  properties (::std::unique_ptr< action_type > action,
              ::std::unique_ptr< trigger_type > trigger)
  : ::xml_schema::type (),
    action_ (std::move (action), this),
    summary_ (this),
    description_ (this),
    attendee_ (this),
    attach_ (this),
    trigger_ (std::move (trigger), this),
    duration_ (this),
    repeat_ (this)
  {
  }

  properties::
  properties (const properties& x,
              ::xml_schema::flags f,
              ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    action_ (x.action_, f, this),
    summary_ (x.summary_, f, this),
    description_ (x.description_, f, this),
    attendee_ (x.attendee_, f, this),
    attach_ (x.attach_, f, this),
    trigger_ (x.trigger_, f, this),
    duration_ (x.duration_, f, this),
    repeat_ (x.repeat_, f, this)
  {
  }

  properties::
  properties (const ::xercesc::DOMElement& e,
              ::xml_schema::flags f,
              ::xml_schema::container* c)
  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
    action_ (this),
    summary_ (this),
    description_ (this),
    attendee_ (this),
    attach_ (this),
    trigger_ (this),
    duration_ (this),
    repeat_ (this)
  {
    if ((f & ::xml_schema::flags::base) == 0)
    {
      ::xsd::cxx::xml::dom::parser< char > p (e, true, false, false);
      this->parse (p, f);
    }
  }

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

      // action
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "action",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< action_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!action_.present ())
          {
            ::std::unique_ptr< action_type > r (
              dynamic_cast< action_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->action_.set (::std::move (r));
            continue;
          }
        }
      }

      // summary
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "summary",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< summary_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->summary_)
          {
            ::std::unique_ptr< summary_type > r (
              dynamic_cast< summary_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->summary_.set (::std::move (r));
            continue;
          }
        }
      }

      // description
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "description",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< description_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->description_)
          {
            ::std::unique_ptr< description_type > r (
              dynamic_cast< description_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->description_.set (::std::move (r));
            continue;
          }
        }
      }

      // attendee
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "attendee",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< attendee_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< attendee_type > r (
            dynamic_cast< attendee_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->attendee_.push_back (::std::move (r));
          continue;
        }
      }

      // attach
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "attach",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< attach_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->attach_)
          {
            ::std::unique_ptr< attach_type > r (
              dynamic_cast< attach_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->attach_.set (::std::move (r));
            continue;
          }
        }
      }

      // trigger
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "trigger",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< trigger_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!trigger_.present ())
          {
            ::std::unique_ptr< trigger_type > r (
              dynamic_cast< trigger_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->trigger_.set (::std::move (r));
            continue;
          }
        }
      }

      // duration
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "duration",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< duration_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->duration_)
          {
            ::std::unique_ptr< duration_type > r (
              dynamic_cast< duration_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->duration_.set (::std::move (r));
            continue;
          }
        }
      }

      // repeat
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "repeat",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< repeat_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->repeat_)
          {
            ::std::unique_ptr< repeat_type > r (
              dynamic_cast< repeat_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->repeat_.set (::std::move (r));
            continue;
          }
        }
      }

      break;
    }

    if (!action_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "action",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!trigger_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "trigger",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  properties& properties::
  operator= (const properties& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->action_ = x.action_;
      this->summary_ = x.summary_;
      this->description_ = x.description_;
      this->attendee_ = x.attendee_;
      this->attach_ = x.attach_;
      this->trigger_ = x.trigger_;
      this->duration_ = x.duration_;
      this->repeat_ = x.repeat_;
    }

    return *this;
  }

  properties::
  ~properties ()
  {
  }

  // properties1
  //

  properties1::
  properties1 (const uid_type& uid,
               const created_type& created,
               const dtstamp_type& dtstamp)
  : ::xml_schema::type (),
    uid_ (uid, this),
    created_ (created, this),
    dtstamp_ (dtstamp, this),
    sequence_ (this),
    class__ (this),
    categories_ (this),
    dtstart_ (this),
    dtend_ (this),
    duration_ (this),
    transp_ (this),
    rrule_ (this),
    rdate_ (this),
    exdate_ (this),
    recurrence_id_ (this),
    summary_ (this),
    description_ (this),
    comment_ (this),
    priority_ (this),
    status_ (this),
    location_ (this),
    organizer_ (this),
    url_ (this),
    attendee_ (this),
    attach_ (this),
    x_custom_ (this)
  {
  }

  properties1::
  properties1 (::std::unique_ptr< uid_type > uid,
               ::std::unique_ptr< created_type > created,
               ::std::unique_ptr< dtstamp_type > dtstamp)
  : ::xml_schema::type (),
    uid_ (std::move (uid), this),
    created_ (std::move (created), this),
    dtstamp_ (std::move (dtstamp), this),
    sequence_ (this),
    class__ (this),
    categories_ (this),
    dtstart_ (this),
    dtend_ (this),
    duration_ (this),
    transp_ (this),
    rrule_ (this),
    rdate_ (this),
    exdate_ (this),
    recurrence_id_ (this),
    summary_ (this),
    description_ (this),
    comment_ (this),
    priority_ (this),
    status_ (this),
    location_ (this),
    organizer_ (this),
    url_ (this),
    attendee_ (this),
    attach_ (this),
    x_custom_ (this)
  {
  }

  properties1::
  properties1 (const properties1& x,
               ::xml_schema::flags f,
               ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    uid_ (x.uid_, f, this),
    created_ (x.created_, f, this),
    dtstamp_ (x.dtstamp_, f, this),
    sequence_ (x.sequence_, f, this),
    class__ (x.class__, f, this),
    categories_ (x.categories_, f, this),
    dtstart_ (x.dtstart_, f, this),
    dtend_ (x.dtend_, f, this),
    duration_ (x.duration_, f, this),
    transp_ (x.transp_, f, this),
    rrule_ (x.rrule_, f, this),
    rdate_ (x.rdate_, f, this),
    exdate_ (x.exdate_, f, this),
    recurrence_id_ (x.recurrence_id_, f, this),
    summary_ (x.summary_, f, this),
    description_ (x.description_, f, this),
    comment_ (x.comment_, f, this),
    priority_ (x.priority_, f, this),
    status_ (x.status_, f, this),
    location_ (x.location_, f, this),
    organizer_ (x.organizer_, f, this),
    url_ (x.url_, f, this),
    attendee_ (x.attendee_, f, this),
    attach_ (x.attach_, f, this),
    x_custom_ (x.x_custom_, f, this)
  {
  }

  properties1::
  properties1 (const ::xercesc::DOMElement& e,
               ::xml_schema::flags f,
               ::xml_schema::container* c)
  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
    uid_ (this),
    created_ (this),
    dtstamp_ (this),
    sequence_ (this),
    class__ (this),
    categories_ (this),
    dtstart_ (this),
    dtend_ (this),
    duration_ (this),
    transp_ (this),
    rrule_ (this),
    rdate_ (this),
    exdate_ (this),
    recurrence_id_ (this),
    summary_ (this),
    description_ (this),
    comment_ (this),
    priority_ (this),
    status_ (this),
    location_ (this),
    organizer_ (this),
    url_ (this),
    attendee_ (this),
    attach_ (this),
    x_custom_ (this)
  {
    if ((f & ::xml_schema::flags::base) == 0)
    {
      ::xsd::cxx::xml::dom::parser< char > p (e, true, false, false);
      this->parse (p, f);
    }
  }

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

      // uid
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "uid",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< uid_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!uid_.present ())
          {
            ::std::unique_ptr< uid_type > r (
              dynamic_cast< uid_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->uid_.set (::std::move (r));
            continue;
          }
        }
      }

      // created
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "created",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< created_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!created_.present ())
          {
            ::std::unique_ptr< created_type > r (
              dynamic_cast< created_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->created_.set (::std::move (r));
            continue;
          }
        }
      }

      // dtstamp
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "dtstamp",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< dtstamp_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!dtstamp_.present ())
          {
            ::std::unique_ptr< dtstamp_type > r (
              dynamic_cast< dtstamp_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->dtstamp_.set (::std::move (r));
            continue;
          }
        }
      }

      // sequence
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "sequence",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< sequence_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->sequence_)
          {
            ::std::unique_ptr< sequence_type > r (
              dynamic_cast< sequence_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->sequence_.set (::std::move (r));
            continue;
          }
        }
      }

      // class
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "class",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< class_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->class__)
          {
            ::std::unique_ptr< class_type > r (
              dynamic_cast< class_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->class__.set (::std::move (r));
            continue;
          }
        }
      }

      // categories
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "categories",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< categories_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->categories_)
          {
            ::std::unique_ptr< categories_type > r (
              dynamic_cast< categories_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->categories_.set (::std::move (r));
            continue;
          }
        }
      }

      // dtstart
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "dtstart",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< dtstart_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->dtstart_)
          {
            ::std::unique_ptr< dtstart_type > r (
              dynamic_cast< dtstart_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->dtstart_.set (::std::move (r));
            continue;
          }
        }
      }

      // dtend
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "dtend",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< dtend_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->dtend_)
          {
            ::std::unique_ptr< dtend_type > r (
              dynamic_cast< dtend_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->dtend_.set (::std::move (r));
            continue;
          }
        }
      }

      // duration
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "duration",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< duration_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->duration_)
          {
            ::std::unique_ptr< duration_type > r (
              dynamic_cast< duration_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->duration_.set (::std::move (r));
            continue;
          }
        }
      }

      // transp
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "transp",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< transp_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->transp_)
          {
            ::std::unique_ptr< transp_type > r (
              dynamic_cast< transp_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->transp_.set (::std::move (r));
            continue;
          }
        }
      }

      // rrule
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "rrule",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< rrule_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->rrule_)
          {
            ::std::unique_ptr< rrule_type > r (
              dynamic_cast< rrule_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->rrule_.set (::std::move (r));
            continue;
          }
        }
      }

      // rdate
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "rdate",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< rdate_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->rdate_)
          {
            ::std::unique_ptr< rdate_type > r (
              dynamic_cast< rdate_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->rdate_.set (::std::move (r));
            continue;
          }
        }
      }

      // exdate
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "exdate",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< exdate_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->exdate_)
          {
            ::std::unique_ptr< exdate_type > r (
              dynamic_cast< exdate_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->exdate_.set (::std::move (r));
            continue;
          }
        }
      }

      // recurrence-id
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "recurrence-id",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< recurrence_id_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->recurrence_id_)
          {
            ::std::unique_ptr< recurrence_id_type > r (
              dynamic_cast< recurrence_id_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->recurrence_id_.set (::std::move (r));
            continue;
          }
        }
      }

      // summary
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "summary",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< summary_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->summary_)
          {
            ::std::unique_ptr< summary_type > r (
              dynamic_cast< summary_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->summary_.set (::std::move (r));
            continue;
          }
        }
      }

      // description
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "description",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< description_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->description_)
          {
            ::std::unique_ptr< description_type > r (
              dynamic_cast< description_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->description_.set (::std::move (r));
            continue;
          }
        }
      }

      // comment
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "comment",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< comment_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->comment_)
          {
            ::std::unique_ptr< comment_type > r (
              dynamic_cast< comment_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->comment_.set (::std::move (r));
            continue;
          }
        }
      }

      // priority
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "priority",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< priority_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->priority_)
          {
            ::std::unique_ptr< priority_type > r (
              dynamic_cast< priority_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->priority_.set (::std::move (r));
            continue;
          }
        }
      }

      // status
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "status",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< status_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->status_)
          {
            ::std::unique_ptr< status_type > r (
              dynamic_cast< status_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->status_.set (::std::move (r));
            continue;
          }
        }
      }

      // location
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "location",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< location_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->location_)
          {
            ::std::unique_ptr< location_type > r (
              dynamic_cast< location_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->location_.set (::std::move (r));
            continue;
          }
        }
      }

      // organizer
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "organizer",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< organizer_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->organizer_)
          {
            ::std::unique_ptr< organizer_type > r (
              dynamic_cast< organizer_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->organizer_.set (::std::move (r));
            continue;
          }
        }
      }

      // url
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "url",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< url_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->url_)
          {
            ::std::unique_ptr< url_type > r (
              dynamic_cast< url_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->url_.set (::std::move (r));
            continue;
          }
        }
      }

      // attendee
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "attendee",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< attendee_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< attendee_type > r (
            dynamic_cast< attendee_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->attendee_.push_back (::std::move (r));
          continue;
        }
      }

      // attach
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "attach",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< attach_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< attach_type > r (
            dynamic_cast< attach_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->attach_.push_back (::std::move (r));
          continue;
        }
      }

      // x-custom
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "x-custom",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< x_custom_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< x_custom_type > r (
            dynamic_cast< x_custom_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->x_custom_.push_back (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!uid_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "uid",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!created_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "created",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!dtstamp_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "dtstamp",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  properties1& properties1::
  operator= (const properties1& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->uid_ = x.uid_;
      this->created_ = x.created_;
      this->dtstamp_ = x.dtstamp_;
      this->sequence_ = x.sequence_;
      this->class__ = x.class__;
      this->categories_ = x.categories_;
      this->dtstart_ = x.dtstart_;
      this->dtend_ = x.dtend_;
      this->duration_ = x.duration_;
      this->transp_ = x.transp_;
      this->rrule_ = x.rrule_;
      this->rdate_ = x.rdate_;
      this->exdate_ = x.exdate_;
      this->recurrence_id_ = x.recurrence_id_;
      this->summary_ = x.summary_;
      this->description_ = x.description_;
      this->comment_ = x.comment_;
      this->priority_ = x.priority_;
      this->status_ = x.status_;
      this->location_ = x.location_;
      this->organizer_ = x.organizer_;
      this->url_ = x.url_;
      this->attendee_ = x.attendee_;
      this->attach_ = x.attach_;
      this->x_custom_ = x.x_custom_;
    }

    return *this;
  }

  properties1::
  ~properties1 ()
  {
  }

  // components
  //

  components::
  components ()
  : ::xml_schema::type (),
    valarm_ (this)
  {
  }

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

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

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

      // valarm
      //
      if (n.name () == "valarm" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< valarm_type > r (
          valarm_traits::create (i, f, this));

        this->valarm_.push_back (::std::move (r));
        continue;
      }

      break;
    }
  }

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

  components& components::
  operator= (const components& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->valarm_ = x.valarm_;
    }

    return *this;
  }

  components::
  ~components ()
  {
  }

  // properties2
  //

  properties2::
  properties2 (const uid_type& uid,
               const created_type& created,
               const dtstamp_type& dtstamp)
  : ::xml_schema::type (),
    uid_ (uid, this),
    created_ (created, this),
    dtstamp_ (dtstamp, this),
    sequence_ (this),
    class__ (this),
    categories_ (this),
    related_to_ (this),
    dtstart_ (this),
    due_ (this),
    rrule_ (this),
    rdate_ (this),
    exdate_ (this),
    recurrence_id_ (this),
    summary_ (this),
    description_ (this),
    comment_ (this),
    priority_ (this),
    status_ (this),
    percent_complete_ (this),
    location_ (this),
    organizer_ (this),
    url_ (this),
    attendee_ (this),
    attach_ (this),
    x_custom_ (this)
  {
  }

  properties2::
  properties2 (::std::unique_ptr< uid_type > uid,
               ::std::unique_ptr< created_type > created,
               ::std::unique_ptr< dtstamp_type > dtstamp)
  : ::xml_schema::type (),
    uid_ (std::move (uid), this),
    created_ (std::move (created), this),
    dtstamp_ (std::move (dtstamp), this),
    sequence_ (this),
    class__ (this),
    categories_ (this),
    related_to_ (this),
    dtstart_ (this),
    due_ (this),
    rrule_ (this),
    rdate_ (this),
    exdate_ (this),
    recurrence_id_ (this),
    summary_ (this),
    description_ (this),
    comment_ (this),
    priority_ (this),
    status_ (this),
    percent_complete_ (this),
    location_ (this),
    organizer_ (this),
    url_ (this),
    attendee_ (this),
    attach_ (this),
    x_custom_ (this)
  {
  }

  properties2::
  properties2 (const properties2& x,
               ::xml_schema::flags f,
               ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    uid_ (x.uid_, f, this),
    created_ (x.created_, f, this),
    dtstamp_ (x.dtstamp_, f, this),
    sequence_ (x.sequence_, f, this),
    class__ (x.class__, f, this),
    categories_ (x.categories_, f, this),
    related_to_ (x.related_to_, f, this),
    dtstart_ (x.dtstart_, f, this),
    due_ (x.due_, f, this),
    rrule_ (x.rrule_, f, this),
    rdate_ (x.rdate_, f, this),
    exdate_ (x.exdate_, f, this),
    recurrence_id_ (x.recurrence_id_, f, this),
    summary_ (x.summary_, f, this),
    description_ (x.description_, f, this),
    comment_ (x.comment_, f, this),
    priority_ (x.priority_, f, this),
    status_ (x.status_, f, this),
    percent_complete_ (x.percent_complete_, f, this),
    location_ (x.location_, f, this),
    organizer_ (x.organizer_, f, this),
    url_ (x.url_, f, this),
    attendee_ (x.attendee_, f, this),
    attach_ (x.attach_, f, this),
    x_custom_ (x.x_custom_, f, this)
  {
  }

  properties2::
  properties2 (const ::xercesc::DOMElement& e,
               ::xml_schema::flags f,
               ::xml_schema::container* c)
  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
    uid_ (this),
    created_ (this),
    dtstamp_ (this),
    sequence_ (this),
    class__ (this),
    categories_ (this),
    related_to_ (this),
    dtstart_ (this),
    due_ (this),
    rrule_ (this),
    rdate_ (this),
    exdate_ (this),
    recurrence_id_ (this),
    summary_ (this),
    description_ (this),
    comment_ (this),
    priority_ (this),
    status_ (this),
    percent_complete_ (this),
    location_ (this),
    organizer_ (this),
    url_ (this),
    attendee_ (this),
    attach_ (this),
    x_custom_ (this)
  {
    if ((f & ::xml_schema::flags::base) == 0)
    {
      ::xsd::cxx::xml::dom::parser< char > p (e, true, false, false);
      this->parse (p, f);
    }
  }

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

      // uid
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "uid",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< uid_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!uid_.present ())
          {
            ::std::unique_ptr< uid_type > r (
              dynamic_cast< uid_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->uid_.set (::std::move (r));
            continue;
          }
        }
      }

      // created
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "created",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< created_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!created_.present ())
          {
            ::std::unique_ptr< created_type > r (
              dynamic_cast< created_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->created_.set (::std::move (r));
            continue;
          }
        }
      }

      // dtstamp
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "dtstamp",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< dtstamp_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!dtstamp_.present ())
          {
            ::std::unique_ptr< dtstamp_type > r (
              dynamic_cast< dtstamp_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->dtstamp_.set (::std::move (r));
            continue;
          }
        }
      }

      // sequence
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "sequence",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< sequence_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->sequence_)
          {
            ::std::unique_ptr< sequence_type > r (
              dynamic_cast< sequence_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->sequence_.set (::std::move (r));
            continue;
          }
        }
      }

      // class
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "class",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< class_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->class__)
          {
            ::std::unique_ptr< class_type > r (
              dynamic_cast< class_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->class__.set (::std::move (r));
            continue;
          }
        }
      }

      // categories
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "categories",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< categories_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->categories_)
          {
            ::std::unique_ptr< categories_type > r (
              dynamic_cast< categories_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->categories_.set (::std::move (r));
            continue;
          }
        }
      }

      // related-to
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "related-to",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< related_to_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< related_to_type > r (
            dynamic_cast< related_to_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->related_to_.push_back (::std::move (r));
          continue;
        }
      }

      // dtstart
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "dtstart",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< dtstart_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->dtstart_)
          {
            ::std::unique_ptr< dtstart_type > r (
              dynamic_cast< dtstart_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->dtstart_.set (::std::move (r));
            continue;
          }
        }
      }

      // due
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "due",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< due_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->due_)
          {
            ::std::unique_ptr< due_type > r (
              dynamic_cast< due_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->due_.set (::std::move (r));
            continue;
          }
        }
      }

      // rrule
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "rrule",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< rrule_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->rrule_)
          {
            ::std::unique_ptr< rrule_type > r (
              dynamic_cast< rrule_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->rrule_.set (::std::move (r));
            continue;
          }
        }
      }

      // rdate
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "rdate",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< rdate_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->rdate_)
          {
            ::std::unique_ptr< rdate_type > r (
              dynamic_cast< rdate_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->rdate_.set (::std::move (r));
            continue;
          }
        }
      }

      // exdate
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "exdate",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< exdate_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->exdate_)
          {
            ::std::unique_ptr< exdate_type > r (
              dynamic_cast< exdate_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->exdate_.set (::std::move (r));
            continue;
          }
        }
      }

      // recurrence-id
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "recurrence-id",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< recurrence_id_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->recurrence_id_)
          {
            ::std::unique_ptr< recurrence_id_type > r (
              dynamic_cast< recurrence_id_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->recurrence_id_.set (::std::move (r));
            continue;
          }
        }
      }

      // summary
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "summary",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< summary_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->summary_)
          {
            ::std::unique_ptr< summary_type > r (
              dynamic_cast< summary_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->summary_.set (::std::move (r));
            continue;
          }
        }
      }

      // description
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "description",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< description_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->description_)
          {
            ::std::unique_ptr< description_type > r (
              dynamic_cast< description_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->description_.set (::std::move (r));
            continue;
          }
        }
      }

      // comment
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "comment",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< comment_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->comment_)
          {
            ::std::unique_ptr< comment_type > r (
              dynamic_cast< comment_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->comment_.set (::std::move (r));
            continue;
          }
        }
      }

      // priority
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "priority",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< priority_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->priority_)
          {
            ::std::unique_ptr< priority_type > r (
              dynamic_cast< priority_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->priority_.set (::std::move (r));
            continue;
          }
        }
      }

      // status
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "status",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< status_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->status_)
          {
            ::std::unique_ptr< status_type > r (
              dynamic_cast< status_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->status_.set (::std::move (r));
            continue;
          }
        }
      }

      // percent-complete
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "percent-complete",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< percent_complete_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->percent_complete_)
          {
            ::std::unique_ptr< percent_complete_type > r (
              dynamic_cast< percent_complete_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->percent_complete_.set (::std::move (r));
            continue;
          }
        }
      }

      // location
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "location",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< location_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->location_)
          {
            ::std::unique_ptr< location_type > r (
              dynamic_cast< location_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->location_.set (::std::move (r));
            continue;
          }
        }
      }

      // organizer
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "organizer",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< organizer_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->organizer_)
          {
            ::std::unique_ptr< organizer_type > r (
              dynamic_cast< organizer_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->organizer_.set (::std::move (r));
            continue;
          }
        }
      }

      // url
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "url",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< url_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->url_)
          {
            ::std::unique_ptr< url_type > r (
              dynamic_cast< url_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->url_.set (::std::move (r));
            continue;
          }
        }
      }

      // attendee
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "attendee",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< attendee_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< attendee_type > r (
            dynamic_cast< attendee_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->attendee_.push_back (::std::move (r));
          continue;
        }
      }

      // attach
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "attach",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< attach_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< attach_type > r (
            dynamic_cast< attach_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->attach_.push_back (::std::move (r));
          continue;
        }
      }

      // x-custom
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "x-custom",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< x_custom_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< x_custom_type > r (
            dynamic_cast< x_custom_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->x_custom_.push_back (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!uid_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "uid",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!created_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "created",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!dtstamp_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "dtstamp",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  properties2& properties2::
  operator= (const properties2& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->uid_ = x.uid_;
      this->created_ = x.created_;
      this->dtstamp_ = x.dtstamp_;
      this->sequence_ = x.sequence_;
      this->class__ = x.class__;
      this->categories_ = x.categories_;
      this->related_to_ = x.related_to_;
      this->dtstart_ = x.dtstart_;
      this->due_ = x.due_;
      this->rrule_ = x.rrule_;
      this->rdate_ = x.rdate_;
      this->exdate_ = x.exdate_;
      this->recurrence_id_ = x.recurrence_id_;
      this->summary_ = x.summary_;
      this->description_ = x.description_;
      this->comment_ = x.comment_;
      this->priority_ = x.priority_;
      this->status_ = x.status_;
      this->percent_complete_ = x.percent_complete_;
      this->location_ = x.location_;
      this->organizer_ = x.organizer_;
      this->url_ = x.url_;
      this->attendee_ = x.attendee_;
      this->attach_ = x.attach_;
      this->x_custom_ = x.x_custom_;
    }

    return *this;
  }

  properties2::
  ~properties2 ()
  {
  }

  // properties3
  //

  properties3::
  properties3 (const uid_type& uid,
               const created_type& created,
               const dtstamp_type& dtstamp)
  : ::xml_schema::type (),
    uid_ (uid, this),
    created_ (created, this),
    dtstamp_ (dtstamp, this),
    sequence_ (this),
    class__ (this),
    categories_ (this),
    related_to_ (this),
    dtstart_ (this),
    summary_ (this),
    description_ (this),
    comment_ (this),
    status_ (this),
    contact_ (this),
    attendee_ (this),
    attach_ (this),
    x_custom_ (this)
  {
  }

  properties3::
  properties3 (::std::unique_ptr< uid_type > uid,
               ::std::unique_ptr< created_type > created,
               ::std::unique_ptr< dtstamp_type > dtstamp)
  : ::xml_schema::type (),
    uid_ (std::move (uid), this),
    created_ (std::move (created), this),
    dtstamp_ (std::move (dtstamp), this),
    sequence_ (this),
    class__ (this),
    categories_ (this),
    related_to_ (this),
    dtstart_ (this),
    summary_ (this),
    description_ (this),
    comment_ (this),
    status_ (this),
    contact_ (this),
    attendee_ (this),
    attach_ (this),
    x_custom_ (this)
  {
  }

  properties3::
  properties3 (const properties3& x,
               ::xml_schema::flags f,
               ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    uid_ (x.uid_, f, this),
    created_ (x.created_, f, this),
    dtstamp_ (x.dtstamp_, f, this),
    sequence_ (x.sequence_, f, this),
    class__ (x.class__, f, this),
    categories_ (x.categories_, f, this),
    related_to_ (x.related_to_, f, this),
    dtstart_ (x.dtstart_, f, this),
    summary_ (x.summary_, f, this),
    description_ (x.description_, f, this),
    comment_ (x.comment_, f, this),
    status_ (x.status_, f, this),
    contact_ (x.contact_, f, this),
    attendee_ (x.attendee_, f, this),
    attach_ (x.attach_, f, this),
    x_custom_ (x.x_custom_, f, this)
  {
  }

  properties3::
  properties3 (const ::xercesc::DOMElement& e,
               ::xml_schema::flags f,
               ::xml_schema::container* c)
  : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
    uid_ (this),
    created_ (this),
    dtstamp_ (this),
    sequence_ (this),
    class__ (this),
    categories_ (this),
    related_to_ (this),
    dtstart_ (this),
    summary_ (this),
    description_ (this),
    comment_ (this),
    status_ (this),
    contact_ (this),
    attendee_ (this),
    attach_ (this),
    x_custom_ (this)
  {
    if ((f & ::xml_schema::flags::base) == 0)
    {
      ::xsd::cxx::xml::dom::parser< char > p (e, true, false, false);
      this->parse (p, f);
    }
  }

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

      // uid
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "uid",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< uid_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!uid_.present ())
          {
            ::std::unique_ptr< uid_type > r (
              dynamic_cast< uid_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->uid_.set (::std::move (r));
            continue;
          }
        }
      }

      // created
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "created",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< created_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!created_.present ())
          {
            ::std::unique_ptr< created_type > r (
              dynamic_cast< created_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->created_.set (::std::move (r));
            continue;
          }
        }
      }

      // dtstamp
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "dtstamp",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< dtstamp_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!dtstamp_.present ())
          {
            ::std::unique_ptr< dtstamp_type > r (
              dynamic_cast< dtstamp_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->dtstamp_.set (::std::move (r));
            continue;
          }
        }
      }

      // sequence
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "sequence",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< sequence_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->sequence_)
          {
            ::std::unique_ptr< sequence_type > r (
              dynamic_cast< sequence_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->sequence_.set (::std::move (r));
            continue;
          }
        }
      }

      // class
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "class",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< class_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->class__)
          {
            ::std::unique_ptr< class_type > r (
              dynamic_cast< class_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->class__.set (::std::move (r));
            continue;
          }
        }
      }

      // categories
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "categories",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< categories_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->categories_)
          {
            ::std::unique_ptr< categories_type > r (
              dynamic_cast< categories_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->categories_.set (::std::move (r));
            continue;
          }
        }
      }

      // related-to
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "related-to",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< related_to_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< related_to_type > r (
            dynamic_cast< related_to_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->related_to_.push_back (::std::move (r));
          continue;
        }
      }

      // dtstart
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "dtstart",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< dtstart_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->dtstart_)
          {
            ::std::unique_ptr< dtstart_type > r (
              dynamic_cast< dtstart_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->dtstart_.set (::std::move (r));
            continue;
          }
        }
      }

      // summary
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "summary",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< summary_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->summary_)
          {
            ::std::unique_ptr< summary_type > r (
              dynamic_cast< summary_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->summary_.set (::std::move (r));
            continue;
          }
        }
      }

      // description
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "description",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< description_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->description_)
          {
            ::std::unique_ptr< description_type > r (
              dynamic_cast< description_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->description_.set (::std::move (r));
            continue;
          }
        }
      }

      // comment
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "comment",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< comment_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->comment_)
          {
            ::std::unique_ptr< comment_type > r (
              dynamic_cast< comment_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->comment_.set (::std::move (r));
            continue;
          }
        }
      }

      // status
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "status",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< status_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->status_)
          {
            ::std::unique_ptr< status_type > r (
              dynamic_cast< status_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->status_.set (::std::move (r));
            continue;
          }
        }
      }

      // contact
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "contact",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< contact_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->contact_)
          {
            ::std::unique_ptr< contact_type > r (
              dynamic_cast< contact_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->contact_.set (::std::move (r));
            continue;
          }
        }
      }

      // attendee
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "attendee",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< attendee_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< attendee_type > r (
            dynamic_cast< attendee_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->attendee_.push_back (::std::move (r));
          continue;
        }
      }

      // attach
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "attach",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< attach_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< attach_type > r (
            dynamic_cast< attach_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->attach_.push_back (::std::move (r));
          continue;
        }
      }

      // x-custom
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "x-custom",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< x_custom_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< x_custom_type > r (
            dynamic_cast< x_custom_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->x_custom_.push_back (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!uid_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "uid",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!created_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "created",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!dtstamp_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "dtstamp",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  properties3& properties3::
  operator= (const properties3& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->uid_ = x.uid_;
      this->created_ = x.created_;
      this->dtstamp_ = x.dtstamp_;
      this->sequence_ = x.sequence_;
      this->class__ = x.class__;
      this->categories_ = x.categories_;
      this->related_to_ = x.related_to_;
      this->dtstart_ = x.dtstart_;
      this->summary_ = x.summary_;
      this->description_ = x.description_;
      this->comment_ = x.comment_;
      this->status_ = x.status_;
      this->contact_ = x.contact_;
      this->attendee_ = x.attendee_;
      this->attach_ = x.attach_;
      this->x_custom_ = x.x_custom_;
    }

    return *this;
  }

  properties3::
  ~properties3 ()
  {
  }

  // properties4
  //

  properties4::
  properties4 (const uid_type& uid,
               const dtstamp_type& dtstamp)
  : ::xml_schema::type (),
    uid_ (uid, this),
    dtstamp_ (dtstamp, this),
    dtstart_ (this),
    dtend_ (this),
    organizer_ (this),
    freebusy_ (this)
  {
  }

  properties4::
  properties4 (::std::unique_ptr< uid_type > uid,
               ::std::unique_ptr< dtstamp_type > dtstamp)
  : ::xml_schema::type (),
    uid_ (std::move (uid), this),
    dtstamp_ (std::move (dtstamp), this),
    dtstart_ (this),
    dtend_ (this),
    organizer_ (this),
    freebusy_ (this)
  {
  }

  properties4::
  properties4 (const properties4& x,
               ::xml_schema::flags f,
               ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    uid_ (x.uid_, f, this),
    dtstamp_ (x.dtstamp_, f, this),
    dtstart_ (x.dtstart_, f, this),
    dtend_ (x.dtend_, f, this),
    organizer_ (x.organizer_, f, this),
    freebusy_ (x.freebusy_, f, this)
  {
  }

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

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

      // uid
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "uid",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< uid_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!uid_.present ())
          {
            ::std::unique_ptr< uid_type > r (
              dynamic_cast< uid_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->uid_.set (::std::move (r));
            continue;
          }
        }
      }

      // dtstamp
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "dtstamp",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< dtstamp_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!dtstamp_.present ())
          {
            ::std::unique_ptr< dtstamp_type > r (
              dynamic_cast< dtstamp_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->dtstamp_.set (::std::move (r));
            continue;
          }
        }
      }

      // dtstart
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "dtstart",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< dtstart_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->dtstart_)
          {
            ::std::unique_ptr< dtstart_type > r (
              dynamic_cast< dtstart_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->dtstart_.set (::std::move (r));
            continue;
          }
        }
      }

      // dtend
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "dtend",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< dtend_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->dtend_)
          {
            ::std::unique_ptr< dtend_type > r (
              dynamic_cast< dtend_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->dtend_.set (::std::move (r));
            continue;
          }
        }
      }

      // organizer
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "organizer",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< organizer_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!this->organizer_)
          {
            ::std::unique_ptr< organizer_type > r (
              dynamic_cast< organizer_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->organizer_.set (::std::move (r));
            continue;
          }
        }
      }

      // freebusy
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "freebusy",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< freebusy_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          ::std::unique_ptr< freebusy_type > r (
            dynamic_cast< freebusy_type* > (tmp.get ()));

          if (r.get ())
            tmp.release ();
          else
            throw ::xsd::cxx::tree::not_derived< char > ();

          this->freebusy_.push_back (::std::move (r));
          continue;
        }
      }

      break;
    }

    if (!uid_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "uid",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!dtstamp_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "dtstamp",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  properties4& properties4::
  operator= (const properties4& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->uid_ = x.uid_;
      this->dtstamp_ = x.dtstamp_;
      this->dtstart_ = x.dtstart_;
      this->dtend_ = x.dtend_;
      this->organizer_ = x.organizer_;
      this->freebusy_ = x.freebusy_;
    }

    return *this;
  }

  properties4::
  ~properties4 ()
  {
  }

  // properties5
  //

  properties5::
  properties5 (const prodid_type& prodid,
               const version_type& version,
               const x_kolab_version_type& x_kolab_version)
  : ::xml_schema::type (),
    prodid_ (prodid, this),
    version_ (version, this),
    x_kolab_version_ (x_kolab_version, this)
  {
  }

  properties5::
  properties5 (::std::unique_ptr< prodid_type > prodid,
               ::std::unique_ptr< version_type > version,
               ::std::unique_ptr< x_kolab_version_type > x_kolab_version)
  : ::xml_schema::type (),
    prodid_ (std::move (prodid), this),
    version_ (std::move (version), this),
    x_kolab_version_ (std::move (x_kolab_version), this)
  {
  }

  properties5::
  properties5 (const properties5& x,
               ::xml_schema::flags f,
               ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    prodid_ (x.prodid_, f, this),
    version_ (x.version_, f, this),
    x_kolab_version_ (x.x_kolab_version_, f, this)
  {
  }

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

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

      // prodid
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "prodid",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< prodid_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!prodid_.present ())
          {
            ::std::unique_ptr< prodid_type > r (
              dynamic_cast< prodid_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->prodid_.set (::std::move (r));
            continue;
          }
        }
      }

      // version
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "version",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< version_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!version_.present ())
          {
            ::std::unique_ptr< version_type > r (
              dynamic_cast< version_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->version_.set (::std::move (r));
            continue;
          }
        }
      }

      // x-kolab-version
      //
      {
        ::std::unique_ptr< ::xsd::cxx::tree::type > tmp (
          ::xsd::cxx::tree::type_factory_map_instance< 0, char > ().create (
            "x-kolab-version",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            &::xsd::cxx::tree::factory_impl< x_kolab_version_type >,
            false, true, i, n, f, this));

        if (tmp.get () != 0)
        {
          if (!x_kolab_version_.present ())
          {
            ::std::unique_ptr< x_kolab_version_type > r (
              dynamic_cast< x_kolab_version_type* > (tmp.get ()));

            if (r.get ())
              tmp.release ();
            else
              throw ::xsd::cxx::tree::not_derived< char > ();

            this->x_kolab_version_.set (::std::move (r));
            continue;
          }
        }
      }

      break;
    }

    if (!prodid_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "prodid",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!version_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "version",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }

    if (!x_kolab_version_.present ())
    {
      throw ::xsd::cxx::tree::expected_element< char > (
        "x-kolab-version",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

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

  properties5& properties5::
  operator= (const properties5& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->prodid_ = x.prodid_;
      this->version_ = x.version_;
      this->x_kolab_version_ = x.x_kolab_version_;
    }

    return *this;
  }

  properties5::
  ~properties5 ()
  {
  }

  // components1
  //

  components1::
  components1 ()
  : ::xml_schema::type (),
    vevent_ (this),
    vtodo_ (this),
    vjournal_ (this),
    vfreebusy_ (this)
  {
  }

  components1::
  components1 (const components1& x,
               ::xml_schema::flags f,
               ::xml_schema::container* c)
  : ::xml_schema::type (x, f, c),
    vevent_ (x.vevent_, f, this),
    vtodo_ (x.vtodo_, f, this),
    vjournal_ (x.vjournal_, f, this),
    vfreebusy_ (x.vfreebusy_, f, this)
  {
  }

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

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

      // vevent
      //
      if (n.name () == "vevent" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< vevent_type > r (
          vevent_traits::create (i, f, this));

        this->vevent_.push_back (::std::move (r));
        continue;
      }

      // vtodo
      //
      if (n.name () == "vtodo" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< vtodo_type > r (
          vtodo_traits::create (i, f, this));

        this->vtodo_.push_back (::std::move (r));
        continue;
      }

      // vjournal
      //
      if (n.name () == "vjournal" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< vjournal_type > r (
          vjournal_traits::create (i, f, this));

        this->vjournal_.push_back (::std::move (r));
        continue;
      }

      // vfreebusy
      //
      if (n.name () == "vfreebusy" && n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
      {
        ::std::unique_ptr< vfreebusy_type > r (
          vfreebusy_traits::create (i, f, this));

        this->vfreebusy_.push_back (::std::move (r));
        continue;
      }

      break;
    }
  }

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

  components1& components1::
  operator= (const components1& x)
  {
    if (this != &x)
    {
      static_cast< ::xml_schema::type& > (*this) = x;
      this->vevent_ = x.vevent_;
      this->vtodo_ = x.vtodo_;
      this->vjournal_ = x.vjournal_;
      this->vfreebusy_ = x.vfreebusy_;
    }

    return *this;
  }

  components1::
  ~components1 ()
  {
  }
}

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

namespace icalendar_2_0
{
  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (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::unique_ptr< ::xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::parse< char > (
        u, h, p, f));

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

    return ::std::unique_ptr< ::icalendar_2_0::IcalendarType > (
      ::icalendar_2_0::icalendar (
        std::move (d), f | ::xml_schema::flags::own_dom, p));
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (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::unique_ptr< ::xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::parse< char > (
        u, h, p, f));

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

    return ::std::unique_ptr< ::icalendar_2_0::IcalendarType > (
      ::icalendar_2_0::icalendar (
        std::move (d), f | ::xml_schema::flags::own_dom, p));
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (const ::std::string& u,
             ::xercesc::DOMErrorHandler& h,
             ::xml_schema::flags f,
             const ::xml_schema::properties& p)
  {
    ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::parse< char > (
        u, h, p, f));

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

    return ::std::unique_ptr< ::icalendar_2_0::IcalendarType > (
      ::icalendar_2_0::icalendar (
        std::move (d), f | ::xml_schema::flags::own_dom, p));
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (::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 ::icalendar_2_0::icalendar (isrc, f, p);
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (::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 ::icalendar_2_0::icalendar (isrc, h, f, p);
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (::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 ::icalendar_2_0::icalendar (isrc, h, f, p);
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (::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 ::icalendar_2_0::icalendar (isrc, f, p);
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (::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 ::icalendar_2_0::icalendar (isrc, h, f, p);
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (::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 ::icalendar_2_0::icalendar (isrc, h, f, p);
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (::xercesc::InputSource& i,
             ::xml_schema::flags f,
             const ::xml_schema::properties& p)
  {
    ::xsd::cxx::tree::error_handler< char > h;

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

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

    return ::std::unique_ptr< ::icalendar_2_0::IcalendarType > (
      ::icalendar_2_0::icalendar (
        std::move (d), f | ::xml_schema::flags::own_dom, p));
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (::xercesc::InputSource& i,
             ::xml_schema::error_handler& h,
             ::xml_schema::flags f,
             const ::xml_schema::properties& p)
  {
    ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::parse< char > (
        i, h, p, f));

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

    return ::std::unique_ptr< ::icalendar_2_0::IcalendarType > (
      ::icalendar_2_0::icalendar (
        std::move (d), f | ::xml_schema::flags::own_dom, p));
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (::xercesc::InputSource& i,
             ::xercesc::DOMErrorHandler& h,
             ::xml_schema::flags f,
             const ::xml_schema::properties& p)
  {
    ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::parse< char > (
        i, h, p, f));

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

    return ::std::unique_ptr< ::icalendar_2_0::IcalendarType > (
      ::icalendar_2_0::icalendar (
        std::move (d), f | ::xml_schema::flags::own_dom, p));
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (const ::xercesc::DOMDocument& doc,
             ::xml_schema::flags f,
             const ::xml_schema::properties& p)
  {
    if (f & ::xml_schema::flags::keep_dom)
    {
      ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
        static_cast< ::xercesc::DOMDocument* > (doc.cloneNode (true)));

      return ::std::unique_ptr< ::icalendar_2_0::IcalendarType > (
        ::icalendar_2_0::icalendar (
          std::move (d), f | ::xml_schema::flags::own_dom, p));
    }

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

    if (n.name () == "icalendar" &&
        n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
    {
      ::std::unique_ptr< ::icalendar_2_0::IcalendarType > r (
        ::xsd::cxx::tree::traits< ::icalendar_2_0::IcalendarType, char >::create (
          e, f, 0));
      return r;
    }

    throw ::xsd::cxx::tree::unexpected_element < char > (
      n.name (),
      n.namespace_ (),
      "icalendar",
      "urn:ietf:params:xml:ns:icalendar-2.0");
  }

  ::std::unique_ptr< ::icalendar_2_0::IcalendarType >
  icalendar (::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d,
             ::xml_schema::flags f,
             const ::xml_schema::properties&)
  {
    ::xml_schema::dom::unique_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 () == "icalendar" &&
        n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
    {
      ::std::unique_ptr< ::icalendar_2_0::IcalendarType > r (
        ::xsd::cxx::tree::traits< ::icalendar_2_0::IcalendarType, char >::create (
          e, f, 0));
      return r;
    }

    throw ::xsd::cxx::tree::unexpected_element < char > (
      n.name (),
      n.namespace_ (),
      "icalendar",
      "urn:ietf:params:xml:ns:icalendar-2.0");
  }
}

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

#include <xsd/cxx/tree/type-serializer-map.hxx>

namespace _xsd
{
  static
  const ::xsd::cxx::tree::type_serializer_plate< 0, char >
  type_serializer_plate_init;
}

namespace icalendar_2_0
{
  void
  operator<< (::xercesc::DOMElement& e, const XlabelParamType& i)
  {
    e << static_cast< const ::icalendar_2_0::TextParameterType& > (i);
  }

  static
  const ::xsd::cxx::tree::type_serializer_initializer< 0, char, XlabelParamType >
  _xsd_XlabelParamType_type_serializer_init (
    "XlabelParamType",
    "urn:ietf:params:xml:ns:icalendar-2.0");


  static
  const ::xsd::cxx::tree::element_serializer_initializer< 0, char, ::icalendar_2_0::XlabelParamType >
  _xsd_x_label_element_serializer_init (
    "baseParameter",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    "x-label",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    &::xsd::cxx::tree::serializer_impl< ::icalendar_2_0::XlabelParamType >);


  void
  operator<< (::xercesc::DOMElement& e, const XuidParamType& i)
  {
    e << static_cast< const ::icalendar_2_0::TextParameterType& > (i);
  }

  static
  const ::xsd::cxx::tree::type_serializer_initializer< 0, char, XuidParamType >
  _xsd_XuidParamType_type_serializer_init (
    "XuidParamType",
    "urn:ietf:params:xml:ns:icalendar-2.0");


  static
  const ::xsd::cxx::tree::element_serializer_initializer< 0, char, ::icalendar_2_0::XuidParamType >
  _xsd_x_uid_element_serializer_init (
    "baseParameter",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    "x-uid",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    &::xsd::cxx::tree::serializer_impl< ::icalendar_2_0::XuidParamType >);


  void
  operator<< (::xercesc::DOMElement& e, const XFBevent& i)
  {
    e << static_cast< const ::icalendar_2_0::BaseParameterType& > (i);

    // uid
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "uid",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.uid ();
    }

    // summary
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "summary",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.summary ();
    }

    // location
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "location",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.location ();
    }
  }

  static
  const ::xsd::cxx::tree::type_serializer_initializer< 0, char, XFBevent >
  _xsd_XFBevent_type_serializer_init (
    "XFBevent",
    "urn:ietf:params:xml:ns:icalendar-2.0");


  static
  const ::xsd::cxx::tree::element_serializer_initializer< 0, char, ::icalendar_2_0::XFBevent >
  _xsd_x_event_element_serializer_init (
    "baseParameter",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    "x-event",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    &::xsd::cxx::tree::serializer_impl< ::icalendar_2_0::XFBevent >);


  void
  operator<< (::xercesc::DOMElement& e, const KolabVersion& i)
  {
    e << static_cast< const ::icalendar_2_0::BasePropertyType& > (i);

    // text
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "text",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.text ();
    }
  }

  static
  const ::xsd::cxx::tree::type_serializer_initializer< 0, char, KolabVersion >
  _xsd_KolabVersion_type_serializer_init (
    "KolabVersion",
    "urn:ietf:params:xml:ns:icalendar-2.0");


  static
  const ::xsd::cxx::tree::element_serializer_initializer< 0, char, ::icalendar_2_0::KolabVersion >
  _xsd_x_kolab_version_element_serializer_init (
    "baseProperty",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    "x-kolab-version",
    "urn:ietf:params:xml:ns:icalendar-2.0",
    &::xsd::cxx::tree::serializer_impl< ::icalendar_2_0::KolabVersion >);


  void
  operator<< (::xercesc::DOMElement& e, const CustomType& i)
  {
    e << static_cast< const ::icalendar_2_0::BasePropertyType& > (i);

    // identifier
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "identifier",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.identifier ();
    }

    // value
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "value",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.value ();
    }
  }

  static
  const ::xsd::cxx::tree::type_serializer_initializer< 0, char, CustomType >
  _xsd_CustomType_type_serializer_init (
    "CustomType",
    "urn:ietf:params:xml:ns:icalendar-2.0");


  void
  operator<< (::xercesc::DOMElement& e, const ContactType& i)
  {
    e << static_cast< const ::icalendar_2_0::CalAddressPropertyType& > (i);
  }

  static
  const ::xsd::cxx::tree::type_serializer_initializer< 0, char, ContactType >
  _xsd_ContactType_type_serializer_init (
    "ContactType",
    "urn:ietf:params:xml:ns:icalendar-2.0");


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

    // properties
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "properties",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.properties ();
    }
  }

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

    // properties
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "properties",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.properties ();
    }

    // components
    //
    if (i.components ())
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "components",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << *i.components ();
    }
  }

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

    // properties
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "properties",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.properties ();
    }

    // components
    //
    if (i.components ())
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "components",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << *i.components ();
    }
  }

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

    // properties
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "properties",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.properties ();
    }
  }

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

    // properties
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "properties",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.properties ();
    }
  }

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

    // properties
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "properties",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.properties ();
    }

    // components
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "components",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.components ();
    }
  }

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

    // vcalendar
    //
    {
      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "vcalendar",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << i.vcalendar ();
    }
  }

  void
  icalendar (::std::ostream& o,
             const ::icalendar_2_0::IcalendarType& 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::unique_ptr< ::xercesc::DOMDocument > d (
      ::icalendar_2_0::icalendar (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
  icalendar (::std::ostream& o,
             const ::icalendar_2_0::IcalendarType& 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::unique_ptr< ::xercesc::DOMDocument > d (
      ::icalendar_2_0::icalendar (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
  icalendar (::std::ostream& o,
             const ::icalendar_2_0::IcalendarType& s,
             ::xercesc::DOMErrorHandler& h,
             const ::xml_schema::namespace_infomap& m,
             const ::std::string& e,
             ::xml_schema::flags f)
  {
    ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
      ::icalendar_2_0::icalendar (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
  icalendar (::xercesc::XMLFormatTarget& t,
             const ::icalendar_2_0::IcalendarType& s,
             const ::xml_schema::namespace_infomap& m,
             const ::std::string& e,
             ::xml_schema::flags f)
  {
    ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
      ::icalendar_2_0::icalendar (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
  icalendar (::xercesc::XMLFormatTarget& t,
             const ::icalendar_2_0::IcalendarType& s,
             ::xml_schema::error_handler& h,
             const ::xml_schema::namespace_infomap& m,
             const ::std::string& e,
             ::xml_schema::flags f)
  {
    ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
      ::icalendar_2_0::icalendar (s, m, f));
    if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
    {
      throw ::xsd::cxx::tree::serialization< char > ();
    }
  }

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

  void
  icalendar (::xercesc::DOMDocument& d,
             const ::icalendar_2_0::IcalendarType& 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 () == "icalendar" &&
        n.namespace_ () == "urn:ietf:params:xml:ns:icalendar-2.0")
    {
      e << s;
    }
    else
    {
      throw ::xsd::cxx::tree::unexpected_element < char > (
        n.name (),
        n.namespace_ (),
        "icalendar",
        "urn:ietf:params:xml:ns:icalendar-2.0");
    }
  }

  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >
  icalendar (const ::icalendar_2_0::IcalendarType& s,
             const ::xml_schema::namespace_infomap& m,
             ::xml_schema::flags f)
  {
    ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
      ::xsd::cxx::xml::dom::serialize< char > (
        "icalendar",
        "urn:ietf:params:xml:ns:icalendar-2.0",
        m, f));

    ::icalendar_2_0::icalendar (*d, s, f);
    return d;
  }

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

    // action
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties::action_type& x (i.action ());
      if (typeid (properties::action_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "action",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "action",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // summary
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.summary ())
      {
        const properties::summary_type& x (*i.summary ());
        if (typeid (properties::summary_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "summary",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "summary",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // description
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.description ())
      {
        const properties::description_type& x (*i.description ());
        if (typeid (properties::description_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "description",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "description",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // attendee
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties::attendee_const_iterator
           b (i.attendee ().begin ()), n (i.attendee ().end ());
           b != n; ++b)
      {
        const properties::attendee_type& x (*b);

        if (typeid (properties::attendee_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "attendee",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "attendee",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // attach
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.attach ())
      {
        const properties::attach_type& x (*i.attach ());
        if (typeid (properties::attach_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "attach",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "attach",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // trigger
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties::trigger_type& x (i.trigger ());
      if (typeid (properties::trigger_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "trigger",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "trigger",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // duration
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.duration ())
      {
        const properties::duration_type& x (*i.duration ());
        if (typeid (properties::duration_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "duration",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "duration",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // repeat
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.repeat ())
      {
        const properties::repeat_type& x (*i.repeat ());
        if (typeid (properties::repeat_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "repeat",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "repeat",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }
  }

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

    // uid
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties1::uid_type& x (i.uid ());
      if (typeid (properties1::uid_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "uid",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "uid",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // created
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties1::created_type& x (i.created ());
      if (typeid (properties1::created_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "created",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "created",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // dtstamp
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties1::dtstamp_type& x (i.dtstamp ());
      if (typeid (properties1::dtstamp_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "dtstamp",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "dtstamp",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // sequence
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.sequence ())
      {
        const properties1::sequence_type& x (*i.sequence ());
        if (typeid (properties1::sequence_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "sequence",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "sequence",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // class
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.class_ ())
      {
        const properties1::class_type& x (*i.class_ ());
        if (typeid (properties1::class_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "class",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "class",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // categories
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.categories ())
      {
        const properties1::categories_type& x (*i.categories ());
        if (typeid (properties1::categories_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "categories",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "categories",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // dtstart
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.dtstart ())
      {
        const properties1::dtstart_type& x (*i.dtstart ());
        if (typeid (properties1::dtstart_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "dtstart",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "dtstart",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // dtend
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.dtend ())
      {
        const properties1::dtend_type& x (*i.dtend ());
        if (typeid (properties1::dtend_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "dtend",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "dtend",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // duration
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.duration ())
      {
        const properties1::duration_type& x (*i.duration ());
        if (typeid (properties1::duration_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "duration",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "duration",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // transp
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.transp ())
      {
        const properties1::transp_type& x (*i.transp ());
        if (typeid (properties1::transp_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "transp",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "transp",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // rrule
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.rrule ())
      {
        const properties1::rrule_type& x (*i.rrule ());
        if (typeid (properties1::rrule_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "rrule",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "rrule",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // rdate
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.rdate ())
      {
        const properties1::rdate_type& x (*i.rdate ());
        if (typeid (properties1::rdate_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "rdate",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "rdate",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // exdate
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.exdate ())
      {
        const properties1::exdate_type& x (*i.exdate ());
        if (typeid (properties1::exdate_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "exdate",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "exdate",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // recurrence-id
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.recurrence_id ())
      {
        const properties1::recurrence_id_type& x (*i.recurrence_id ());
        if (typeid (properties1::recurrence_id_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "recurrence-id",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "recurrence-id",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // summary
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.summary ())
      {
        const properties1::summary_type& x (*i.summary ());
        if (typeid (properties1::summary_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "summary",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "summary",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // description
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.description ())
      {
        const properties1::description_type& x (*i.description ());
        if (typeid (properties1::description_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "description",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "description",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // comment
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.comment ())
      {
        const properties1::comment_type& x (*i.comment ());
        if (typeid (properties1::comment_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "comment",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "comment",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // priority
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.priority ())
      {
        const properties1::priority_type& x (*i.priority ());
        if (typeid (properties1::priority_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "priority",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "priority",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // status
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.status ())
      {
        const properties1::status_type& x (*i.status ());
        if (typeid (properties1::status_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "status",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "status",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // location
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.location ())
      {
        const properties1::location_type& x (*i.location ());
        if (typeid (properties1::location_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "location",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "location",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // organizer
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.organizer ())
      {
        const properties1::organizer_type& x (*i.organizer ());
        if (typeid (properties1::organizer_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "organizer",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "organizer",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // url
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.url ())
      {
        const properties1::url_type& x (*i.url ());
        if (typeid (properties1::url_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "url",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "url",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // attendee
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties1::attendee_const_iterator
           b (i.attendee ().begin ()), n (i.attendee ().end ());
           b != n; ++b)
      {
        const properties1::attendee_type& x (*b);

        if (typeid (properties1::attendee_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "attendee",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "attendee",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // attach
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties1::attach_const_iterator
           b (i.attach ().begin ()), n (i.attach ().end ());
           b != n; ++b)
      {
        const properties1::attach_type& x (*b);

        if (typeid (properties1::attach_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "attach",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "attach",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // x-custom
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties1::x_custom_const_iterator
           b (i.x_custom ().begin ()), n (i.x_custom ().end ());
           b != n; ++b)
      {
        const properties1::x_custom_type& x (*b);

        if (typeid (properties1::x_custom_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "x-custom",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "x-custom",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }
  }

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

    // valarm
    //
    for (components::valarm_const_iterator
         b (i.valarm ().begin ()), n (i.valarm ().end ());
         b != n; ++b)
    {
      const components::valarm_type& x (*b);

      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "valarm",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << x;
    }
  }

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

    // uid
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties2::uid_type& x (i.uid ());
      if (typeid (properties2::uid_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "uid",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "uid",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // created
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties2::created_type& x (i.created ());
      if (typeid (properties2::created_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "created",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "created",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // dtstamp
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties2::dtstamp_type& x (i.dtstamp ());
      if (typeid (properties2::dtstamp_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "dtstamp",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "dtstamp",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // sequence
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.sequence ())
      {
        const properties2::sequence_type& x (*i.sequence ());
        if (typeid (properties2::sequence_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "sequence",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "sequence",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // class
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.class_ ())
      {
        const properties2::class_type& x (*i.class_ ());
        if (typeid (properties2::class_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "class",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "class",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // categories
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.categories ())
      {
        const properties2::categories_type& x (*i.categories ());
        if (typeid (properties2::categories_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "categories",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "categories",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // related-to
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties2::related_to_const_iterator
           b (i.related_to ().begin ()), n (i.related_to ().end ());
           b != n; ++b)
      {
        const properties2::related_to_type& x (*b);

        if (typeid (properties2::related_to_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "related-to",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "related-to",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // dtstart
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.dtstart ())
      {
        const properties2::dtstart_type& x (*i.dtstart ());
        if (typeid (properties2::dtstart_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "dtstart",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "dtstart",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // due
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.due ())
      {
        const properties2::due_type& x (*i.due ());
        if (typeid (properties2::due_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "due",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "due",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // rrule
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.rrule ())
      {
        const properties2::rrule_type& x (*i.rrule ());
        if (typeid (properties2::rrule_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "rrule",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "rrule",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // rdate
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.rdate ())
      {
        const properties2::rdate_type& x (*i.rdate ());
        if (typeid (properties2::rdate_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "rdate",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "rdate",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // exdate
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.exdate ())
      {
        const properties2::exdate_type& x (*i.exdate ());
        if (typeid (properties2::exdate_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "exdate",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "exdate",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // recurrence-id
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.recurrence_id ())
      {
        const properties2::recurrence_id_type& x (*i.recurrence_id ());
        if (typeid (properties2::recurrence_id_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "recurrence-id",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "recurrence-id",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // summary
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.summary ())
      {
        const properties2::summary_type& x (*i.summary ());
        if (typeid (properties2::summary_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "summary",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "summary",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // description
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.description ())
      {
        const properties2::description_type& x (*i.description ());
        if (typeid (properties2::description_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "description",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "description",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // comment
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.comment ())
      {
        const properties2::comment_type& x (*i.comment ());
        if (typeid (properties2::comment_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "comment",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "comment",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // priority
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.priority ())
      {
        const properties2::priority_type& x (*i.priority ());
        if (typeid (properties2::priority_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "priority",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "priority",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // status
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.status ())
      {
        const properties2::status_type& x (*i.status ());
        if (typeid (properties2::status_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "status",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "status",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // percent-complete
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.percent_complete ())
      {
        const properties2::percent_complete_type& x (*i.percent_complete ());
        if (typeid (properties2::percent_complete_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "percent-complete",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "percent-complete",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // location
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.location ())
      {
        const properties2::location_type& x (*i.location ());
        if (typeid (properties2::location_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "location",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "location",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // organizer
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.organizer ())
      {
        const properties2::organizer_type& x (*i.organizer ());
        if (typeid (properties2::organizer_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "organizer",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "organizer",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // url
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.url ())
      {
        const properties2::url_type& x (*i.url ());
        if (typeid (properties2::url_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "url",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "url",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // attendee
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties2::attendee_const_iterator
           b (i.attendee ().begin ()), n (i.attendee ().end ());
           b != n; ++b)
      {
        const properties2::attendee_type& x (*b);

        if (typeid (properties2::attendee_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "attendee",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "attendee",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // attach
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties2::attach_const_iterator
           b (i.attach ().begin ()), n (i.attach ().end ());
           b != n; ++b)
      {
        const properties2::attach_type& x (*b);

        if (typeid (properties2::attach_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "attach",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "attach",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // x-custom
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties2::x_custom_const_iterator
           b (i.x_custom ().begin ()), n (i.x_custom ().end ());
           b != n; ++b)
      {
        const properties2::x_custom_type& x (*b);

        if (typeid (properties2::x_custom_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "x-custom",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "x-custom",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }
  }

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

    // uid
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties3::uid_type& x (i.uid ());
      if (typeid (properties3::uid_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "uid",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "uid",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // created
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties3::created_type& x (i.created ());
      if (typeid (properties3::created_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "created",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "created",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // dtstamp
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties3::dtstamp_type& x (i.dtstamp ());
      if (typeid (properties3::dtstamp_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "dtstamp",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "dtstamp",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // sequence
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.sequence ())
      {
        const properties3::sequence_type& x (*i.sequence ());
        if (typeid (properties3::sequence_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "sequence",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "sequence",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // class
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.class_ ())
      {
        const properties3::class_type& x (*i.class_ ());
        if (typeid (properties3::class_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "class",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "class",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // categories
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.categories ())
      {
        const properties3::categories_type& x (*i.categories ());
        if (typeid (properties3::categories_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "categories",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "categories",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // related-to
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties3::related_to_const_iterator
           b (i.related_to ().begin ()), n (i.related_to ().end ());
           b != n; ++b)
      {
        const properties3::related_to_type& x (*b);

        if (typeid (properties3::related_to_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "related-to",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "related-to",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // dtstart
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.dtstart ())
      {
        const properties3::dtstart_type& x (*i.dtstart ());
        if (typeid (properties3::dtstart_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "dtstart",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "dtstart",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // summary
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.summary ())
      {
        const properties3::summary_type& x (*i.summary ());
        if (typeid (properties3::summary_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "summary",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "summary",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // description
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.description ())
      {
        const properties3::description_type& x (*i.description ());
        if (typeid (properties3::description_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "description",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "description",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // comment
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.comment ())
      {
        const properties3::comment_type& x (*i.comment ());
        if (typeid (properties3::comment_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "comment",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "comment",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // status
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.status ())
      {
        const properties3::status_type& x (*i.status ());
        if (typeid (properties3::status_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "status",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "status",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // contact
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.contact ())
      {
        const properties3::contact_type& x (*i.contact ());
        if (typeid (properties3::contact_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "contact",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "contact",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // attendee
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties3::attendee_const_iterator
           b (i.attendee ().begin ()), n (i.attendee ().end ());
           b != n; ++b)
      {
        const properties3::attendee_type& x (*b);

        if (typeid (properties3::attendee_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "attendee",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "attendee",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // attach
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties3::attach_const_iterator
           b (i.attach ().begin ()), n (i.attach ().end ());
           b != n; ++b)
      {
        const properties3::attach_type& x (*b);

        if (typeid (properties3::attach_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "attach",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "attach",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // x-custom
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties3::x_custom_const_iterator
           b (i.x_custom ().begin ()), n (i.x_custom ().end ());
           b != n; ++b)
      {
        const properties3::x_custom_type& x (*b);

        if (typeid (properties3::x_custom_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "x-custom",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "x-custom",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }
  }

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

    // uid
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties4::uid_type& x (i.uid ());
      if (typeid (properties4::uid_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "uid",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "uid",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // dtstamp
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties4::dtstamp_type& x (i.dtstamp ());
      if (typeid (properties4::dtstamp_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "dtstamp",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "dtstamp",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // dtstart
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.dtstart ())
      {
        const properties4::dtstart_type& x (*i.dtstart ());
        if (typeid (properties4::dtstart_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "dtstart",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "dtstart",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // dtend
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.dtend ())
      {
        const properties4::dtend_type& x (*i.dtend ());
        if (typeid (properties4::dtend_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "dtend",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "dtend",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // organizer
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      if (i.organizer ())
      {
        const properties4::organizer_type& x (*i.organizer ());
        if (typeid (properties4::organizer_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "organizer",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "organizer",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }

    // freebusy
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      for (properties4::freebusy_const_iterator
           b (i.freebusy ().begin ()), n (i.freebusy ().end ());
           b != n; ++b)
      {
        const properties4::freebusy_type& x (*b);

        if (typeid (properties4::freebusy_type) == typeid (x))
        {
          ::xercesc::DOMElement& s (
            ::xsd::cxx::xml::dom::create_element (
              "freebusy",
              "urn:ietf:params:xml:ns:icalendar-2.0",
              e));

          s << x;
        }
        else
          tsm.serialize (
            "freebusy",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            false, true, e, x);
      }
    }
  }

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

    // prodid
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties5::prodid_type& x (i.prodid ());
      if (typeid (properties5::prodid_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "prodid",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "prodid",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // version
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties5::version_type& x (i.version ());
      if (typeid (properties5::version_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "version",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "version",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }

    // x-kolab-version
    //
    {
      ::xsd::cxx::tree::type_serializer_map< char >& tsm (
        ::xsd::cxx::tree::type_serializer_map_instance< 0, char > ());

      const properties5::x_kolab_version_type& x (i.x_kolab_version ());
      if (typeid (properties5::x_kolab_version_type) == typeid (x))
      {
        ::xercesc::DOMElement& s (
          ::xsd::cxx::xml::dom::create_element (
            "x-kolab-version",
            "urn:ietf:params:xml:ns:icalendar-2.0",
            e));

        s << x;
      }
      else
        tsm.serialize (
          "x-kolab-version",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          false, true, e, x);
    }
  }

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

    // vevent
    //
    for (components1::vevent_const_iterator
         b (i.vevent ().begin ()), n (i.vevent ().end ());
         b != n; ++b)
    {
      const components1::vevent_type& x (*b);

      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "vevent",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << x;
    }

    // vtodo
    //
    for (components1::vtodo_const_iterator
         b (i.vtodo ().begin ()), n (i.vtodo ().end ());
         b != n; ++b)
    {
      const components1::vtodo_type& x (*b);

      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "vtodo",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << x;
    }

    // vjournal
    //
    for (components1::vjournal_const_iterator
         b (i.vjournal ().begin ()), n (i.vjournal ().end ());
         b != n; ++b)
    {
      const components1::vjournal_type& x (*b);

      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "vjournal",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << x;
    }

    // vfreebusy
    //
    for (components1::vfreebusy_const_iterator
         b (i.vfreebusy ().begin ()), n (i.vfreebusy ().end ());
         b != n; ++b)
    {
      const components1::vfreebusy_type& x (*b);

      ::xercesc::DOMElement& s (
        ::xsd::cxx::xml::dom::create_element (
          "vfreebusy",
          "urn:ietf:params:xml:ns:icalendar-2.0",
          e));

      s << x;
    }
  }
}

#include <xsd/cxx/post.hxx>

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

