"updated" [xsde-users] error "unable to open in read mode"

Rashi Jha rashij at cybage.com
Wed Aug 17 10:15:48 EDT 2011


Hi Boris,



I am now using cxx-parser for generating the classes. I am trying to parse the sample xml:



<?xml version="1.0"?>

<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xsi:noNamespaceSchemaLocation="SampleXsd.xsd">

<title>Good Health Clinic Continuity of Care Document</title>

</ClinicalDocument>



I used the following command to generate the classes:

# xsde cxx-parser --generate-polymorphic --hxx-suffix .h --cxx-suffix .cpp  SampleXsd.xsd

And in the corresponding driver code I created the structures for the complex types which inherit the parser skeleton files.



In main I tried calling title() function and post_ST(), but none of them could read the contents of <title>



I am not able to figure out  which method I need to overload in order to access the contents of <title> element.



Please find the generated classes , sample XSD and driver code for the sample problem.





Query regarding Android platform:



I wanted to know that other than building a separate library for android, will the driver code that i will write for the classes generated for iOS applications would

work the  same in android or  do I need to write a separate driver code for android applications?

Looking forward to your reply.

Rashi



-----Original Message-----

From: Boris Kolpackov [mailto:boris at codesynthesis.com]

Sent: Monday, August 08, 2011 5:42 PM

To: Rashi Jha

Cc: Amit Jain; Amit Bhatnagar; Sagar Vairagar

Subject: Re: [xsde-users] error "unable to open in read mode"



Rashi Jha <rashij at cybage.com> writes:



> In .xsd title element is of ST complex type or non-built-in XML type.



The ST type has mixed content which means it can contain anything. To access the data stored in this type you will need to customize the generated object model class corresponding to this type (e.g., by adding a string member that will store the data) and provide a custom parser for it. The 'wildcard' and 'custom/wildcard' examples in the examples/cxx/hybrid directory in XSD/e show two approaches that can be used to achieve this.



Boris




"Legal Disclaimer: This electronic message and all contents contain information from Cybage Software Private Limited which may be privileged, confidential, or otherwise protected from disclosure. The information is intended to be for the addressee(s) only. If you are not an addressee, any disclosure, copy, distribution, or use of the contents of this message is strictly prohibited. If you have received this electronic message in error please notify the sender by reply e-mail to and destroy the original message and all copies. Cybage has taken every reasonable precaution to minimize the risk of malicious content in the mail, but is not liable for any damage you may sustain as a result of any malicious content in this e-mail. You should carry out your own malicious content checks before opening the e-mail or attachment." 
www.cybage.com

-------------- next part --------------
struct ClinicalDocument_pimpl: POCD_MT000040_ClinicalDocument_pskel
{
	ClinicalDocument_pimpl ()
	: POCD_MT000040_ClinicalDocument_pskel (&base_impl_, 0)
	{
	}
	
	virtual void title()
	{
		
	}
		
private:
	POCD_MT000040_ClinicalDocument_pskel base_impl_;	
};


struct ST_pimpl: ST_pskel
{
	ST_pimpl ()
	: ST_pskel (&base_impl_, 0)
	{
	}
private:
	ST_pskel base_impl_;
	
};


int
main (int argc, char* argv[])
{
  const char* input;

 
  try
  {
    xml_schema::string_pimpl string_p;
	  ClinicalDocument_pimpl cl_p;
	  
	  ST_pimpl st_p;
	  xml_schema::document_pimpl doc_p(cl_p,"ClinicalDocument");
	  
	  cl_p.pre ();
	  argc = 2;
	  string test = "/Users/rashij/Rashi_CxxParser/OnlyST/STOnly/samplexml.xml";
    if (argc < 2)
      doc_p.parse (cin);
    else
      doc_p.parse (test);
	  POCD_MT000040_ClinicalDocument_pskel p_skel;
	  
	  //cl_p.title();
	  st_p.post_ST();
	  
  }
  catch (const xml_schema::parser_exception& e)
  {
    cerr << input << ":" << e.line () << ":" << e.column () << ": "
         << e.text () << endl;
    return 1;
  }
  catch (const std::ios_base::failure&)
  {
    cerr << input << ": unable to open or read failure" << endl;
    return 1;
  }

  return 0;
}

