[xsd-users] WG: CodeSynthesis problem

Abhijit Sovakar Abhijit.Sovakar at cae.de
Thu Jun 17 01:59:20 EDT 2010


Hi,

We need C++ XML Bindings and we are in the phase of evaluating various tools.
Amongst other tools we are investigating the usability of XSD (v3.3.0).

We generated C++ classes for the EDXL-DE schema with CodeSynthesis.
( command line: xsd cxx-tree --generate-serialization --generate-doxygen --namespace-map urn:oasis:names:tc:emergency:EDXL:DE:1.0=edxl::de EDXL-DE.xsd )

Xsd wrote the the EDXL-DE.cxx and .hxx files and we wrote a simple test application (main.cpp), which tries to read the file edxl_test.xml, which complies to the schema.

1st Problem:
However the generated code wasn’t able to read the xml file due to namespace issues. The generated code checks the elements for the namespace but fails to read/set it before:

EXDL-de.cxx line 1121 – 1127:
        const ::xercesc::DOMElement& i (p.cur_element ());
        const ::xsd::cxx::xml::qualified_name< char > n (
          ::xsd::cxx::xml::dom::name< char > (i));

        // contentDescription
        //
        if (n.name () == "contentDescription"  && n.namespace_ () == "urn:oasis:names:tc:emergency:EDXL:DE:1.0")

n.namespace_ never gets a vaule thus the tests fail.

After removing the namespace tests the edxl_test.xml file can be read.


2.Problem:
We initialized an EDXLDistribution element and wrote that to stdout. If using that output as input, it can’t be read as well as the p1 namespace alias is treated as element name.

Are we using the xsd tool wrong? Do you have any suggestions how to solve these problems?

Kind regards,

Abhijit Sovakar
Senior Software Engineer
Dipl.-Inform.
CAE Elektronik GmbH
Simulation Products and
Military Training & Services
52220 Stolberg, Germany
Tel: +49 2402 106 540
Fax: +49 2402 106 8540
eMail: abhijit.sovakar at cae.com<mailto:ralf.kaschow at cae.com>
Managing Director: Ulrich Aderhold
Trade Register No.: HRB 11615 County Court Eschweiler



-- 
This email was Anti Virus checked by CAE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EDXL-DE.xsd
Type: text/xml
Size: 6073 bytes
Desc: EDXL-DE.xsd
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20100617/c5998748/EDXL-DE-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EDXL-DE.cxx
Type: application/octet-stream
Size: 91115 bytes
Desc: EDXL-DE.cxx
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20100617/c5998748/EDXL-DE-0001.obj
-------------- next part --------------
// Copyright (C) 2005-2010 Code Synthesis Tools CC
//
// This program was generated by CodeSynthesis XSD, an XML Schema to
// C++ data binding compiler.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
// In addition, as a special exception, Code Synthesis Tools CC gives
// permission to link this program with the Xerces-C++ library (or with
// modified versions of Xerces-C++ that use the same license as Xerces-C++),
// and distribute linked combinations including the two. You must obey
// the GNU General Public License version 2 in all respects for all of
// the code used other than Xerces-C++. If you modify this copy of the
// program, you may extend this exception to your version of the program,
// but you are not obligated to do so. If you do not wish to do so, delete
// this exception statement from your version.
//
// Furthermore, Code Synthesis Tools CC makes a special exception for
// the Free/Libre and Open Source Software (FLOSS) which is described
// in the accompanying FLOSSE file.
//

/**
 * @file
 * @brief Generated from EDXL-DE.xsd.
 */

#ifndef EDXL_DE_HXX
#define EDXL_DE_HXX

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

#include <xsd/cxx/config.hxx>

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

#include <xsd/cxx/pre.hxx>

#ifndef XSD_USE_CHAR
#define XSD_USE_CHAR
#endif

#ifndef XSD_CXX_TREE_USE_CHAR
#define XSD_CXX_TREE_USE_CHAR
#endif

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

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

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

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

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

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

/**
 * @brief C++ namespace for the %http://www.w3.org/2001/XMLSchema
 * schema namespace.
 */
namespace xml_schema
{
  // anyType and anySimpleType.
  //

  /**
   * @brief C++ type corresponding to the anyType XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::type type;

  /**
   * @brief C++ type corresponding to the anySimpleType XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::simple_type< type > simple_type;

  /**
   * @brief Alias for the anyType type.
   */
  typedef ::xsd::cxx::tree::type container;


  // 8-bit
  //

  /**
   * @brief C++ type corresponding to the byte XML Schema
   * built-in type.
   */
  typedef signed char byte;

  /**
   * @brief C++ type corresponding to the unsignedByte XML Schema
   * built-in type.
   */
  typedef unsigned char unsigned_byte;


  // 16-bit
  //

  /**
   * @brief C++ type corresponding to the short XML Schema
   * built-in type.
   */
  typedef short short_;

  /**
   * @brief C++ type corresponding to the unsignedShort XML Schema
   * built-in type.
   */
  typedef unsigned short unsigned_short;


  // 32-bit
  //

  /**
   * @brief C++ type corresponding to the int XML Schema
   * built-in type.
   */
  typedef int int_;

  /**
   * @brief C++ type corresponding to the unsignedInt XML Schema
   * built-in type.
   */
  typedef unsigned int unsigned_int;


  // 64-bit
  //

  /**
   * @brief C++ type corresponding to the long XML Schema
   * built-in type.
   */
  typedef long long long_;

  /**
   * @brief C++ type corresponding to the unsignedLong XML Schema
   * built-in type.
   */
  typedef unsigned long long unsigned_long;


  // Supposed to be arbitrary-length integral types.
  //

  /**
   * @brief C++ type corresponding to the integer XML Schema
   * built-in type.
   */
  typedef long long integer;

  /**
   * @brief C++ type corresponding to the nonPositiveInteger XML Schema
   * built-in type.
   */
  typedef long long non_positive_integer;

  /**
   * @brief C++ type corresponding to the nonNegativeInteger XML Schema
   * built-in type.
   */
  typedef unsigned long long non_negative_integer;

  /**
   * @brief C++ type corresponding to the positiveInteger XML Schema
   * built-in type.
   */
  typedef unsigned long long positive_integer;

  /**
   * @brief C++ type corresponding to the negativeInteger XML Schema
   * built-in type.
   */
  typedef long long negative_integer;


  // Boolean.
  //

  /**
   * @brief C++ type corresponding to the boolean XML Schema
   * built-in type.
   */
  typedef bool boolean;


  // Floating-point types.
  //

  /**
   * @brief C++ type corresponding to the float XML Schema
   * built-in type.
   */
  typedef float float_;

  /**
   * @brief C++ type corresponding to the double XML Schema
   * built-in type.
   */
  typedef double double_;

  /**
   * @brief C++ type corresponding to the decimal XML Schema
   * built-in type.
   */
  typedef double decimal;


  // String types.
  //

  /**
   * @brief C++ type corresponding to the string XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::string< char, simple_type > string;

  /**
   * @brief C++ type corresponding to the normalizedString XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::normalized_string< char, string > normalized_string;

  /**
   * @brief C++ type corresponding to the token XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::token< char, normalized_string > token;

  /**
   * @brief C++ type corresponding to the Name XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::name< char, token > name;

  /**
   * @brief C++ type corresponding to the NMTOKEN XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::nmtoken< char, token > nmtoken;

  /**
   * @brief C++ type corresponding to the NMTOKENS XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::nmtokens< char, simple_type, nmtoken > nmtokens;

  /**
   * @brief C++ type corresponding to the NCName XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::ncname< char, name > ncname;

  /**
   * @brief C++ type corresponding to the language XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::language< char, token > language;


  // ID/IDREF.
  //

  /**
   * @brief C++ type corresponding to the ID XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::id< char, ncname > id;

  /**
   * @brief C++ type corresponding to the IDREF XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::idref< char, ncname, type > idref;

  /**
   * @brief C++ type corresponding to the IDREFS XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::idrefs< char, simple_type, idref > idrefs;


  // URI.
  //

  /**
   * @brief C++ type corresponding to the anyURI XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::uri< char, simple_type > uri;


  // Qualified name.
  //

  /**
   * @brief C++ type corresponding to the QName XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::qname< char, simple_type, uri, ncname > qname;


  // Binary.
  //

  /**
   * @brief Binary buffer type.
   */
  typedef ::xsd::cxx::tree::buffer< char > buffer;

  /**
   * @brief C++ type corresponding to the base64Binary XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::base64_binary< char, simple_type > base64_binary;

  /**
   * @brief C++ type corresponding to the hexBinary XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::hex_binary< char, simple_type > hex_binary;


  // Date/time.
  //

  /**
   * @brief Time zone type.
   */
  typedef ::xsd::cxx::tree::time_zone time_zone;

