[xsde-users] Failing to retrieve embedded xml-fragments

Nebelung, Hartmut Hartmut.Nebelung at baslerweb.com
Thu Nov 12 11:14:04 EST 2015


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

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

      // Constructor.
      //
      ExtensionType_pskel ();

      // Implementation details.
      //
      protected:
      ExtensionType_pskel* ExtensionType_impl_;
      ExtensionType_pskel (ExtensionType_pskel*, void*);

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

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

      public:
      struct v_state_descr_
      {
        void (::GENAPI_NAMESPACE::Version_1_1::ExtensionType_pskel::*func) (
          unsigned long&,
          unsigned long&,
          const ::xsde::cxx::ro_string&,
          const ::xsde::cxx::ro_string&,
          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&,
                  bool);
    };

==============================================================
    class ExtensionType_pimpl: public ExtensionType_pskel
    {
    public:
          std::string content;
          unsigned m_Indent;
    private:
          unsigned m_ElementDepth;
          unsigned m_StartIndex;
          unsigned m_EndIndex;
          const char*m_pStartElementSequence;
          const char*m_pEndElementSequence;
    public:
        ExtensionType_pimpl();

      virtual void reset();
      virtual void pre ();

      virtual void
      post_ExtensionType ();


#ifndef XSDE_POLYMORPHIC
      virtual void
          _start_any_element(const xml_schema::ro_string& ns,
          const xml_schema::ro_string& name);
#else
      virtual void
          _start_any_element(const xml_schema::ro_string& ns,
          const xml_schema::ro_string& name,
          const char*);
#endif

      virtual void
          _end_any_element(const xml_schema::ro_string& ns,
          const xml_schema::ro_string& name);

      virtual void
          _any_characters(xml_schema::ro_string& c);

      virtual void
          _any_attribute(const xml_schema::ro_string& ns, const xml_schema::ro_string& name, const xml_schema::ro_string& value);
    };
=============================================================

Is there  single callback returning the complete content of the Extension node? I would like to preserve comments and indentation as well.

Thanks
         Hartmut
--



Hartmut Nebelung
Software Developer



Basler AG
An der Strusbek 60-62
22926 Ahrensburg
Germany

Tel. +49 4102 463 388
Fax +49 4102 463 46 388

Hartmut.Nebelung at baslerweb.com
www.baslerweb.com




Management board: Dr.-Ing. Dietmar Ley (CEO) · John P. Jennings · Arndt Bake · Hardy Mehl
Chairman of the supervisory board: Norbert Basler
Basler AG · Amtsgericht Lübeck HRB 4090 · Ust-IdNr.: DE 135 098 121 · Steuer-Nr.: 30 292 04497 · WEEE-Reg.-Nr. DE 83888045
> -----Original Message-----
> From: xsde-users-bounces at codesynthesis.com [mailto:xsde-users-
> bounces at codesynthesis.com] On Behalf Of Boris Kolpackov
> Sent: Thursday, November 12, 2015 4:10 PM
> To: Nebelung, Hartmut
> Cc: xsde-users at codesynthesis.com
> Subject: Re: [xsde-users] Failing to retrieve embedded xml-fragments
>
> Hi Hartmut,
>
> Nebelung, Hartmut <Hartmut.Nebelung at baslerweb.com> writes:
>
> > I do get callbacks for element nodes, but not for the content.
>
> Can you show your parser implementation for AnotherNode where you
> expect to get the content callback?
>
> Also, you may want to check the 'cxx/parser/wildcard' example in
> the XSD/e distribution to see if you are doing something differently.
>
> Boris




More information about the xsde-users mailing list