-------------- next part --------------
// Copyright (c) 2005-2011 Code Synthesis Tools CC
//
// This program was generated by CodeSynthesis XSD/e, an XML Schema
// to C++ data binding compiler for embedded systems.
//
// 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
//
//

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

#include "SampleXsd-pskel.h"

// ST_pskel
//

ST_pskel::
ST_pskel ()
: ST_impl_ (0)
{
}

ST_pskel::
ST_pskel (ST_pskel* impl, void*)
: ::xsde::cxx::parser::validating::complex_content (impl, 0),
  ST_impl_ (impl)
{
}

// POCD_MT000040_ClinicalDocument_pskel
//

void POCD_MT000040_ClinicalDocument_pskel::
title_parser (::ST_pskel& p)
{
  this->title_parser_ = &p;
}

void POCD_MT000040_ClinicalDocument_pskel::
title_parser (::xml_schema::parser_map& m)
{
  this->title_parser_map_ = &m;
}

void POCD_MT000040_ClinicalDocument_pskel::
parsers (::ST_pskel& title)
{
  this->title_parser_ = &title;
}

void POCD_MT000040_ClinicalDocument_pskel::
parser_maps (::xml_schema::parser_map& title)
{
  this->title_parser_map_ = &title;
}

POCD_MT000040_ClinicalDocument_pskel::
POCD_MT000040_ClinicalDocument_pskel ()
: POCD_MT000040_ClinicalDocument_impl_ (0),
  title_parser_ (0),
  title_parser_map_ (0),
  v_state_stack_ (sizeof (v_state_), &v_state_first_)
{
}

POCD_MT000040_ClinicalDocument_pskel::
POCD_MT000040_ClinicalDocument_pskel (POCD_MT000040_ClinicalDocument_pskel* impl, void*)
: ::xsde::cxx::parser::validating::complex_content (impl, 0),
  POCD_MT000040_ClinicalDocument_impl_ (impl),
  title_parser_ (0),
  title_parser_map_ (0),
  v_state_stack_ (sizeof (v_state_), &v_state_first_)
{
}

#include <assert.h>

#include <string.h>
#include <xsde/cxx/parser/substitution-map.hxx>
#include <xsde/cxx/parser/validating/inheritance-map.hxx>

static
const ::xsde::cxx::parser::substitution_map_init
_xsde_substitution_map_init_;

static
const ::xsde::cxx::parser::validating::inheritance_map_init
_xsde_inheritance_map_init_;

// ST_pskel
//

void ST_pskel::
post_ST ()
{
  if (this->ST_impl_)
    this->ST_impl_->post_ST ();
}

const char* ST_pskel::
_static_type ()
{
  return "ST";
}

const char* ST_pskel::
_dynamic_type () const
{
  return _static_type ();
}

// POCD_MT000040_ClinicalDocument_pskel
//

void POCD_MT000040_ClinicalDocument_pskel::
title ()
{
  if (this->POCD_MT000040_ClinicalDocument_impl_)
    this->POCD_MT000040_ClinicalDocument_impl_->title ();
}

void POCD_MT000040_ClinicalDocument_pskel::
post_POCD_MT000040_ClinicalDocument ()
{
  if (this->POCD_MT000040_ClinicalDocument_impl_)
    this->POCD_MT000040_ClinicalDocument_impl_->post_POCD_MT000040_ClinicalDocument ();
}

void POCD_MT000040_ClinicalDocument_pskel::
_reset ()
{
  if (this->resetting_)
    return;

  typedef ::xsde::cxx::parser::validating::complex_content base;
  base::_reset ();

  this->v_state_stack_.clear ();

  this->resetting_ = true;

  if (this->title_parser_)
    this->title_parser_->_reset ();

  if (this->title_parser_map_)
    this->title_parser_map_->reset ();

  this->resetting_ = false;
}

const char* POCD_MT000040_ClinicalDocument_pskel::
_static_type ()
{
  return "POCD_MT000040.ClinicalDocument";
}