  /**
   * @brief C++ type corresponding to the date XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::date< char, simple_type > date;

  /**
   * @brief C++ type corresponding to the dateTime XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::date_time< char, simple_type > date_time;

  /**
   * @brief C++ type corresponding to the duration XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::duration< char, simple_type > duration;

  /**
   * @brief C++ type corresponding to the gDay XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::gday< char, simple_type > gday;

  /**
   * @brief C++ type corresponding to the gMonth XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::gmonth< char, simple_type > gmonth;

  /**
   * @brief C++ type corresponding to the gMonthDay XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::gmonth_day< char, simple_type > gmonth_day;

  /**
   * @brief C++ type corresponding to the gYear XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::gyear< char, simple_type > gyear;

  /**
   * @brief C++ type corresponding to the gYearMonth XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::gyear_month< char, simple_type > gyear_month;

  /**
   * @brief C++ type corresponding to the time XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::time< char, simple_type > time;


  // Entity.
  //

  /**
   * @brief C++ type corresponding to the ENTITY XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::entity< char, ncname > entity;

  /**
   * @brief C++ type corresponding to the ENTITIES XML Schema
   * built-in type.
   */
  typedef ::xsd::cxx::tree::entities< char, simple_type, entity > entities;


  // Namespace information and list stream. Used in
  // serialization functions.
  //
  /**
   * @brief Namespace serialization information.
   */
  typedef ::xsd::cxx::xml::dom::namespace_info< char > namespace_info;

  /**
   * @brief Namespace serialization information map.
   */
  typedef ::xsd::cxx::xml::dom::namespace_infomap< char > namespace_infomap;

  /**
   * @brief List serialization stream.
   */
  typedef ::xsd::cxx::tree::list_stream< char > list_stream;

  /**
   * @brief Serialization wrapper for the %double type.
   */
  typedef ::xsd::cxx::tree::as_double< double_ > as_double;

  /**
   * @brief Serialization wrapper for the %decimal type.
   */
  typedef ::xsd::cxx::tree::as_decimal< decimal > as_decimal;

  /**
   * @brief Simple type facet.
   */
  typedef ::xsd::cxx::tree::facet facet;

  // Flags and properties.
  //

  /**
   * @brief Parsing and serialization flags.
   */
  typedef ::xsd::cxx::tree::flags flags;

  /**
   * @brief Parsing properties.
   */
  typedef ::xsd::cxx::tree::properties< char > properties;

  // Parsing/serialization diagnostics.
  //

  /**
   * @brief Error severity.
   */
  typedef ::xsd::cxx::tree::severity severity;

  /**
   * @brief Error condition.
   */
  typedef ::xsd::cxx::tree::error< char > error;

  /**
   * @brief List of %error conditions.
   */
  typedef ::xsd::cxx::tree::diagnostics< char > diagnostics;

  // Exceptions.
  //

  /**
   * @brief Root of the C++/Tree %exception hierarchy.
   */
  typedef ::xsd::cxx::tree::exception< char > exception;

  /**
   * @brief Exception indicating that the size argument exceeds
   * the capacity argument.
   */
  typedef ::xsd::cxx::tree::bounds< char > bounds;

  /**
   * @brief Exception indicating that a duplicate ID value
   * was encountered in the object model.
   */
  typedef ::xsd::cxx::tree::duplicate_id< char > duplicate_id;

  /**
   * @brief Exception indicating a parsing failure.
   */
  typedef ::xsd::cxx::tree::parsing< char > parsing;

  /**
   * @brief Exception indicating that an expected element
   * was not encountered.
   */
  typedef ::xsd::cxx::tree::expected_element< char > expected_element;

  /**
   * @brief Exception indicating that an unexpected element
   * was encountered.
   */
  typedef ::xsd::cxx::tree::unexpected_element< char > unexpected_element;

  /**
   * @brief Exception indicating that an expected attribute
   * was not encountered.
   */
  typedef ::xsd::cxx::tree::expected_attribute< char > expected_attribute;

  /**
   * @brief Exception indicating that an unexpected enumerator
   * was encountered.
   */
  typedef ::xsd::cxx::tree::unexpected_enumerator< char > unexpected_enumerator;

  /**
   * @brief Exception indicating that the text content was
   * expected for an element.
   */
  typedef ::xsd::cxx::tree::expected_text_content< char > expected_text_content;

  /**
   * @brief Exception indicating that a prefix-namespace
   * mapping was not provided.
   */
  typedef ::xsd::cxx::tree::no_prefix_mapping< char > no_prefix_mapping;

  /**
   * @brief Exception indicating a serialization failure.
   */
  typedef ::xsd::cxx::tree::serialization< char > serialization;

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

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

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

// Forward declarations.
//
namespace edxl
{
  namespace de
  {
    class contentObjectType;
    class nonXMLContentType;
    class xmlContentType;
    class anyXMLType;
    class valueListType;
    class valueSchemeType;
    class targetAreaType;
    class statusValues;
    class typeValues;
    class EDXLDistribution;
  }
}


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

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

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

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

namespace edxl
{
  /**
   * @brief C++ namespace for the %urn:oasis:names:tc:emergency:EDXL:DE:1.0
   * schema namespace.
   */
  namespace de
  {
    /**
     * @brief Class corresponding to the %contentObjectType schema type.
     *
     * @nosubgrouping
     */
    class contentObjectType: public ::xml_schema::type
    {
      public:
      /**
       * @name contentDescription
       *
       * @brief Accessor and modifier functions for the %contentDescription
       * optional element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string contentDescription_type;

      /**
       * @brief Element optional container type.
       */
      typedef ::xsd::cxx::tree::optional< contentDescription_type > contentDescription_optional;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< contentDescription_type, char > contentDescription_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * container.
       *
       * @return A constant reference to the optional container.
       */
      const contentDescription_optional&
      contentDescription () const;

      /**
       * @brief Return a read-write reference to the element container.
       *
       * @return A reference to the optional container.
       */
      contentDescription_optional&
      contentDescription ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      contentDescription (const contentDescription_type& x);

