[xsd-users] generated tree with ambiguous references

Jens Rapp docjunior at web.de
Wed May 23 09:30:42 EDT 2012


   hi, 
   i tried to play a little    with xsdcxx but didn't get any working code.

   here's my xsd:

   <?xml version="1.0" encoding="UTF-8&quo   <schema xmlns="http://www.w3.org/2001/XMLSchema&quo   t; targetNamespace="http://www.example.org/mindmodel" xmlns   :tns="http://www.example.org/mindmodel" elementFormDefault=   "qualified">
       <complexType n         &nbs            &   tion_t" maxOccurs="unbounded" minOccurs="0"           </se       </complexType>
     &n       <element name="mindmodel"    type="tns:mindmodel_t"></element>

       <complexType                       &nb   sp;  <element name="object" type="tns:obje   ct_t" maxOccurs="unbounded" minOccurs="1"&           </sequ           <attribute name   ="name" type="string"></attribute>
   &   " type="int"></attribute>
             <complexType na                      &nb   sp;  <element name="decorator" type="strin   g" maxOccurs="unbounded" minOccurs="0">           </sequenc           <attribute name=   "name" type="string"></attribute>
   &nbs   </schema>

   my code generation loo
   GENSRCDIR = src/generated-source
   SCHEMADIR = src/schem   XSD2CXX = /usr/bin/xsdcxx
   XTFLAGS = --output-dir    $(GENSRCDIR) --hxx-suffix .h --cxx-suffix .cpp --generate
   -seri   alization --generate-ostream --generate-wildcard --generate-comp
   ariso   object-list: generate-source
       echo -          for i in `find ./src -name *.cpp`; do echo -n " 
                ec   br/>    echo "HDR = \$$(SRC:%.cpp=%.h)"   ; >>sourcefiles.in    
   generate-source:   generate-tree: 
       $(XSD2
   It 
   int main(int argc, char **argv)       try {
              &   el (datei));
           for (ac   tion_t::object_const_iterator i (model->action().begin());
       ; i != model->action().end(); ++i) {
                       } catch (const xml_schema::excepti           cerr <&           re       }
       return 0;}
   
   this is my compiler output:

   make all 
   rm   /usr/bin/g++ -Wall -g -c src/generated-source   /usr/bin/g++ -Wall -g -c src/cxx/main.cpp
   src/cxx   s   s ambiguous
   src/cxx/../generated-source/mind.h:251: error: candid   ates are: namespace mindmodel { }
   src/cxx/../generated-source    xsd::cxx::xml::dom::auto_ptr&l   t;xercesc_3_1::DOMDocument> mindmodel::mindmodel(const mindmodel::
   mi   ndmodel_t&, const xml_schema::namespace_infomap&, xml_schema:   :flags)
   src/cxx/../generated-source/mind.h:691: error:  &nb   sp;                void mindmodel::mindmodel(xercesc_3_1::DOMDocument&, const    mindmodel::mindmodel_t&, xml_schema::flags)
   src/cxx/../generat   sp;         void mindmodel::min   dmodel(xercesc_3_1::XMLFormatTarget&, const mindmodel::mindmodel_t
   &   amp;, xercesc_3_1::DOMErrorHandler&, const xml_schema::namespace
   _   src/cxx/   ;           void mind   model::mindmodel(xercesc_3_1::XMLFormatTarget&, const mindmodel::m
   i   ndmodel_t&, xml_schema::error_handler&, const xml_schema::nam   espace_infomap&, const std::string&, xml_schema::flags)
   s   p;            void    mindmodel::mindmodel(xercesc_3_1::XMLFormatTarget&, const mindm
   o   del::mindmodel_t&, const xml_schema::namespace_infomap&, cons   t std::string&, xml_schema::flags)
   src/cxx/../generated-source/   nbsp;       void mindmodel::mindmodel(std   ::ostream&, const mindmodel::mindmodel_t&, xercesc_3_1::DOMEr   rorHandler&, const xml_schema::namespace_infomap&, const st   d::string&, xml_schema::flags)
   src/cxx/../generated-source/mind.h   nbsp;      void mindmodel::mindmodel(std::ostr   eam&, const mindmodel::mindmodel_t&, xml_schema::error_handle   r&, const xml_schema::namespace_infomap&, const std::string   &, xml_schema::flags)
   src/cxx/../generated-source/mind.h:639: e   p;     void mindmodel::mindmodel(std::ostream&,    const mindmodel::mindmodel_t&, const xml_schema::namespace_in
   f   src/cxx/../   bsp;          std::auto_ptr&   lt;mindmodel::mindmodel_t> mindmodel::mindmodel(xsd::cxx::xml::dom::
   au    xml_schema::properties&)
   src/cxx/../generated-source/mind.h:612:    std::auto_ptr<mindmodel::mindmodel_t>   ; mindmodel::mindmodel(const xercesc_3_1::DOMDocument&, xml_sche
   m   src/cxx/../generated-s   nbsp;        std::auto_ptr<mindmode   l::mindmodel_t> mindmodel::mindmodel(xercesc_3_1::InputSource&,    xercesc_3_1::DOMErrorHandler&, xml_schema::flags, const xml_sche
   m   src/cxx/../generated-source/mind.h:597: error:&nb       std::auto_ptr<mindmodel::mindmodel_t> mindmode   l::mindmodel(xercesc_3_1::InputSource&, xml_schema::error_handler&   ;, xml_schema::flags, const xml_schema::properties&)
   src/cxx/   ;           std::auto_p   tr<mindmodel::mindmodel_t> mindmodel::mindmodel(xercesc_3_1::InputS   ource&, xml_schema::flags, const xml_schema::properties&)
      bsp;            st   d::auto_ptr<mindmodel::mindmodel_t> mindmodel::mindmodel(std::istre   am&, const std::string&, xercesc_3_1::DOMErrorHandler&,    xml_schema::flags, const xml_schema::properties&)
   src/cxx/..   nbsp;          std::auto_ptr   <mindmodel::mindmodel_t> mindmodel::mindmodel(std::istream&,    const std::string&, xml_schema::error_handler&, xml_schema::f   lags, const xml_schema::properties&)
   src/cxx/../generated-sourc   ;        std::auto_ptr<mindmodel::m   indmodel_t> mindmodel::mindmodel(std::istream&, const std::str   ing&, xml_schema::flags, const xml_schema::properties&)
   s   p;            std:   :auto_ptr<mindmodel::mindmodel_t> mindmodel::mindmodel(std::istream   &, xercesc_3_1::DOMErrorHandler&, xml_schema::flags, const    xml_schema::properties&)
   src/cxx/../generated-source/mind.h:557:    sp;     std::auto_ptr<mindmodel::mindmodel_t>    mindmodel::mindmodel(std::istream&, xml_schema::error_handler&   , xml_schema::flags, const xml_schema::properties&)
   src/cxx/.    std::auto_pt   r<mindmodel::mindmodel_t> mindmodel::mindmodel(std::istream&,    xml_schema::flags, const xml_schema::properties&)
   src/cxx/..   nbsp;          std::auto_ptr   <mindmodel::mindmodel_t> mindmodel::mindmodel(const std::string&a   mp;, xercesc_3_1::DOMErrorHandler&, xml_schema::flags, const x
   m   src/cxx/../generated-source/mind.h:537: er   ;     std::auto_ptr<mindmodel::mindmodel_t> m   indmodel::mindmodel(const std::string&, xml_schema::error_handler&
   a   src/cx   sp;           std::auto   _ptr<mindmodel::mindmodel_t> mindmodel::mindmodel(const std::stri   ng&, xml_schema::flags, const xml_schema::properties&)
   sr    ambiguous
   src/cxx/../generated-source/mind.h:251: error: candida   tes are: namespace mindmodel { }
   src/cxx/../generated-source/   nbsp;       xsd::cxx::xml::dom::auto_ptr<   ;xercesc_3_1::DOMDocument> mindmodel::mindmodel(const mindmodel::m
   in   dmodel_t&, const xml_schema::namespace_infomap&, xml_schema::   flags)
   src/cxx/../generated-source/mind.h:691: error:  &nbs   p;            &   nbsp; void mindmodel::mindmodel(xercesc_3_1::DOMDocument&, const
      src/cxx/../generat   sp;         void mindmodel::min   dmodel(xercesc_3_1::XMLFormatTarget&, const mindmodel::mindmodel_t
   &   amp;, xercesc_3_1::DOMErrorHandler&, const xml_schema::namespace
   _   src/cxx/   ;           void mind   model::mindmodel(xercesc_3_1::XMLFormatTarget&, const mindmodel::m
   i   ndmodel_t&, xml_schema::error_handler&, const xml_schema::nam   espace_infomap&, const std::string&, xml_schema::flags)
   s   p;            void    mindmodel::mindmodel(xercesc_3_1::XMLFormatTarget&, const mindm
   o   del::mindmodel_t&, const xml_schema::namespace_infomap&, cons   t std::string&, xml_schema::flags)
   src/cxx/../generated-source/   nbsp;       void mindmodel::mindmodel(std   ::ostream&, const mindmodel::mindmodel_t&, xercesc_3_1::DOMEr   rorHandler&, const xml_schema::namespace_infomap&, const st   d::string&, xml_schema::flags)
   src/cxx/../generated-source/mind.h   nbsp;      void mindmodel::mindmodel(std::ostr   eam&, const mindmodel::mindmodel_t&, xml_schema::error_handle   r&, const xml_schema::namespace_infomap&, const std::string   &, xml_schema::flags)
   src/cxx/../generated-source/mind.h:639: e   p;     void mindmodel::mindmodel(std::ostream&,    const mindmodel::mindmodel_t&, const xml_schema::namespace_in
   f   src/cxx/../   bsp;          std::auto_ptr&   lt;mindmodel::mindmodel_t> mindmodel::mindmodel(xsd::cxx::xml::dom::
   au    xml_schema::properties&)
   src/cxx/../generated-source/mind.h:612:    std::auto_ptr<mindmodel::mindmodel_t>   ; mindmodel::mindmodel(const xercesc_3_1::DOMDocument&, xml_sche
   m   src/cxx/../generated-s   nbsp;        std::auto_ptr<mindmode   l::mindmodel_t> mindmodel::mindmodel(xercesc_3_1::InputSource&,    xercesc_3_1::DOMErrorHandler&, xml_schema::flags, const xml_sche
   m   src/cxx/../generated-source/mind.h:597: error:&nb       std::auto_ptr<mindmodel::mindmodel_t> mindmode   l::mindmodel(xercesc_3_1::InputSource&, xml_schema::error_handler&   ;, xml_schema::flags, const xml_schema::properties&)
   src/cxx/   ;           std::auto_p   tr<mindmodel::mindmodel_t> mindmodel::mindmodel(xercesc_3_1::InputS   ource&, xml_schema::flags, const xml_schema::properties&)
      bsp;            st   d::auto_ptr<mindmodel::mindmodel_t> mindmodel::mindmodel(std::istre   am&, const std::string&, xercesc_3_1::DOMErrorHandler&,    xml_schema::flags, const xml_schema::properties&)
   src/cxx/..   nbsp;          std::auto_ptr   <mindmodel::mindmodel_t> mindmodel::mindmodel(std::istream&,    const std::string&, xml_schema::error_handler&, xml_schema::f   lags, const xml_schema::properties&)
   src/cxx/../generated-sourc   ;        std::auto_ptr<mindmodel::m   indmodel_t> mindmodel::mindmodel(std::istream&, const std::str   ing&, xml_schema::flags, const xml_schema::properties&)
   s   p;            std:   :auto_ptr<mindmodel::mindmodel_t> mindmodel::mindmodel(std::istream   &, xercesc_3_1::DOMErrorHandler&, xml_schema::flags, const    xml_schema::properties&)
   src/cxx/../generated-source/mind.h:557:    sp;     std::auto_ptr<mindmodel::mindmodel_t>    mindmodel::mindmodel(std::istream&, xml_schema::error_handler&   , xml_schema::flags, const xml_schema::properties&)
   src/cxx/.    std::auto_pt   r<mindmodel::mindmodel_t> mindmodel::mindmodel(std::istream&,    xml_schema::flags, const xml_schema::properties&)
   src/cxx/..   nbsp;          std::auto_ptr   <mindmodel::mindmodel_t> mindmodel::mindmodel(const std::string&a   mp;, xercesc_3_1::DOMErrorHandler&, xml_schema::flags, const x
   m   src/cxx/../generated-source/mind.h:537: er   ;     std::auto_ptr<mindmodel::mindmodel_t> m   indmodel::mindmodel(const std::string&, xml_schema::error_handler&
   a   src/cx   sp;           std::auto   _ptr<mindmodel::mindmodel_t> mindmodel::mindmodel(const std::stri   ng&, xml_schema::flags, const xml_schema::properties&)
   ma
   what's wron

   Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE=2
   0M   https://produ
   



More information about the xsd-users mailing list