const char* POCD_MT000040_ClinicalDocument_pskel::
_dynamic_type () const
{
  return _static_type ();
}

#include <assert.h>

// Element validation and dispatch functions for POCD_MT000040_ClinicalDocument_pskel.
//
bool POCD_MT000040_ClinicalDocument_pskel::
_start_element_impl (const ::xsde::cxx::ro_string& ns,
                     const ::xsde::cxx::ro_string& n,
                     const char* t)
{
  XSDE_UNUSED (t);

  ::xsde::cxx::parser::context& ctx = this->_context ();

  v_state_& vs = *static_cast< v_state_* > (this->v_state_stack_.top ());
  v_state_descr_* vd = vs.data + (vs.size - 1);

  if (vd->func == 0 && vd->state == 0)
  {
    typedef ::xsde::cxx::parser::validating::complex_content base;
    if (base::_start_element_impl (ns, n, t))
      return true;
    else
      vd->state = 1;
  }

  while (vd->func != 0)
  {
    (this->*vd->func) (vd->state, vd->count, ns, n, t, true);

    vd = vs.data + (vs.size - 1);

    if (vd->state == ~0UL && !ctx.error_type ())
      vd = vs.data + (--vs.size - 1);
    else
      break;
  }

  if (vd->func == 0)
  {
    if (vd->state != ~0UL)
    {
      unsigned long s = ~0UL;

      if (n == "title" && ns.empty ())
        s = 0UL;

      if (s != ~0UL)
      {
        vd->count++;
        vd->state = ~0UL;

        vd = vs.data + vs.size++;
        vd->func = &POCD_MT000040_ClinicalDocument_pskel::sequence_0;
        vd->state = s;
        vd->count = 0;

        this->sequence_0 (vd->state, vd->count, ns, n, t, true);
      }
      else
      {
        return false;
      }
    }
    else
      return false;
  }

  return true;
}

bool POCD_MT000040_ClinicalDocument_pskel::
_end_element_impl (const ::xsde::cxx::ro_string& ns,
                   const ::xsde::cxx::ro_string& n)
{
  v_state_& vs = *static_cast< v_state_* > (this->v_state_stack_.top ());
  v_state_descr_& vd = vs.data[vs.size - 1];

  if (vd.func == 0 && vd.state == 0)
  {
    typedef ::xsde::cxx::parser::validating::complex_content base;
    if (!base::_end_element_impl (ns, n))
      assert (false);
    return true;
  }

  assert (vd.func != 0);
  (this->*vd.func) (vd.state, vd.count, ns, n, 0, false);

  if (vd.state == ~0UL)
    vs.size--;

  return true;
}

void POCD_MT000040_ClinicalDocument_pskel::
_pre_e_validate ()
{
  this->v_state_stack_.push ();
  static_cast< v_state_* > (this->v_state_stack_.top ())->size = 0;

  v_state_& vs = *static_cast< v_state_* > (this->v_state_stack_.top ());
  v_state_descr_& vd = vs.data[vs.size++];

  vd.func = 0;
  vd.state = 0;
  vd.count = 0;
}

void POCD_MT000040_ClinicalDocument_pskel::
_post_e_validate ()
{
  ::xsde::cxx::parser::context& ctx = this->_context ();

  v_state_& vs = *static_cast< v_state_* > (this->v_state_stack_.top ());
  v_state_descr_* vd = vs.data + (vs.size - 1);

  ::xsde::cxx::ro_string empty;
  while (vd->func != 0)
  {
    (this->*vd->func) (vd->state, vd->count, empty, empty, 0, true);

    if (ctx.error_type ())
      return;

    assert (vd->state == ~0UL);
    vd = vs.data + (--vs.size - 1);
  }


  this->v_state_stack_.pop ();
}