      /**
       * @brief Set the element value.
       *
       * @param x An optional container with the new value to set.
       *
       * If the value is present in @a x then this function makes a copy 
       * of this value and sets it as the new value of the element.
       * Otherwise the element container is set the 'not present' state.
       */
      void
      contentDescription (const contentDescription_optional& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly instead
       * of making a copy.
       */
      void
      contentDescription (::std::auto_ptr< contentDescription_type > p);

      //@}

      /**
       * @name contentKeyword
       *
       * @brief Accessor and modifier functions for the %contentKeyword
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::valueListType contentKeyword_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< contentKeyword_type > contentKeyword_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef contentKeyword_sequence::iterator contentKeyword_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef contentKeyword_sequence::const_iterator contentKeyword_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< contentKeyword_type, char > contentKeyword_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const contentKeyword_sequence&
      contentKeyword () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      contentKeyword_sequence&
      contentKeyword ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      contentKeyword (const contentKeyword_sequence& s);

      //@}

      /**
       * @name incidentID
       *
       * @brief Accessor and modifier functions for the %incidentID
       * optional element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string incidentID_type;

      /**
       * @brief Element optional container type.
       */
      typedef ::xsd::cxx::tree::optional< incidentID_type > incidentID_optional;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< incidentID_type, char > incidentID_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * container.
       *
       * @return A constant reference to the optional container.
       */
      const incidentID_optional&
      incidentID () const;

      /**
       * @brief Return a read-write reference to the element container.
       *
       * @return A reference to the optional container.
       */
      incidentID_optional&
      incidentID ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      incidentID (const incidentID_type& x);

      /**
       * @brief Set the element value.
       *
       * @param x An optional container with the new value to set.
       *
       * If the value is present in @a x then this function makes a copy 
       * of this value and sets it as the new value of the element.
       * Otherwise the element container is set the 'not present' state.
       */
      void
      incidentID (const incidentID_optional& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly instead
       * of making a copy.
       */
      void
      incidentID (::std::auto_ptr< incidentID_type > p);

      //@}

      /**
       * @name incidentDescription
       *
       * @brief Accessor and modifier functions for the %incidentDescription
       * optional element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string incidentDescription_type;

      /**
       * @brief Element optional container type.
       */
      typedef ::xsd::cxx::tree::optional< incidentDescription_type > incidentDescription_optional;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< incidentDescription_type, char > incidentDescription_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * container.
       *
       * @return A constant reference to the optional container.
       */
      const incidentDescription_optional&
      incidentDescription () const;

      /**
       * @brief Return a read-write reference to the element container.
       *
       * @return A reference to the optional container.
       */
      incidentDescription_optional&
      incidentDescription ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      incidentDescription (const incidentDescription_type& x);

      /**
       * @brief Set the element value.
       *
       * @param x An optional container with the new value to set.
       *
       * If the value is present in @a x then this function makes a copy 
       * of this value and sets it as the new value of the element.
       * Otherwise the element container is set the 'not present' state.
       */
      void
      incidentDescription (const incidentDescription_optional& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly instead
       * of making a copy.
       */
      void
      incidentDescription (::std::auto_ptr< incidentDescription_type > p);

      //@}

      /**
       * @name originatorRole
       *
       * @brief Accessor and modifier functions for the %originatorRole
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::valueListType originatorRole_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< originatorRole_type > originatorRole_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef originatorRole_sequence::iterator originatorRole_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef originatorRole_sequence::const_iterator originatorRole_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< originatorRole_type, char > originatorRole_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const originatorRole_sequence&
      originatorRole () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      originatorRole_sequence&
      originatorRole ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      originatorRole (const originatorRole_sequence& s);

      //@}

      /**
       * @name consumerRole
       *
       * @brief Accessor and modifier functions for the %consumerRole
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::valueListType consumerRole_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< consumerRole_type > consumerRole_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef consumerRole_sequence::iterator consumerRole_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef consumerRole_sequence::const_iterator consumerRole_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< consumerRole_type, char > consumerRole_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const consumerRole_sequence&
      consumerRole () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      consumerRole_sequence&
      consumerRole ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      consumerRole (const consumerRole_sequence& s);

      //@}

      /**
       * @name confidentiality
       *
       * @brief Accessor and modifier functions for the %confidentiality
       * optional element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string confidentiality_type;

      /**
       * @brief Element optional container type.
       */
      typedef ::xsd::cxx::tree::optional< confidentiality_type > confidentiality_optional;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< confidentiality_type, char > confidentiality_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * container.
       *
       * @return A constant reference to the optional container.
       */
      const confidentiality_optional&
      confidentiality () const;

      /**
       * @brief Return a read-write reference to the element container.
       *
       * @return A reference to the optional container.
       */
      confidentiality_optional&
      confidentiality ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      confidentiality (const confidentiality_type& x);

      /**
       * @brief Set the element value.
       *
       * @param x An optional container with the new value to set.
       *
       * If the value is present in @a x then this function makes a copy 
       * of this value and sets it as the new value of the element.
       * Otherwise the element container is set the 'not present' state.
       */
      void
      confidentiality (const confidentiality_optional& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly instead
       * of making a copy.
       */
      void
      confidentiality (::std::auto_ptr< confidentiality_type > p);

      //@}

      /**
       * @name nonXMLContent
       *
       * @brief Accessor and modifier functions for the %nonXMLContent
       * optional element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::nonXMLContentType nonXMLContent_type;

      /**
       * @brief Element optional container type.
       */
      typedef ::xsd::cxx::tree::optional< nonXMLContent_type > nonXMLContent_optional;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< nonXMLContent_type, char > nonXMLContent_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * container.
       *
       * @return A constant reference to the optional container.
       */
      const nonXMLContent_optional&
      nonXMLContent () const;

      /**
       * @brief Return a read-write reference to the element container.
       *
       * @return A reference to the optional container.
       */
      nonXMLContent_optional&
      nonXMLContent ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      nonXMLContent (const nonXMLContent_type& x);

      /**
       * @brief Set the element value.
       *
       * @param x An optional container with the new value to set.
       *
       * If the value is present in @a x then this function makes a copy 
       * of this value and sets it as the new value of the element.
       * Otherwise the element container is set the 'not present' state.
       */
      void
      nonXMLContent (const nonXMLContent_optional& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly instead
       * of making a copy.
       */
      void
      nonXMLContent (::std::auto_ptr< nonXMLContent_type > p);

      //@}

      /**
       * @name xmlContent
       *
       * @brief Accessor and modifier functions for the %xmlContent
       * optional element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::xmlContentType xmlContent_type;

      /**
       * @brief Element optional container type.
       */
      typedef ::xsd::cxx::tree::optional< xmlContent_type > xmlContent_optional;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< xmlContent_type, char > xmlContent_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * container.
       *
       * @return A constant reference to the optional container.
       */
      const xmlContent_optional&
      xmlContent () const;

      /**
       * @brief Return a read-write reference to the element container.
       *
       * @return A reference to the optional container.
       */
      xmlContent_optional&
      xmlContent ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      xmlContent (const xmlContent_type& x);

      /**
       * @brief Set the element value.
       *
       * @param x An optional container with the new value to set.
       *
       * If the value is present in @a x then this function makes a copy 
       * of this value and sets it as the new value of the element.
       * Otherwise the element container is set the 'not present' state.
       */
      void
      xmlContent (const xmlContent_optional& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly instead
       * of making a copy.
       */
      void
      xmlContent (::std::auto_ptr< xmlContent_type > p);

      //@}

      /**
       * @name Constructors
       */
      //@{

      /**
       * @brief Create an instance from the ultimate base and
       * initializers for required elements and attributes.
       */
      contentObjectType ();

      /**
       * @brief Create an instance from a DOM element.
       *
       * @param e A DOM element to extract the data from.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      contentObjectType (const ::xercesc::DOMElement& e,
                         ::xml_schema::flags f = 0,
                         ::xml_schema::container* c = 0);

      /**
       * @brief Copy constructor.
       *
       * @param x An instance to make a copy of.
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       *
       * For polymorphic object models use the @c _clone function instead.
       */
      contentObjectType (const contentObjectType& x,
                         ::xml_schema::flags f = 0,
                         ::xml_schema::container* c = 0);

      /**
       * @brief Copy the instance polymorphically.
       *
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       * @return A pointer to the dynamically allocated copy.
       *
       * This function ensures that the dynamic type of the instance is
       * used for copying and should be used for polymorphic object
       * models instead of the copy constructor.
       */
      virtual contentObjectType*
      _clone (::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0) const;

      //@}

      /**
       * @brief Destructor.
       */
      virtual 
      ~contentObjectType ();

      // Implementation.
      //

      //@cond

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

      protected:
      contentDescription_optional contentDescription_;
      contentKeyword_sequence contentKeyword_;
      incidentID_optional incidentID_;
      incidentDescription_optional incidentDescription_;
      originatorRole_sequence originatorRole_;
      consumerRole_sequence consumerRole_;
      confidentiality_optional confidentiality_;
      nonXMLContent_optional nonXMLContent_;
      xmlContent_optional xmlContent_;

      //@endcond
    };

    /**
     * @brief Class corresponding to the %nonXMLContentType schema type.
     *
     * @nosubgrouping
     */
    class nonXMLContentType: public ::xml_schema::type
    {
      public:
      /**
       * @name mimeType
       *
       * @brief Accessor and modifier functions for the %mimeType
       * required element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string mimeType_type;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< mimeType_type, char > mimeType_traits;

      /**
       * @brief Return a read-only (constant) reference to the element.
       *
       * @return A constant reference to the element.
       */
      const mimeType_type&
      mimeType () const;

      /**
       * @brief Return a read-write reference to the element.
       *
       * @return A reference to the element.
       */
      mimeType_type&
      mimeType ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      mimeType (const mimeType_type& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly
       * instead of making a copy.
       */
      void
      mimeType (::std::auto_ptr< mimeType_type > p);

      //@}

      /**
       * @name size
       *
       * @brief Accessor and modifier functions for the %size
       * optional element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::integer size_type;

      /**
       * @brief Element optional container type.
       */
      typedef ::xsd::cxx::tree::optional< size_type > size_optional;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< size_type, char > size_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * container.
       *
       * @return A constant reference to the optional container.
       */
      const size_optional&
      size () const;

      /**
       * @brief Return a read-write reference to the element container.
       *
       * @return A reference to the optional container.
       */
      size_optional&
      size ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      size (const size_type& x);

      /**
       * @brief Set the element value.
       *
       * @param x An optional container with the new value to set.
       *
       * If the value is present in @a x then this function makes a copy 
       * of this value and sets it as the new value of the element.
       * Otherwise the element container is set the 'not present' state.
       */
      void
      size (const size_optional& x);

      //@}

      /**
       * @name digest
       *
       * @brief Accessor and modifier functions for the %digest
       * optional element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string digest_type;

      /**
       * @brief Element optional container type.
       */
      typedef ::xsd::cxx::tree::optional< digest_type > digest_optional;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< digest_type, char > digest_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * container.
       *
       * @return A constant reference to the optional container.
       */
      const digest_optional&
      digest () const;

      /**
       * @brief Return a read-write reference to the element container.
       *
       * @return A reference to the optional container.
       */
      digest_optional&
      digest ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      digest (const digest_type& x);

      /**
       * @brief Set the element value.
       *
       * @param x An optional container with the new value to set.
       *
       * If the value is present in @a x then this function makes a copy 
       * of this value and sets it as the new value of the element.
       * Otherwise the element container is set the 'not present' state.
       */
      void
      digest (const digest_optional& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly instead
       * of making a copy.
       */
      void
      digest (::std::auto_ptr< digest_type > p);

      //@}

      /**
       * @name uri
       *
       * @brief Accessor and modifier functions for the %uri
       * optional element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::uri uri_type;

      /**
       * @brief Element optional container type.
       */
      typedef ::xsd::cxx::tree::optional< uri_type > uri_optional;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< uri_type, char > uri_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * container.
       *
       * @return A constant reference to the optional container.
       */
      const uri_optional&
      uri () const;

      /**
       * @brief Return a read-write reference to the element container.
       *
       * @return A reference to the optional container.
       */
      uri_optional&
      uri ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      uri (const uri_type& x);

      /**
       * @brief Set the element value.
       *
       * @param x An optional container with the new value to set.
       *
       * If the value is present in @a x then this function makes a copy 
       * of this value and sets it as the new value of the element.
       * Otherwise the element container is set the 'not present' state.
       */
      void
      uri (const uri_optional& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly instead
       * of making a copy.
       */
      void
      uri (::std::auto_ptr< uri_type > p);

      //@}

      /**
       * @name contentData
       *
       * @brief Accessor and modifier functions for the %contentData
       * optional element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::base64_binary contentData_type;

      /**
       * @brief Element optional container type.
       */
      typedef ::xsd::cxx::tree::optional< contentData_type > contentData_optional;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< contentData_type, char > contentData_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * container.
       *
       * @return A constant reference to the optional container.
       */
      const contentData_optional&
      contentData () const;

      /**
       * @brief Return a read-write reference to the element container.
       *
       * @return A reference to the optional container.
       */
      contentData_optional&
      contentData ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      contentData (const contentData_type& x);

      /**
       * @brief Set the element value.
       *
       * @param x An optional container with the new value to set.
       *
       * If the value is present in @a x then this function makes a copy 
       * of this value and sets it as the new value of the element.
       * Otherwise the element container is set the 'not present' state.
       */
      void
      contentData (const contentData_optional& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly instead
       * of making a copy.
       */
      void
      contentData (::std::auto_ptr< contentData_type > p);

      //@}

      /**
       * @name Constructors
       */
      //@{

      /**
       * @brief Create an instance from the ultimate base and
       * initializers for required elements and attributes.
       */
      nonXMLContentType (const mimeType_type&);

      /**
       * @brief Create an instance from a DOM element.
       *
       * @param e A DOM element to extract the data from.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      nonXMLContentType (const ::xercesc::DOMElement& e,
                         ::xml_schema::flags f = 0,
                         ::xml_schema::container* c = 0);

      /**
       * @brief Copy constructor.
       *
       * @param x An instance to make a copy of.
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       *
       * For polymorphic object models use the @c _clone function instead.
       */
      nonXMLContentType (const nonXMLContentType& x,
                         ::xml_schema::flags f = 0,
                         ::xml_schema::container* c = 0);

      /**
       * @brief Copy the instance polymorphically.
       *
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       * @return A pointer to the dynamically allocated copy.
       *
       * This function ensures that the dynamic type of the instance is
       * used for copying and should be used for polymorphic object
       * models instead of the copy constructor.
       */
      virtual nonXMLContentType*
      _clone (::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0) const;

      //@}

      /**
       * @brief Destructor.
       */
      virtual 
      ~nonXMLContentType ();

      // Implementation.
      //

      //@cond

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

      protected:
      ::xsd::cxx::tree::one< mimeType_type > mimeType_;
      size_optional size_;
      digest_optional digest_;
      uri_optional uri_;
      contentData_optional contentData_;

      //@endcond
    };

    /**
     * @brief Class corresponding to the %xmlContentType schema type.
     *
     * @nosubgrouping
     */
    class xmlContentType: public ::xml_schema::type
    {
      public:
      /**
       * @name keyXMLContent
       *
       * @brief Accessor and modifier functions for the %keyXMLContent
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::anyXMLType keyXMLContent_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< keyXMLContent_type > keyXMLContent_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef keyXMLContent_sequence::iterator keyXMLContent_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef keyXMLContent_sequence::const_iterator keyXMLContent_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< keyXMLContent_type, char > keyXMLContent_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const keyXMLContent_sequence&
      keyXMLContent () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      keyXMLContent_sequence&
      keyXMLContent ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      keyXMLContent (const keyXMLContent_sequence& s);

      //@}

      /**
       * @name embeddedXMLContent
       *
       * @brief Accessor and modifier functions for the %embeddedXMLContent
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::anyXMLType embeddedXMLContent_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< embeddedXMLContent_type > embeddedXMLContent_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef embeddedXMLContent_sequence::iterator embeddedXMLContent_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef embeddedXMLContent_sequence::const_iterator embeddedXMLContent_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< embeddedXMLContent_type, char > embeddedXMLContent_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const embeddedXMLContent_sequence&
      embeddedXMLContent () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      embeddedXMLContent_sequence&
      embeddedXMLContent ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      embeddedXMLContent (const embeddedXMLContent_sequence& s);

      //@}

      /**
       * @name Constructors
       */
      //@{

      /**
       * @brief Create an instance from the ultimate base and
       * initializers for required elements and attributes.
       */
      xmlContentType ();

      /**
       * @brief Create an instance from a DOM element.
       *
       * @param e A DOM element to extract the data from.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      xmlContentType (const ::xercesc::DOMElement& e,
                      ::xml_schema::flags f = 0,
                      ::xml_schema::container* c = 0);

      /**
       * @brief Copy constructor.
       *
       * @param x An instance to make a copy of.
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       *
       * For polymorphic object models use the @c _clone function instead.
       */
      xmlContentType (const xmlContentType& x,
                      ::xml_schema::flags f = 0,
                      ::xml_schema::container* c = 0);

      /**
       * @brief Copy the instance polymorphically.
       *
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       * @return A pointer to the dynamically allocated copy.
       *
       * This function ensures that the dynamic type of the instance is
       * used for copying and should be used for polymorphic object
       * models instead of the copy constructor.
       */
      virtual xmlContentType*
      _clone (::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0) const;

      //@}

      /**
       * @brief Destructor.
       */
      virtual 
      ~xmlContentType ();

      // Implementation.
      //

      //@cond

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

      protected:
      keyXMLContent_sequence keyXMLContent_;
      embeddedXMLContent_sequence embeddedXMLContent_;

      //@endcond
    };

    /**
     * @brief Class corresponding to the %anyXMLType schema type.
     *
     * @nosubgrouping
     */
    class anyXMLType: public ::xml_schema::type
    {
      public:
      /**
       * @name Constructors
       */
      //@{

      /**
       * @brief Create an instance from the ultimate base and
       * initializers for required elements and attributes.
       */
      anyXMLType ();

      /**
       * @brief Create an instance from a DOM element.
       *
       * @param e A DOM element to extract the data from.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      anyXMLType (const ::xercesc::DOMElement& e,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

      /**
       * @brief Copy constructor.
       *
       * @param x An instance to make a copy of.
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       *
       * For polymorphic object models use the @c _clone function instead.
       */
      anyXMLType (const anyXMLType& x,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

      /**
       * @brief Copy the instance polymorphically.
       *
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       * @return A pointer to the dynamically allocated copy.
       *
       * This function ensures that the dynamic type of the instance is
       * used for copying and should be used for polymorphic object
       * models instead of the copy constructor.
       */
      virtual anyXMLType*
      _clone (::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0) const;

      //@}

      /**
       * @brief Destructor.
       */
      virtual 
      ~anyXMLType ();

      // Implementation.
      //

      //@cond

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

      protected:

      //@endcond
    };

    /**
     * @brief Class corresponding to the %valueListType schema type.
     *
     * @nosubgrouping
     */
    class valueListType: public ::xml_schema::type
    {
      public:
      /**
       * @name valueListUrn
       *
       * @brief Accessor and modifier functions for the %valueListUrn
       * required element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string valueListUrn_type;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< valueListUrn_type, char > valueListUrn_traits;

      /**
       * @brief Return a read-only (constant) reference to the element.
       *
       * @return A constant reference to the element.
       */
      const valueListUrn_type&
      valueListUrn () const;

      /**
       * @brief Return a read-write reference to the element.
       *
       * @return A reference to the element.
       */
      valueListUrn_type&
      valueListUrn ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      valueListUrn (const valueListUrn_type& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly
       * instead of making a copy.
       */
      void
      valueListUrn (::std::auto_ptr< valueListUrn_type > p);

      //@}

      /**
       * @name value
       *
       * @brief Accessor and modifier functions for the %value
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string value_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< value_type > value_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef value_sequence::iterator value_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef value_sequence::const_iterator value_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< value_type, char > value_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const value_sequence&
      value () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      value_sequence&
      value ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      value (const value_sequence& s);

      //@}

      /**
       * @name Constructors
       */
      //@{

      /**
       * @brief Create an instance from the ultimate base and
       * initializers for required elements and attributes.
       */
      valueListType (const valueListUrn_type&);

      /**
       * @brief Create an instance from a DOM element.
       *
       * @param e A DOM element to extract the data from.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      valueListType (const ::xercesc::DOMElement& e,
                     ::xml_schema::flags f = 0,
                     ::xml_schema::container* c = 0);

      /**
       * @brief Copy constructor.
       *
       * @param x An instance to make a copy of.
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       *
       * For polymorphic object models use the @c _clone function instead.
       */
      valueListType (const valueListType& x,
                     ::xml_schema::flags f = 0,
                     ::xml_schema::container* c = 0);

      /**
       * @brief Copy the instance polymorphically.
       *
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       * @return A pointer to the dynamically allocated copy.
       *
       * This function ensures that the dynamic type of the instance is
       * used for copying and should be used for polymorphic object
       * models instead of the copy constructor.
       */
      virtual valueListType*
      _clone (::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0) const;

      //@}

      /**
       * @brief Destructor.
       */
      virtual 
      ~valueListType ();

      // Implementation.
      //

      //@cond

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

      protected:
      ::xsd::cxx::tree::one< valueListUrn_type > valueListUrn_;
      value_sequence value_;

      //@endcond
    };

    /**
     * @brief Class corresponding to the %valueSchemeType schema type.
     *
     * @nosubgrouping
     */
    class valueSchemeType: public ::xml_schema::type
    {
      public:
      /**
       * @name explicitAddressScheme
       *
       * @brief Accessor and modifier functions for the %explicitAddressScheme
       * required element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string explicitAddressScheme_type;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< explicitAddressScheme_type, char > explicitAddressScheme_traits;

      /**
       * @brief Return a read-only (constant) reference to the element.
       *
       * @return A constant reference to the element.
       */
      const explicitAddressScheme_type&
      explicitAddressScheme () const;

      /**
       * @brief Return a read-write reference to the element.
       *
       * @return A reference to the element.
       */
      explicitAddressScheme_type&
      explicitAddressScheme ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      explicitAddressScheme (const explicitAddressScheme_type& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly
       * instead of making a copy.
       */
      void
      explicitAddressScheme (::std::auto_ptr< explicitAddressScheme_type > p);

      //@}

      /**
       * @name explicitAddressValue
       *
       * @brief Accessor and modifier functions for the %explicitAddressValue
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string explicitAddressValue_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< explicitAddressValue_type > explicitAddressValue_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef explicitAddressValue_sequence::iterator explicitAddressValue_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef explicitAddressValue_sequence::const_iterator explicitAddressValue_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< explicitAddressValue_type, char > explicitAddressValue_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const explicitAddressValue_sequence&
      explicitAddressValue () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      explicitAddressValue_sequence&
      explicitAddressValue ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      explicitAddressValue (const explicitAddressValue_sequence& s);

      //@}

      /**
       * @name Constructors
       */
      //@{

      /**
       * @brief Create an instance from the ultimate base and
       * initializers for required elements and attributes.
       */
      valueSchemeType (const explicitAddressScheme_type&);

      /**
       * @brief Create an instance from a DOM element.
       *
       * @param e A DOM element to extract the data from.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      valueSchemeType (const ::xercesc::DOMElement& e,
                       ::xml_schema::flags f = 0,
                       ::xml_schema::container* c = 0);

      /**
       * @brief Copy constructor.
       *
       * @param x An instance to make a copy of.
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       *
       * For polymorphic object models use the @c _clone function instead.
       */
      valueSchemeType (const valueSchemeType& x,
                       ::xml_schema::flags f = 0,
                       ::xml_schema::container* c = 0);

      /**
       * @brief Copy the instance polymorphically.
       *
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       * @return A pointer to the dynamically allocated copy.
       *
       * This function ensures that the dynamic type of the instance is
       * used for copying and should be used for polymorphic object
       * models instead of the copy constructor.
       */
      virtual valueSchemeType*
      _clone (::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0) const;

      //@}

      /**
       * @brief Destructor.
       */
      virtual 
      ~valueSchemeType ();

      // Implementation.
      //

      //@cond

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

      protected:
      ::xsd::cxx::tree::one< explicitAddressScheme_type > explicitAddressScheme_;
      explicitAddressValue_sequence explicitAddressValue_;

      //@endcond
    };

    /**
     * @brief Class corresponding to the %targetAreaType schema type.
     *
     * @nosubgrouping
     */
    class targetAreaType: public ::xml_schema::type
    {
      public:
      /**
       * @name circle
       *
       * @brief Accessor and modifier functions for the %circle
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string circle_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< circle_type > circle_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef circle_sequence::iterator circle_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef circle_sequence::const_iterator circle_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< circle_type, char > circle_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const circle_sequence&
      circle () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      circle_sequence&
      circle ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      circle (const circle_sequence& s);

      //@}

      /**
       * @name polygon
       *
       * @brief Accessor and modifier functions for the %polygon
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string polygon_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< polygon_type > polygon_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef polygon_sequence::iterator polygon_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef polygon_sequence::const_iterator polygon_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< polygon_type, char > polygon_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const polygon_sequence&
      polygon () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      polygon_sequence&
      polygon ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      polygon (const polygon_sequence& s);

      //@}

      /**
       * @name country
       *
       * @brief Accessor and modifier functions for the %country
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string country_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< country_type > country_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef country_sequence::iterator country_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef country_sequence::const_iterator country_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< country_type, char > country_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const country_sequence&
      country () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      country_sequence&
      country ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      country (const country_sequence& s);

      //@}

      /**
       * @name subdivision
       *
       * @brief Accessor and modifier functions for the %subdivision
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string subdivision_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< subdivision_type > subdivision_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef subdivision_sequence::iterator subdivision_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef subdivision_sequence::const_iterator subdivision_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< subdivision_type, char > subdivision_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const subdivision_sequence&
      subdivision () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      subdivision_sequence&
      subdivision ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      subdivision (const subdivision_sequence& s);

      //@}

      /**
       * @name locCodeUN
       *
       * @brief Accessor and modifier functions for the %locCodeUN
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string locCodeUN_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< locCodeUN_type > locCodeUN_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef locCodeUN_sequence::iterator locCodeUN_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef locCodeUN_sequence::const_iterator locCodeUN_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< locCodeUN_type, char > locCodeUN_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const locCodeUN_sequence&
      locCodeUN () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      locCodeUN_sequence&
      locCodeUN ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      locCodeUN (const locCodeUN_sequence& s);

      //@}

      /**
       * @name Constructors
       */
      //@{

      /**
       * @brief Create an instance from the ultimate base and
       * initializers for required elements and attributes.
       */
      targetAreaType ();

      /**
       * @brief Create an instance from a DOM element.
       *
       * @param e A DOM element to extract the data from.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      targetAreaType (const ::xercesc::DOMElement& e,
                      ::xml_schema::flags f = 0,
                      ::xml_schema::container* c = 0);

      /**
       * @brief Copy constructor.
       *
       * @param x An instance to make a copy of.
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       *
       * For polymorphic object models use the @c _clone function instead.
       */
      targetAreaType (const targetAreaType& x,
                      ::xml_schema::flags f = 0,
                      ::xml_schema::container* c = 0);

      /**
       * @brief Copy the instance polymorphically.
       *
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       * @return A pointer to the dynamically allocated copy.
       *
       * This function ensures that the dynamic type of the instance is
       * used for copying and should be used for polymorphic object
       * models instead of the copy constructor.
       */
      virtual targetAreaType*
      _clone (::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0) const;

      //@}

      /**
       * @brief Destructor.
       */
      virtual 
      ~targetAreaType ();

      // Implementation.
      //

      //@cond

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

      protected:
      circle_sequence circle_;
      polygon_sequence polygon_;
      country_sequence country_;
      subdivision_sequence subdivision_;
      locCodeUN_sequence locCodeUN_;

      //@endcond
    };

    /**
     * @brief Enumeration class corresponding to the %statusValues
     * schema type.
     */
    class statusValues: public ::xml_schema::nmtoken
    {
      public:

      /**
       * @brief Underlying enum type.
       */
      enum value
      {
        Actual,
        Exercise,
        System,
        Test
      };

      /**
       * @brief Create an instance from the underlying enum value.
       *
       * @param v A enum value.
       */
      statusValues (value v);

      /**
       * @brief Create an instance from a C string.
       *
       * @param v A string value.
       */
      statusValues (const char* v);

      /**
       * @brief Create an instance from a string.
       *
       * @param v A string value.
       */
      statusValues (const ::std::string& v);

      /**
       * @brief Create an instance from the base value.
       *
       * @param v A base value.
       */
      statusValues (const ::xml_schema::nmtoken& v);

      /**
       * @brief Create an instance from a DOM element.
       *
       * @param e A DOM element to extract the data from.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      statusValues (const ::xercesc::DOMElement& e,
                    ::xml_schema::flags f = 0,
                    ::xml_schema::container* c = 0);

      /**
       * @brief Create an instance from a DOM attribute.
       *
       * @param a A DOM attribute to extract the data from.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      statusValues (const ::xercesc::DOMAttr& a,
                    ::xml_schema::flags f = 0,
                    ::xml_schema::container* c = 0);

      /**
       * @brief Create an instance from a string fragment.
       *
       * @param s A string fragment to extract the data from.
       * @param e A pointer to DOM element containing the string fragment.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      statusValues (const ::std::string& s,
                    const ::xercesc::DOMElement* e,
                    ::xml_schema::flags f = 0,
                    ::xml_schema::container* c = 0);

      /**
       * @brief Copy constructor.
       *
       * @param x An instance to make a copy of.
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       *
       * For polymorphic object models use the @c _clone function instead.
       */
      statusValues (const statusValues& x,
                    ::xml_schema::flags f = 0,
                    ::xml_schema::container* c = 0);

      /**
       * @brief Copy the instance polymorphically.
       *
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       * @return A pointer to the dynamically allocated copy.
       *
       * This function ensures that the dynamic type of the instance is
       * used for copying and should be used for polymorphic object
       * models instead of the copy constructor.
       */
      virtual statusValues*
      _clone (::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0) const;

      /**
       * @brief Assign the underlying enum value.
       *
       * @param v A enum value.
       * @return A refernce to the instance.
       */
      statusValues&
      operator= (value v);

      /**
       * @brief Implicit conversion operator to the underlying
       * enum value.
       *
       * @return A enum value.
       */
      virtual
      operator value () const
      {
        return _xsd_statusValues_convert ();
      }

      //@cond

      protected:
      value
      _xsd_statusValues_convert () const;

      public:
      static const char* const _xsd_statusValues_literals_[4];
      static const value _xsd_statusValues_indexes_[4];

      //@endcond
    };

    /**
     * @brief Enumeration class corresponding to the %typeValues
     * schema type.
     */
    class typeValues: public ::xml_schema::nmtoken
    {
      public:

      /**
       * @brief Underlying enum type.
       */
      enum value
      {
        Report,
        Update,
        Cancel,
        Request,
        Response,
        Dispatch,
        Ack,
        Error,
        SensorConfiguration,
        SensorControl,
        SensorStatus,
        SensorDetection
      };

      /**
       * @brief Create an instance from the underlying enum value.
       *
       * @param v A enum value.
       */
      typeValues (value v);

      /**
       * @brief Create an instance from a C string.
       *
       * @param v A string value.
       */
      typeValues (const char* v);

      /**
       * @brief Create an instance from a string.
       *
       * @param v A string value.
       */
      typeValues (const ::std::string& v);

      /**
       * @brief Create an instance from the base value.
       *
       * @param v A base value.
       */
      typeValues (const ::xml_schema::nmtoken& v);

      /**
       * @brief Create an instance from a DOM element.
       *
       * @param e A DOM element to extract the data from.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      typeValues (const ::xercesc::DOMElement& e,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

      /**
       * @brief Create an instance from a DOM attribute.
       *
       * @param a A DOM attribute to extract the data from.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      typeValues (const ::xercesc::DOMAttr& a,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

      /**
       * @brief Create an instance from a string fragment.
       *
       * @param s A string fragment to extract the data from.
       * @param e A pointer to DOM element containing the string fragment.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      typeValues (const ::std::string& s,
                  const ::xercesc::DOMElement* e,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

      /**
       * @brief Copy constructor.
       *
       * @param x An instance to make a copy of.
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       *
       * For polymorphic object models use the @c _clone function instead.
       */
      typeValues (const typeValues& x,
                  ::xml_schema::flags f = 0,
                  ::xml_schema::container* c = 0);

      /**
       * @brief Copy the instance polymorphically.
       *
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       * @return A pointer to the dynamically allocated copy.
       *
       * This function ensures that the dynamic type of the instance is
       * used for copying and should be used for polymorphic object
       * models instead of the copy constructor.
       */
      virtual typeValues*
      _clone (::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0) const;

      /**
       * @brief Assign the underlying enum value.
       *
       * @param v A enum value.
       * @return A refernce to the instance.
       */
      typeValues&
      operator= (value v);

      /**
       * @brief Implicit conversion operator to the underlying
       * enum value.
       *
       * @return A enum value.
       */
      virtual
      operator value () const
      {
        return _xsd_typeValues_convert ();
      }

      //@cond

      protected:
      value
      _xsd_typeValues_convert () const;

      public:
      static const char* const _xsd_typeValues_literals_[12];
      static const value _xsd_typeValues_indexes_[12];

      //@endcond
    };

    /**
     * @brief Class corresponding to the %EDXLDistribution schema type.
     *
     * @nosubgrouping
     */
    class EDXLDistribution: public ::xml_schema::type
    {
      public:
      /**
       * @name distributionID
       *
       * @brief Accessor and modifier functions for the %distributionID
       * required element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string distributionID_type;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< distributionID_type, char > distributionID_traits;

      /**
       * @brief Return a read-only (constant) reference to the element.
       *
       * @return A constant reference to the element.
       */
      const distributionID_type&
      distributionID () const;

      /**
       * @brief Return a read-write reference to the element.
       *
       * @return A reference to the element.
       */
      distributionID_type&
      distributionID ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      distributionID (const distributionID_type& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly
       * instead of making a copy.
       */
      void
      distributionID (::std::auto_ptr< distributionID_type > p);

      //@}

      /**
       * @name senderID
       *
       * @brief Accessor and modifier functions for the %senderID
       * required element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string senderID_type;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< senderID_type, char > senderID_traits;

      /**
       * @brief Return a read-only (constant) reference to the element.
       *
       * @return A constant reference to the element.
       */
      const senderID_type&
      senderID () const;

      /**
       * @brief Return a read-write reference to the element.
       *
       * @return A reference to the element.
       */
      senderID_type&
      senderID ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      senderID (const senderID_type& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly
       * instead of making a copy.
       */
      void
      senderID (::std::auto_ptr< senderID_type > p);

      //@}

      /**
       * @name dateTimeSent
       *
       * @brief Accessor and modifier functions for the %dateTimeSent
       * required element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::date_time dateTimeSent_type;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< dateTimeSent_type, char > dateTimeSent_traits;

      /**
       * @brief Return a read-only (constant) reference to the element.
       *
       * @return A constant reference to the element.
       */
      const dateTimeSent_type&
      dateTimeSent () const;

      /**
       * @brief Return a read-write reference to the element.
       *
       * @return A reference to the element.
       */
      dateTimeSent_type&
      dateTimeSent ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      dateTimeSent (const dateTimeSent_type& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly
       * instead of making a copy.
       */
      void
      dateTimeSent (::std::auto_ptr< dateTimeSent_type > p);

      //@}

      /**
       * @name distributionStatus
       *
       * @brief Accessor and modifier functions for the %distributionStatus
       * required element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::statusValues distributionStatus_type;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< distributionStatus_type, char > distributionStatus_traits;

      /**
       * @brief Return a read-only (constant) reference to the element.
       *
       * @return A constant reference to the element.
       */
      const distributionStatus_type&
      distributionStatus () const;

      /**
       * @brief Return a read-write reference to the element.
       *
       * @return A reference to the element.
       */
      distributionStatus_type&
      distributionStatus ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      distributionStatus (const distributionStatus_type& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly
       * instead of making a copy.
       */
      void
      distributionStatus (::std::auto_ptr< distributionStatus_type > p);

      //@}

      /**
       * @name distributionType
       *
       * @brief Accessor and modifier functions for the %distributionType
       * required element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::typeValues distributionType_type;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< distributionType_type, char > distributionType_traits;

      /**
       * @brief Return a read-only (constant) reference to the element.
       *
       * @return A constant reference to the element.
       */
      const distributionType_type&
      distributionType () const;

      /**
       * @brief Return a read-write reference to the element.
       *
       * @return A reference to the element.
       */
      distributionType_type&
      distributionType ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      distributionType (const distributionType_type& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly
       * instead of making a copy.
       */
      void
      distributionType (::std::auto_ptr< distributionType_type > p);

      //@}

      /**
       * @name combinedConfidentiality
       *
       * @brief Accessor and modifier functions for the %combinedConfidentiality
       * required element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string combinedConfidentiality_type;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< combinedConfidentiality_type, char > combinedConfidentiality_traits;

      /**
       * @brief Return a read-only (constant) reference to the element.
       *
       * @return A constant reference to the element.
       */
      const combinedConfidentiality_type&
      combinedConfidentiality () const;

      /**
       * @brief Return a read-write reference to the element.
       *
       * @return A reference to the element.
       */
      combinedConfidentiality_type&
      combinedConfidentiality ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      combinedConfidentiality (const combinedConfidentiality_type& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly
       * instead of making a copy.
       */
      void
      combinedConfidentiality (::std::auto_ptr< combinedConfidentiality_type > p);

      //@}

      /**
       * @name language
       *
       * @brief Accessor and modifier functions for the %language
       * optional element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string language_type;

      /**
       * @brief Element optional container type.
       */
      typedef ::xsd::cxx::tree::optional< language_type > language_optional;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< language_type, char > language_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * container.
       *
       * @return A constant reference to the optional container.
       */
      const language_optional&
      language () const;

      /**
       * @brief Return a read-write reference to the element container.
       *
       * @return A reference to the optional container.
       */
      language_optional&
      language ();

      /**
       * @brief Set the element value.
       *
       * @param x A new value to set.
       *
       * This function makes a copy of its argument and sets it as
       * the new value of the element.
       */
      void
      language (const language_type& x);

      /**
       * @brief Set the element value.
       *
       * @param x An optional container with the new value to set.
       *
       * If the value is present in @a x then this function makes a copy 
       * of this value and sets it as the new value of the element.
       * Otherwise the element container is set the 'not present' state.
       */
      void
      language (const language_optional& x);

      /**
       * @brief Set the element value without copying.
       *
       * @param p A new value to use.
       *
       * This function will try to use the passed value directly instead
       * of making a copy.
       */
      void
      language (::std::auto_ptr< language_type > p);

      //@}

      /**
       * @name senderRole
       *
       * @brief Accessor and modifier functions for the %senderRole
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::valueListType senderRole_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< senderRole_type > senderRole_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef senderRole_sequence::iterator senderRole_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef senderRole_sequence::const_iterator senderRole_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< senderRole_type, char > senderRole_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const senderRole_sequence&
      senderRole () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      senderRole_sequence&
      senderRole ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      senderRole (const senderRole_sequence& s);

      //@}

      /**
       * @name recipientRole
       *
       * @brief Accessor and modifier functions for the %recipientRole
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::valueListType recipientRole_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< recipientRole_type > recipientRole_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef recipientRole_sequence::iterator recipientRole_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef recipientRole_sequence::const_iterator recipientRole_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< recipientRole_type, char > recipientRole_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const recipientRole_sequence&
      recipientRole () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      recipientRole_sequence&
      recipientRole ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      recipientRole (const recipientRole_sequence& s);

      //@}

      /**
       * @name keyword
       *
       * @brief Accessor and modifier functions for the %keyword
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::valueListType keyword_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< keyword_type > keyword_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef keyword_sequence::iterator keyword_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef keyword_sequence::const_iterator keyword_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< keyword_type, char > keyword_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const keyword_sequence&
      keyword () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      keyword_sequence&
      keyword ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      keyword (const keyword_sequence& s);

      //@}

      /**
       * @name distributionReference
       *
       * @brief Accessor and modifier functions for the %distributionReference
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::xml_schema::string distributionReference_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< distributionReference_type > distributionReference_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef distributionReference_sequence::iterator distributionReference_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef distributionReference_sequence::const_iterator distributionReference_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< distributionReference_type, char > distributionReference_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const distributionReference_sequence&
      distributionReference () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      distributionReference_sequence&
      distributionReference ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      distributionReference (const distributionReference_sequence& s);

      //@}

      /**
       * @name explicitAddress
       *
       * @brief Accessor and modifier functions for the %explicitAddress
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::valueSchemeType explicitAddress_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< explicitAddress_type > explicitAddress_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef explicitAddress_sequence::iterator explicitAddress_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef explicitAddress_sequence::const_iterator explicitAddress_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< explicitAddress_type, char > explicitAddress_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const explicitAddress_sequence&
      explicitAddress () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      explicitAddress_sequence&
      explicitAddress ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      explicitAddress (const explicitAddress_sequence& s);

      //@}

      /**
       * @name targetArea
       *
       * @brief Accessor and modifier functions for the %targetArea
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::targetAreaType targetArea_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< targetArea_type > targetArea_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef targetArea_sequence::iterator targetArea_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef targetArea_sequence::const_iterator targetArea_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< targetArea_type, char > targetArea_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const targetArea_sequence&
      targetArea () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      targetArea_sequence&
      targetArea ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      targetArea (const targetArea_sequence& s);

      //@}

      /**
       * @name contentObject
       *
       * @brief Accessor and modifier functions for the %contentObject
       * sequence element.
       */
      //@{

      /**
       * @brief Element type.
       */
      typedef ::edxl::de::contentObjectType contentObject_type;

      /**
       * @brief Element sequence container type.
       */
      typedef ::xsd::cxx::tree::sequence< contentObject_type > contentObject_sequence;

      /**
       * @brief Element iterator type.
       */
      typedef contentObject_sequence::iterator contentObject_iterator;

      /**
       * @brief Element constant iterator type.
       */
      typedef contentObject_sequence::const_iterator contentObject_const_iterator;

      /**
       * @brief Element traits type.
       */
      typedef ::xsd::cxx::tree::traits< contentObject_type, char > contentObject_traits;

      /**
       * @brief Return a read-only (constant) reference to the element
       * sequence.
       *
       * @return A constant reference to the sequence container.
       */
      const contentObject_sequence&
      contentObject () const;

      /**
       * @brief Return a read-write reference to the element sequence.
       *
       * @return A reference to the sequence container.
       */
      contentObject_sequence&
      contentObject ();

      /**
       * @brief Copy elements from a given sequence.
       *
       * @param s A sequence to copy elements from.
       *
       * For each element in @a s this function makes a copy and adds it 
       * to the sequence. Note that this operation completely changes the 
       * sequence and all old elements will be lost.
       */
      void
      contentObject (const contentObject_sequence& s);

      //@}

      /**
       * @name Constructors
       */
      //@{

      /**
       * @brief Create an instance from the ultimate base and
       * initializers for required elements and attributes.
       */
      EDXLDistribution (const distributionID_type&,
                        const senderID_type&,
                        const dateTimeSent_type&,
                        const distributionStatus_type&,
                        const distributionType_type&,
                        const combinedConfidentiality_type&);

      /**
       * @brief Create an instance from a DOM element.
       *
       * @param e A DOM element to extract the data from.
       * @param f Flags to create the new instance with.
       * @param c A pointer to the object that will contain the new
       * instance.
       */
      EDXLDistribution (const ::xercesc::DOMElement& e,
                        ::xml_schema::flags f = 0,
                        ::xml_schema::container* c = 0);

      /**
       * @brief Copy constructor.
       *
       * @param x An instance to make a copy of.
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       *
       * For polymorphic object models use the @c _clone function instead.
       */
      EDXLDistribution (const EDXLDistribution& x,
                        ::xml_schema::flags f = 0,
                        ::xml_schema::container* c = 0);

      /**
       * @brief Copy the instance polymorphically.
       *
       * @param f Flags to create the copy with.
       * @param c A pointer to the object that will contain the copy.
       * @return A pointer to the dynamically allocated copy.
       *
       * This function ensures that the dynamic type of the instance is
       * used for copying and should be used for polymorphic object
       * models instead of the copy constructor.
       */
      virtual EDXLDistribution*
      _clone (::xml_schema::flags f = 0,
              ::xml_schema::container* c = 0) const;

      //@}

      /**
       * @brief Destructor.
       */
      virtual 
      ~EDXLDistribution ();

      // Implementation.
      //

      //@cond

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

      protected:
      ::xsd::cxx::tree::one< distributionID_type > distributionID_;
      ::xsd::cxx::tree::one< senderID_type > senderID_;
      ::xsd::cxx::tree::one< dateTimeSent_type > dateTimeSent_;
      ::xsd::cxx::tree::one< distributionStatus_type > distributionStatus_;
      ::xsd::cxx::tree::one< distributionType_type > distributionType_;
      ::xsd::cxx::tree::one< combinedConfidentiality_type > combinedConfidentiality_;
      language_optional language_;
      senderRole_sequence senderRole_;
      recipientRole_sequence recipientRole_;
      keyword_sequence keyword_;
      distributionReference_sequence distributionReference_;
      explicitAddress_sequence explicitAddress_;
      targetArea_sequence targetArea_;
      contentObject_sequence contentObject_;

      //@endcond
    };
  }
}

#include <iosfwd>

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

namespace edxl
{
  namespace de
  {
    /**
     * @name Parsing functions for the %EDXLDistribution document root.
     */
    //@{

    /**
     * @brief Parse a URI or a local file.
     *
     * @param uri A URI or a local file name.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * This function uses exceptions to report parsing errors.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (const ::std::string& uri,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a URI or a local file with an error handler.
     *
     * @param uri A URI or a local file name.
     * @param eh An error handler.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * This function reports parsing errors by calling the error handler.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (const ::std::string& uri,
                       ::xml_schema::error_handler& eh,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a URI or a local file with a Xerces-C++ DOM error
     * handler.
     *
     * @param uri A URI or a local file name.
     * @param eh A Xerces-C++ DOM error handler.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * This function reports parsing errors by calling the error handler.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (const ::std::string& uri,
                       ::xercesc::DOMErrorHandler& eh,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a standard input stream.
     *
     * @param is A standrad input stream.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * This function uses exceptions to report parsing errors.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (::std::istream& is,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a standard input stream with an error handler.
     *
     * @param is A standrad input stream.
     * @param eh An error handler.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * This function reports parsing errors by calling the error handler.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (::std::istream& is,
                       ::xml_schema::error_handler& eh,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a standard input stream with a Xerces-C++ DOM error
     * handler.
     *
     * @param is A standrad input stream.
     * @param eh A Xerces-C++ DOM error handler.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * This function reports parsing errors by calling the error handler.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (::std::istream& is,
                       ::xercesc::DOMErrorHandler& eh,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a standard input stream with a resource id.
     *
     * @param is A standrad input stream.
     * @param id A resource id.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * The resource id is used to identify the document being parsed in
     * diagnostics as well as to resolve relative paths.
     *
     * This function uses exceptions to report parsing errors.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (::std::istream& is,
                       const ::std::string& id,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a standard input stream with a resource id and an
     * error handler.
     *
     * @param is A standrad input stream.
     * @param id A resource id.
     * @param eh An error handler.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * The resource id is used to identify the document being parsed in
     * diagnostics as well as to resolve relative paths.
     *
     * This function reports parsing errors by calling the error handler.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (::std::istream& is,
                       const ::std::string& id,
                       ::xml_schema::error_handler& eh,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a standard input stream with a resource id and a
     * Xerces-C++ DOM error handler.
     *
     * @param is A standrad input stream.
     * @param id A resource id.
     * @param eh A Xerces-C++ DOM error handler.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * The resource id is used to identify the document being parsed in
     * diagnostics as well as to resolve relative paths.
     *
     * This function reports parsing errors by calling the error handler.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (::std::istream& is,
                       const ::std::string& id,
                       ::xercesc::DOMErrorHandler& eh,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a Xerces-C++ input source.
     *
     * @param is A Xerces-C++ input source.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * This function uses exceptions to report parsing errors.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (::xercesc::InputSource& is,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a Xerces-C++ input source with an error handler.
     *
     * @param is A Xerces-C++ input source.
     * @param eh An error handler.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * This function reports parsing errors by calling the error handler.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (::xercesc::InputSource& is,
                       ::xml_schema::error_handler& eh,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a Xerces-C++ input source with a Xerces-C++ DOM
     * error handler.
     *
     * @param is A Xerces-C++ input source.
     * @param eh A Xerces-C++ DOM error handler.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * This function reports parsing errors by calling the error handler.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (::xercesc::InputSource& is,
                       ::xercesc::DOMErrorHandler& eh,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a Xerces-C++ DOM document.
     *
     * @param d A Xerces-C++ DOM document.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (const ::xercesc::DOMDocument& d,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    /**
     * @brief Parse a Xerces-C++ DOM document.
     *
     * @param d A pointer to the Xerces-C++ DOM document.
     * @param f Parsing flags.
     * @param p Parsing properties. 
     * @return A pointer to the root of the object model.
     *
     * This function is normally used together with the keep_dom and
     * own_dom parsing flags to assign ownership of the DOM document
     * to the object model.
     */
    ::std::auto_ptr< ::edxl::de::EDXLDistribution >
    EDXLDistribution_ (::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >& d,
                       ::xml_schema::flags f = 0,
                       const ::xml_schema::properties& p = ::xml_schema::properties ());

    //@}
  }
}

#include <iosfwd>

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

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

namespace edxl
{
  namespace de
  {
    /**
     * @name Serialization functions for the %EDXLDistribution document root.
     */
    //@{

    /**
     * @brief Serialize to a standard output stream.
     *
     * @param os A standrad output stream.
     * @param x An object model to serialize.
     * @param m A namespace information map.
     * @param e A character encoding to produce XML in.
     * @param f Serialization flags.
     *
     * This function uses exceptions to report serialization errors.
     */
    void
    EDXLDistribution_ (::std::ostream& os,
                       const ::edxl::de::EDXLDistribution& x, 
                       const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
                       const ::std::string& e = "UTF-8",
                       ::xml_schema::flags f = 0);

    /**
     * @brief Serialize to a standard output stream with an error handler.
     *
     * @param os A standrad output stream.
     * @param x An object model to serialize.
     * @param eh An error handler.
     * @param m A namespace information map.
     * @param e A character encoding to produce XML in.
     * @param f Serialization flags.
     *
     * This function reports serialization errors by calling the error
     * handler.
     */
    void
    EDXLDistribution_ (::std::ostream& os,
                       const ::edxl::de::EDXLDistribution& x, 
                       ::xml_schema::error_handler& eh,
                       const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
                       const ::std::string& e = "UTF-8",
                       ::xml_schema::flags f = 0);

    /**
     * @brief Serialize to a standard output stream with a Xerces-C++ DOM
     * error handler.
     *
     * @param os A standrad output stream.
     * @param x An object model to serialize.
     * @param eh A Xerces-C++ DOM error handler.
     * @param m A namespace information map.
     * @param e A character encoding to produce XML in.
     * @param f Serialization flags.
     *
     * This function reports serialization errors by calling the error
     * handler.
     */
    void
    EDXLDistribution_ (::std::ostream& os,
                       const ::edxl::de::EDXLDistribution& x, 
                       ::xercesc::DOMErrorHandler& eh,
                       const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
                       const ::std::string& e = "UTF-8",
                       ::xml_schema::flags f = 0);

    /**
     * @brief Serialize to a Xerces-C++ XML format target.
     *
     * @param ft A Xerces-C++ XML format target.
     * @param x An object model to serialize.
     * @param m A namespace information map.
     * @param e A character encoding to produce XML in.
     * @param f Serialization flags.
     *
     * This function uses exceptions to report serialization errors.
     */
    void
    EDXLDistribution_ (::xercesc::XMLFormatTarget& ft,
                       const ::edxl::de::EDXLDistribution& x, 
                       const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
                       const ::std::string& e = "UTF-8",
                       ::xml_schema::flags f = 0);

    /**
     * @brief Serialize to a Xerces-C++ XML format target with an error
     * handler.
     *
     * @param ft A Xerces-C++ XML format target.
     * @param x An object model to serialize.
     * @param eh An error handler.
     * @param m A namespace information map.
     * @param e A character encoding to produce XML in.
     * @param f Serialization flags.
     *
     * This function reports serialization errors by calling the error
     * handler.
     */
    void
    EDXLDistribution_ (::xercesc::XMLFormatTarget& ft,
                       const ::edxl::de::EDXLDistribution& x, 
                       ::xml_schema::error_handler& eh,
                       const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
                       const ::std::string& e = "UTF-8",
                       ::xml_schema::flags f = 0);

    /**
     * @brief Serialize to a Xerces-C++ XML format target with a
     * Xerces-C++ DOM error handler.
     *
     * @param ft A Xerces-C++ XML format target.
     * @param x An object model to serialize.
     * @param eh A Xerces-C++ DOM error handler.
     * @param m A namespace information map.
     * @param e A character encoding to produce XML in.
     * @param f Serialization flags.
     *
     * This function reports serialization errors by calling the error
     * handler.
     */
    void
    EDXLDistribution_ (::xercesc::XMLFormatTarget& ft,
                       const ::edxl::de::EDXLDistribution& x, 
                       ::xercesc::DOMErrorHandler& eh,
                       const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
                       const ::std::string& e = "UTF-8",
                       ::xml_schema::flags f = 0);

    /**
     * @brief Serialize to an existing Xerces-C++ DOM document.
     *
     * @param d A Xerces-C++ DOM document.
     * @param x An object model to serialize.
     * @param f Serialization flags.
     *
     * Note that it is your responsibility to create the DOM document
     * with the correct root element as well as set the necessary
     * namespace mapping attributes.
     */
    void
    EDXLDistribution_ (::xercesc::DOMDocument& d,
                       const ::edxl::de::EDXLDistribution& x,
                       ::xml_schema::flags f = 0);

    /**
     * @brief Serialize to a new Xerces-C++ DOM document.
     *
     * @param x An object model to serialize.
     * @param m A namespace information map.
     * @param f Serialization flags.
     * @return A pointer to the new Xerces-C++ DOM document.
     */
    ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >
    EDXLDistribution_ (const ::edxl::de::EDXLDistribution& x, 
                       const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
                       ::xml_schema::flags f = 0);

    //@}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#include <xsd/cxx/post.hxx>

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

#endif // EDXL_DE_HXX
-------------- next part --------------


#include "tmp/EDXL-DE.hxx"


#include <xercesc/dom/DOM.hpp>
#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMDocumentType.hpp>
#include <xercesc/dom/DOMElement.hpp>
#include <xercesc/dom/DOMImplementation.hpp>
#include <xercesc/dom/DOMImplementationLS.hpp>
#include <xercesc/dom/DOMNodeIterator.hpp>
#include <xercesc/dom/DOMNodeList.hpp>
#include <xercesc/dom/DOMText.hpp>

#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/util/XMLUni.hpp>
#include <xercesc/framework/StdOutFormatTarget.hpp>

#include <string>

using namespace xercesc;
using namespace edxl::de;

int main (int argc, char ** argv )
{
  xercesc::XMLPlatformUtils::Initialize();

  xercesc::XercesDOMParser parser;
  parser.parse( "edxl_test.xml");

  xercesc::DOMDocument* doc = parser.getDocument();
  xercesc::DOMElement* e = doc->getDocumentElement();
  EDXLDistribution de1( *e );

  EDXLDistribution::distributionID_type dId = "10";
  EDXLDistribution::senderID_type sId = "11";
  EDXLDistribution::dateTimeSent_type date ( 2009, 1, 2, 3, 4, 5);
  EDXLDistribution::distributionStatus_type ds = statusValues::Exercise;
  EDXLDistribution::distributionType_type dt = typeValues::Report;
  EDXLDistribution::combinedConfidentiality_type cct = "1";

  EDXLDistribution de2( dId, sId, date, ds ,dt, cct );


  XMLCh tempStr[100];

  XMLString::transcode("Range", tempStr, 99);
  DOMImplementation* impl = DOMImplementationRegistry::getDOMImplementation(tempStr);

  //xercesc::DOMDocument* doc = impl->createDocument();
 // xercesc::DOMElement* e = doc->getDocumentElement();

  *e << de2;



  DOMLSSerializer* theSerializer = ((DOMImplementationLS*)impl)->createLSSerializer();

  DOMLSOutput* theOutput = ((DOMImplementationLS*)impl)->createLSOutput();

  StdOutFormatTarget* myFormTarget = new StdOutFormatTarget();
  theOutput->setByteStream(myFormTarget);

  theSerializer->write( e, theOutput );


  return 0;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: edxl_test.xml
Type: text/xml
Size: 2052 bytes
Desc: edxl_test.xml
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20100617/c5998748/edxl_test-0001.bin


More information about the xsd-users mailing list