void POCD_MT000040_ClinicalDocument_pskel::
sequence_0 (unsigned long& state,
            unsigned long& count,
            const ::xsde::cxx::ro_string& ns,
            const ::xsde::cxx::ro_string& n,
            const char* t,
            bool start)
{
  ::xsde::cxx::parser::context& ctx = this->_context ();

  XSDE_UNUSED (t);
  XSDE_UNUSED (ctx);

  switch (state)
  {
    case 0UL:
    {
      if (n == "title" && ns.empty ())
      {
        if (start)
        {
          ::ST_pskel* p = 0;

          if (t == 0 && this->title_parser_ != 0)
            p = this->title_parser_;
          else
          {
            const char* ts = ::ST_pskel::_static_type ();

            if (t == 0)
              t = ts;

            if (this->title_parser_ != 0 && strcmp (t, ts) == 0)
              p = this->title_parser_;
            else
            {
              if (t != ts &&
                  !::xsde::cxx::parser::validating::inheritance_map_instance ().check (t, ts))
              {
                ctx.schema_error (::xsde::cxx::schema_error::not_derived);
                return;
              }

              if (this->title_parser_map_ != 0)
                p = static_cast< ::ST_pskel* > (
                  this->title_parser_map_->find (t));
            }
          }

          if (p)
          {
            p->pre ();
            ctx.nested_parser (p);
          }
        }
        else
        {
          ::ST_pskel* p =
          static_cast< ::ST_pskel* > (ctx.nested_parser ());

          if (p != 0)
          {
            p->post_ST ();
            this->title ();
          }

          count = 0;
          state = ~0UL;
        }

        break;
      }
      else
      {
        assert (start);
        count = 0;
        state = ~0UL;
        // Fall through.
      }
    }
    case ~0UL:
      break;
  }
}

// Character validation functions for ST_pskel.
//
bool ST_pskel::
_characters_impl (const ::xsde::cxx::ro_string& s)
{
  this->_any_characters (s);
  return true;
}

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

-------------- next part --------------
// Copyright (c) 2005-2011 Code Synthesis Tools CC
//
// This program was generated by CodeSynthesis XSD/e, an XML Schema
// to C++ data binding compiler for embedded systems.
//
// 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
//
//

#ifndef SAMPLE_XSD_PSKEL_H
#define SAMPLE_XSD_PSKEL_H

#include <xsde/cxx/version.hxx>

#if (XSDE_INT_VERSION != 3020000L)
#error XSD/e runtime version mismatch
#endif

#include <xsde/cxx/config.hxx>

#ifndef XSDE_ENCODING_UTF8
#error the generated code uses the UTF-8 encodingwhile the XSD/e runtime does not (reconfigure the runtime or change the --char-encoding value)
#endif

#ifndef XSDE_STL
#error the generated code uses STL while the XSD/e runtime does not (reconfigure the runtime or add --no-stl)
#endif

#ifndef XSDE_IOSTREAM
#error the generated code uses iostream while the XSD/e runtime does not (reconfigure the runtime or add --no-iostream)
#endif

#ifndef XSDE_EXCEPTIONS
#error the generated code uses exceptions while the XSD/e runtime does not (reconfigure the runtime or add --no-exceptions)
#endif

#ifndef XSDE_LONGLONG
#error the generated code uses long long while the XSD/e runtime does not (reconfigure the runtime or add --no-long-long)
#endif

#ifndef XSDE_PARSER_VALIDATION
#error the generated code uses validation while the XSD/e runtime does not (reconfigure the runtime or add --suppress-validation)
#endif

#ifndef XSDE_POLYMORPHIC
#error the generated code expects XSD/e runtime with polymorphism support (reconfigure the runtime or remove --generate-polymorphic/--runtime-polymorphic)
#endif

#ifndef XSDE_REUSE_STYLE_TIEIN
#error the generated code uses the tiein reuse style while the XSD/e runtime does not (reconfigure the runtime or add --reuse-style-mixin or --reuse-style-none)
#endif

#ifdef XSDE_CUSTOM_ALLOCATOR
#error the XSD/e runtime uses custom allocator while the generated code does not (reconfigure the runtime or add --custom-allocator)
#endif

#include <xsde/cxx/pre.hxx>

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

// Forward declarations
//
class ST_pskel;
class POCD_MT000040_ClinicalDocument_pskel;

#include <xsde/cxx/ro-string.hxx>

#include <xsde/cxx/parser/xml-schema.hxx>

#include <xsde/cxx/parser/exceptions.hxx>

#include <xsde/cxx/parser/map.hxx>
#include <xsde/cxx/parser/substitution-map-callback.hxx>
#include <xsde/cxx/parser/substitution-map-load.hxx>
#include <xsde/cxx/parser/validating/inheritance-map-load.hxx>

#include <xsde/cxx/stack.hxx>
#include <xsde/cxx/parser/validating/parser.hxx>
#include <xsde/cxx/parser/validating/xml-schema-pskel.hxx>
#include <xsde/cxx/parser/validating/xml-schema-pimpl.hxx>

#include <xsde/cxx/parser/expat/document.hxx>

namespace xml_schema
{
  // Built-in XML Schema types mapping.
  //
  using ::xsde::cxx::string_sequence;
  using ::xsde::cxx::qname;
  using ::xsde::cxx::buffer;
  using ::xsde::cxx::time_zone;
  using ::xsde::cxx::gday;
  using ::xsde::cxx::gmonth;
  using ::xsde::cxx::gyear;
  using ::xsde::cxx::gmonth_day;
  using ::xsde::cxx::gyear_month;
  using ::xsde::cxx::date;
  using ::xsde::cxx::time;
  using ::xsde::cxx::date_time;
  using ::xsde::cxx::duration;

  // Base parser skeletons.
  //
  using ::xsde::cxx::parser::parser_base;
  typedef ::xsde::cxx::parser::validating::empty_content parser_empty_content;
  typedef ::xsde::cxx::parser::validating::simple_content parser_simple_content;
  typedef ::xsde::cxx::parser::validating::complex_content parser_complex_content;
  typedef ::xsde::cxx::parser::validating::list_base parser_list_base;

  // Parser map interface and default implementation.
  //
  using ::xsde::cxx::parser::parser_map;
  using ::xsde::cxx::parser::parser_map_impl;

  // Parser substitution map callack.
  //
  using ::xsde::cxx::parser::parser_smap_callback;

  // Substitution and inheritance hashmaps load querying.
  //
  using ::xsde::cxx::parser::parser_smap_buckets;
  using ::xsde::cxx::parser::parser_smap_elements;
  using ::xsde::cxx::parser::validating::parser_imap_buckets;
  using ::xsde::cxx::parser::validating::parser_imap_elements;

  // Parser skeletons and implementations for the XML Schema
  // built-in types.
  //
  using ::xsde::cxx::parser::validating::any_type_pskel;
  using ::xsde::cxx::parser::validating::any_type_pimpl;

  using ::xsde::cxx::parser::validating::any_simple_type_pskel;
  using ::xsde::cxx::parser::validating::any_simple_type_pimpl;

  using ::xsde::cxx::parser::validating::byte_pskel;
  using ::xsde::cxx::parser::validating::byte_pimpl;

  using ::xsde::cxx::parser::validating::unsigned_byte_pskel;
  using ::xsde::cxx::parser::validating::unsigned_byte_pimpl;

  using ::xsde::cxx::parser::validating::short_pskel;
  using ::xsde::cxx::parser::validating::short_pimpl;

  using ::xsde::cxx::parser::validating::unsigned_short_pskel;
  using ::xsde::cxx::parser::validating::unsigned_short_pimpl;

  using ::xsde::cxx::parser::validating::int_pskel;
  using ::xsde::cxx::parser::validating::int_pimpl;

  using ::xsde::cxx::parser::validating::unsigned_int_pskel;
  using ::xsde::cxx::parser::validating::unsigned_int_pimpl;

  using ::xsde::cxx::parser::validating::long_pskel;
  using ::xsde::cxx::parser::validating::long_pimpl;

  using ::xsde::cxx::parser::validating::unsigned_long_pskel;
  using ::xsde::cxx::parser::validating::unsigned_long_pimpl;

  using ::xsde::cxx::parser::validating::integer_pskel;
  using ::xsde::cxx::parser::validating::integer_pimpl;

  using ::xsde::cxx::parser::validating::non_positive_integer_pskel;
  using ::xsde::cxx::parser::validating::non_positive_integer_pimpl;

  using ::xsde::cxx::parser::validating::non_negative_integer_pskel;
  using ::xsde::cxx::parser::validating::non_negative_integer_pimpl;

  using ::xsde::cxx::parser::validating::positive_integer_pskel;
  using ::xsde::cxx::parser::validating::positive_integer_pimpl;

  using ::xsde::cxx::parser::validating::negative_integer_pskel;
  using ::xsde::cxx::parser::validating::negative_integer_pimpl;

  using ::xsde::cxx::parser::validating::boolean_pskel;
  using ::xsde::cxx::parser::validating::boolean_pimpl;

  using ::xsde::cxx::parser::validating::float_pskel;
  using ::xsde::cxx::parser::validating::float_pimpl;

  using ::xsde::cxx::parser::validating::double_pskel;
  using ::xsde::cxx::parser::validating::double_pimpl;

  using ::xsde::cxx::parser::validating::decimal_pskel;
  using ::xsde::cxx::parser::validating::decimal_pimpl;

  using ::xsde::cxx::parser::validating::string_pskel;
  using ::xsde::cxx::parser::validating::string_pimpl;

  using ::xsde::cxx::parser::validating::normalized_string_pskel;
  using ::xsde::cxx::parser::validating::normalized_string_pimpl;

  using ::xsde::cxx::parser::validating::token_pskel;
  using ::xsde::cxx::parser::validating::token_pimpl;

  using ::xsde::cxx::parser::validating::name_pskel;
  using ::xsde::cxx::parser::validating::name_pimpl;

  using ::xsde::cxx::parser::validating::nmtoken_pskel;
  using ::xsde::cxx::parser::validating::nmtoken_pimpl;

  using ::xsde::cxx::parser::validating::nmtokens_pskel;
  using ::xsde::cxx::parser::validating::nmtokens_pimpl;

  using ::xsde::cxx::parser::validating::ncname_pskel;
  using ::xsde::cxx::parser::validating::ncname_pimpl;

  using ::xsde::cxx::parser::validating::language_pskel;
  using ::xsde::cxx::parser::validating::language_pimpl;

  using ::xsde::cxx::parser::validating::id_pskel;
  using ::xsde::cxx::parser::validating::id_pimpl;

  using ::xsde::cxx::parser::validating::idref_pskel;
  using ::xsde::cxx::parser::validating::idref_pimpl;

  using ::xsde::cxx::parser::validating::idrefs_pskel;
  using ::xsde::cxx::parser::validating::idrefs_pimpl;

  using ::xsde::cxx::parser::validating::uri_pskel;
  using ::xsde::cxx::parser::validating::uri_pimpl;

  using ::xsde::cxx::parser::validating::qname_pskel;
  using ::xsde::cxx::parser::validating::qname_pimpl;

  using ::xsde::cxx::parser::validating::base64_binary_pskel;
  using ::xsde::cxx::parser::validating::base64_binary_pimpl;

  using ::xsde::cxx::parser::validating::hex_binary_pskel;
  using ::xsde::cxx::parser::validating::hex_binary_pimpl;

  using ::xsde::cxx::parser::validating::date_pskel;
  using ::xsde::cxx::parser::validating::date_pimpl;

  using ::xsde::cxx::parser::validating::date_time_pskel;
  using ::xsde::cxx::parser::validating::date_time_pimpl;

  using ::xsde::cxx::parser::validating::duration_pskel;
  using ::xsde::cxx::parser::validating::duration_pimpl;

  using ::xsde::cxx::parser::validating::gday_pskel;
  using ::xsde::cxx::parser::validating::gday_pimpl;

  using ::xsde::cxx::parser::validating::gmonth_pskel;
  using ::xsde::cxx::parser::validating::gmonth_pimpl;

  using ::xsde::cxx::parser::validating::gmonth_day_pskel;
  using ::xsde::cxx::parser::validating::gmonth_day_pimpl;

  using ::xsde::cxx::parser::validating::gyear_pskel;
  using ::xsde::cxx::parser::validating::gyear_pimpl;

  using ::xsde::cxx::parser::validating::gyear_month_pskel;
  using ::xsde::cxx::parser::validating::gyear_month_pimpl;

  using ::xsde::cxx::parser::validating::time_pskel;
  using ::xsde::cxx::parser::validating::time_pimpl;

  // Read-only string.
  //
  using ::xsde::cxx::ro_string;

  // Error codes.
  //
  typedef xsde::cxx::parser::expat::xml_error parser_xml_error;
  typedef xsde::cxx::schema_error parser_schema_error;

  // Exceptions.
  //
  typedef xsde::cxx::parser::exception parser_exception;
  typedef xsde::cxx::parser::xml parser_xml;
  typedef xsde::cxx::parser::schema parser_schema;

  // Document parser.
  //
  using xsde::cxx::parser::expat::document_pimpl;

  // Parser context.
  //
  typedef xsde::cxx::parser::context parser_context;
}

class ST_pskel: public ::xsde::cxx::parser::validating::complex_content
{
  public:
  // Parser callbacks. Override them in your implementation.
  //
  // virtual void
  // pre ();

  virtual void
  post_ST ();

  // Constructor.
  //
  ST_pskel ();

  public:
  static const char*
  _static_type ();

  virtual const char*
  _dynamic_type () const;

  // Implementation details.
  //
  protected:
  ST_pskel* ST_impl_;
  ST_pskel (ST_pskel*, void*);

  protected:
  virtual bool
  _characters_impl (const ::xsde::cxx::ro_string&);
};

class POCD_MT000040_ClinicalDocument_pskel: public ::xsde::cxx::parser::validating::complex_content
{
  public:
  // Parser callbacks. Override them in your implementation.
  //
  // virtual void
  // pre ();

  // Elements.
  //
  virtual void
  title ();

  virtual void
  post_POCD_MT000040_ClinicalDocument ();

  // Parser construction API.
  //
  void
  parsers (::ST_pskel& /* title */);

  void
  parser_maps (::xml_schema::parser_map& /* title */);

  // Individual element parsers.
  //
  void
  title_parser (::ST_pskel&);

  void
  title_parser (::xml_schema::parser_map&);

  virtual void
  _reset ();

  // Constructor.
  //
  POCD_MT000040_ClinicalDocument_pskel ();

  public:
  static const char*
  _static_type ();

  virtual const char*
  _dynamic_type () const;

  // Implementation details.
  //
  protected:
  POCD_MT000040_ClinicalDocument_pskel* POCD_MT000040_ClinicalDocument_impl_;
  POCD_MT000040_ClinicalDocument_pskel (POCD_MT000040_ClinicalDocument_pskel*, void*);

  protected:
  virtual bool
  _start_element_impl (const ::xsde::cxx::ro_string&,
                       const ::xsde::cxx::ro_string&,
                       const char*);

  virtual bool
  _end_element_impl (const ::xsde::cxx::ro_string&,
                     const ::xsde::cxx::ro_string&);

  protected:
  ::ST_pskel* title_parser_;
  ::xml_schema::parser_map* title_parser_map_;


  public:
  struct v_state_descr_
  {
    void (::POCD_MT000040_ClinicalDocument_pskel::*func) (
      unsigned long&,
      unsigned long&,
      const ::xsde::cxx::ro_string&,
      const ::xsde::cxx::ro_string&,
      const char*,
      bool);
    unsigned long state;
    unsigned long count;
  };

  struct v_state_
  {
    v_state_descr_ data[2UL];
    unsigned long size;
  };

  protected:
  v_state_ v_state_first_;
  ::xsde::cxx::stack v_state_stack_;

  virtual void
  _pre_e_validate ();

  virtual void
  _post_e_validate ();

  void
  sequence_0 (unsigned long&,
              unsigned long&,
              const ::xsde::cxx::ro_string&,
              const ::xsde::cxx::ro_string&,
              const char*,
              bool);
};

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

#include <xsde/cxx/post.hxx>

#endif // SAMPLE_XSD_PSKEL_H
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SampleXsd.xsd
Type: text/xml
Size: 404 bytes
Desc: SampleXsd.xsd
Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20110817/77f7527f/SampleXsd.bin


More information about the xsde-users mailing list