From stephane.rolland.email at gmail.com Wed Mar 13 21:46:13 2013 From: stephane.rolland.email at gmail.com (Stephane Rolland) Date: Wed Mar 13 22:18:01 2013 Subject: [xsd-users] Serialization code doesn't seem to be generated Message-ID: Hello, I'm trying codesyntehsis xsd utility for the first time. I use xsd 3.3 the debian package, on a Ubuntu 12.04 os. when I generate the code with xsd cxx-tree --generate-serialization --hxx-suffix .h --cxx-suffix .cpp ../xsd/*.xsd the code for serialization doesn't seem to be here. Am I doing something wrong ? Below my xsd test file and the generated code: and the generated code is: // 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. // #ifndef CXX___XSD_SENTENCES_VIEW_H #define CXX___XSD_SENTENCES_VIEW_H // Begin prologue. // // // End prologue. #include #if (XSD_INT_VERSION != 3030000L) #error XSD runtime version mismatch #endif #include #ifndef XSD_USE_CHAR #define XSD_USE_CHAR #endif #ifndef XSD_CXX_TREE_USE_CHAR #define XSD_CXX_TREE_USE_CHAR #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace xml_schema { // anyType and anySimpleType. // typedef ::xsd::cxx::tree::type type; typedef ::xsd::cxx::tree::simple_type< type > simple_type; typedef ::xsd::cxx::tree::type container; // 8-bit // typedef signed char byte; typedef unsigned char unsigned_byte; // 16-bit // typedef short short_; typedef unsigned short unsigned_short; // 32-bit // typedef int int_; typedef unsigned int unsigned_int; // 64-bit // typedef long long long_; typedef unsigned long long unsigned_long; // Supposed to be arbitrary-length integral types. // typedef long long integer; typedef long long non_positive_integer; typedef unsigned long long non_negative_integer; typedef unsigned long long positive_integer; typedef long long negative_integer; // Boolean. // typedef bool boolean; // Floating-point types. // typedef float float_; typedef double double_; typedef double decimal; // String types. // typedef ::xsd::cxx::tree::string< char, simple_type > string; typedef ::xsd::cxx::tree::normalized_string< char, string > normalized_string; typedef ::xsd::cxx::tree::token< char, normalized_string > token; typedef ::xsd::cxx::tree::name< char, token > name; typedef ::xsd::cxx::tree::nmtoken< char, token > nmtoken; typedef ::xsd::cxx::tree::nmtokens< char, simple_type, nmtoken > nmtokens; typedef ::xsd::cxx::tree::ncname< char, name > ncname; typedef ::xsd::cxx::tree::language< char, token > language; // ID/IDREF. // typedef ::xsd::cxx::tree::id< char, ncname > id; typedef ::xsd::cxx::tree::idref< char, ncname, type > idref; typedef ::xsd::cxx::tree::idrefs< char, simple_type, idref > idrefs; // URI. // typedef ::xsd::cxx::tree::uri< char, simple_type > uri; // Qualified name. // typedef ::xsd::cxx::tree::qname< char, simple_type, uri, ncname > qname; // Binary. // typedef ::xsd::cxx::tree::buffer< char > buffer; typedef ::xsd::cxx::tree::base64_binary< char, simple_type > base64_binary; typedef ::x"sd::cxx::tree::hex_binary< char, simple_type > hex_binary; // Date/time. // typedef ::xsd::cxx::tree::time_zone time_zone; typedef ::xsd::cxx::tree::date< char, simple_type > date; typedef ::xsd::cxx::tree::date_time< char, simple_type > date_time; typedef ::xsd::cxx::tree::duration< char, simple_type > duration; typedef ::xsd::cxx::tree::gday< char, simple_type > gday; typedef ::xsd::cxx::tree::gmonth< char, simple_type > gmonth; typedef ::xsd::cxx::tree::gmonth_day< char, simple_type > gmonth_day; typedef ::xsd::cxx::tree::gyear< char, simple_type > gyear; typedef ::xsd::cxx::tree::gyear_month< char, simple_type > gyear_month; typedef ::xsd::cxx::tree::time< char, simple_type > time; // Entity. // typedef ::xsd::cxx::tree::entity< char, ncname > entity; typedef ::xsd::cxx::tree::entities< char, simple_type, entity > entities; // Namespace information and list stream. Used in // serialization functions. // typedef ::xsd::cxx::xml::dom::namespace_info< char > namespace_info; typedef ::xsd::cxx::xml::dom::namespace_infomap< char > namespace_infomap; typedef ::xsd::cxx::tree::list_stream< char > list_stream; typedef ::xsd::cxx::tree::as_double< double_ > as_double; typedef ::xsd::cxx::tree::as_decimal< decimal > as_decimal; typedef ::xsd::cxx::tree::facet facet; // Flags and properties. // typedef ::xsd::cxx::tree::flags flags; typedef ::xsd::cxx::tree::properties< char > properties; // Parsing/serialization diagnostics. // typedef ::xsd::cxx::tree::severity severity; typedef ::xsd::cxx::tree::error< char > error; typedef ::xsd::cxx::tree::diagnostics< char > diagnostics; // Exceptions. // typedef ::xsd::cxx::tree::exception< char > exception; typedef ::xsd::cxx::tree::bounds< char > bounds; typedef ::xsd::cxx::tree::duplicate_id< char > duplicate_id; typedef ::xsd::cxx::tree::parsing< char > parsing; typedef ::xsd::cxx::tree::expected_element< char > expected_element; typedef ::xsd::cxx::tree::unexpected_element< char > unexpected_element; typedef ::xsd::cxx::tree::expected_attribute< char > expected_attribute; typedef ::xsd::cxx::tree::unexpected_enumerator< char > unexpected_enumerator; typedef ::xsd::cxx::tree::expected_text_content< char > expected_text_content; typedef ::xsd::cxx::tree::no_prefix_mapping< char > no_prefix_mapping; typedef ::xsd::cxx::tree::serialization< char > serialization; // Error handler callback interface. // typedef ::xsd::cxx::xml::error_handler< char > error_handler; // DOM interaction. // namespace dom { // 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 // 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. // class Sentence; class SentencesView; #include // std::auto_ptr #include // std::numeric_limits #include // std::binary_search #include #include #include #include #include #include class Sentence: public ::xml_schema::type { public: // content // typedef ::xml_schema::string content_type; typedef ::xsd::cxx::tree::traits< content_type, char > content_traits; const content_type& content () const; content_type& content (); void content (const content_type& x); void content (::std::auto_ptr< content_type > p); // title // typedef ::xml_schema::string title_type; typedef ::xsd::cxx::tree::traits< title_type, char > title_traits; const title_type& title () const; title_type& title (); void title (const title_type& x); void title (::std::auto_ptr< title_type > p); // Constructors. // Sentence (const content_type&, const title_type&); Sentence (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); Sentence (const Sentence& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); virtual Sentence* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; virtual ~Sentence (); // Implementation. // protected: void parse (::xsd::cxx::xml::dom::parser< char >&, ::xml_schema::flags); protected: ::xsd::cxx::tree::one< content_type > content_; ::xsd::cxx::tree::one< title_type > title_; }; class SentencesView: public ::xml_schema::type { public: // title // typedef ::xml_schema::string title_type; typedef ::xsd::cxx::tree::traits< title_type, char > title_traits; const title_type& title () const; title_type& title (); void title (const title_type& x); void title (::std::auto_ptr< title_type > p); // sentences // typedef ::Sentence sentences_type; typedef ::xsd::cxx::tree::sequence< sentences_type > sentences_sequence; typedef sentences_sequence::iterator sentences_iterator; typedef sentences_sequence::const_iterator sentences_const_iterator; typedef ::xsd::cxx::tree::traits< sentences_type, char > sentences_traits; const sentences_sequence& sentences () const; sentences_sequence& sentences (); void sentences (const sentences_sequence& s); // Constructors. // SentencesView (const title_type&); SentencesView (const ::xercesc::DOMElement& e, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); SentencesView (const SentencesView& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0); virtual SentencesView* _clone (::xml_schema::flags f = 0, ::xml_schema::container* c = 0) const; virtual ~SentencesView (); // Implementation. // protected: void parse (::xsd::cxx::xml::dom::parser< char >&, ::xml_schema::flags); protected: ::xsd::cxx::tree::one< title_type > title_; sentences_sequence sentences_; }; #include #include #include #include #include #include #include #include #include void operator<< (::xercesc::DOMElement&, const Sentence&); void operator<< (::xercesc::DOMElement&, const SentencesView&); #include // Begin epilogue. // // // End epilogue. #endif // CXX___XSD_SENTENCES_VIEW_H From boris at codesynthesis.com Thu Mar 14 09:36:03 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Mar 14 09:36:10 2013 Subject: [xsd-users] Serialization code doesn't seem to be generated In-Reply-To: References: Message-ID: Hi Stephane, Stephane Rolland writes: > when I generate the code with > xsd cxx-tree --generate-serialization --hxx-suffix .h --cxx-suffix .cpp > ../xsd/*.xsd > > the code for serialization doesn't seem to be here. > > [...] > > void > operator<< (::xercesc::DOMElement&, const Sentence&); > > void > operator<< (::xercesc::DOMElement&, const SentencesView&); These are the serialization operators. You don't see any serialization functions because your schema doesn't define any global elements (which are treated as possible document roots). So you may want to try adding a global element. Boris From stephane.rolland.email at gmail.com Thu Mar 14 13:13:03 2013 From: stephane.rolland.email at gmail.com (Stephane Rolland) Date: Thu Mar 14 13:13:11 2013 Subject: [xsd-users] Serialization code doesn't seem to be generated In-Reply-To: References: Message-ID: Yep I finally figured this out. I used xerces-c DOMLSSerializer to serialize to a memory buffer MemBufFormatTarget, and then get a std::string out of it. But I thought, related to the documentation, that it was directly possible to serialize on std::ostream. I managed to do it, though it would have been really cool if it had been already written for me:-) > void > > operator<< (::xercesc::DOMElement&, const Sentence&); > > > > void > > operator<< (::xercesc::DOMElement&, const SentencesView&); > > These are the serialization operators. [...] I don't feel like adding a global element in my xsd. I just want to define types, they are instanciated and used elsewhere as data containers. Any way thank you for your product Xsd. The Odb code generator is really good also. From olitour at gmail.com Fri Mar 15 06:41:25 2013 From: olitour at gmail.com (Olivier Tournaire) Date: Fri Mar 15 06:42:13 2013 Subject: [xsd-users] [CityGML 2.0.0] CityModelType operator== Message-ID: Hi all, I have generated c++ code with xsd cxx-tree from citygml 2.0.0 schemas. However, I am facing a problem with the operator== of CityModelType. It iterates over the sequence _GenericApplicationPropertyOfCityModel which is always empty (from the examples coming with xsd schemas) and thus the operator return true even if the models are different. To access cityObjectMember, I have to iterate with the featureMember() method. So, I am wondering why does the operator == uses _GenericApplicationPropertyOfCityModel() instead of featureMember()? Is there a way to fix this? Best regards Olivier From boris at codesynthesis.com Fri Mar 15 08:11:02 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Mar 15 08:11:08 2013 Subject: [xsd-users] [CityGML 2.0.0] CityModelType operator== In-Reply-To: References: Message-ID: Hi Olivier, Olivier Tournaire writes: > However, I am facing a problem with the operator== of CityModelType. To > access cityObjectMember, I have to iterate with the featureMember() method. XSD 3.3.0 supports polymorphic comparison, that is, it will compare actual (dynamic) objects instead of their "static types". So this should work provided that you have compiled your schemas with --generate-polymorphic and also that you haven't "sliced" the objects you are comparing (very common mistake -- use referenced instead of making copies). Boris From boris at codesynthesis.com Fri Mar 15 08:15:52 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Mar 15 08:15:58 2013 Subject: [xsd-users] Serialization code doesn't seem to be generated In-Reply-To: References: Message-ID: Hi Stephane, Stephane Rolland writes: > But I thought, related to the documentation, that it was directly possible > to serialize on std::ostream. It is possible, via serialization functions. > I don't feel like adding a global element in my xsd. I just want to define > types, they are instanciated and used elsewhere as data containers. In XML Schema, only global elements can be document roots. If you don't define any, then none of your resulting XML fragments will be valid per the schema. Plus, serialization functions also capture and create the root element name and namespace, so that you don't have to specify it manually every time you serialize. > Any way thank you for your product Xsd. The Odb code generator is really > good also. Thanks, I am glad you like them. Boris From roger at autodata.no Fri Mar 15 12:23:47 2013 From: roger at autodata.no (Roger Evans) Date: Fri Mar 15 12:23:50 2013 Subject: [xsd-users] How can I add an xsl reference before serializing Message-ID: <1363364627.7221.8.camel@evans.autodata.local> Is there any way with C++/tree to add a (variable) stylesheet reference in the serialization? I'm generating hundreds of xml invoices and need to give them different stylesheet references. Specifically, I want to insert just after the line in the generated document where the '999' can vary. Mvh./Best Regards Roger Evans, Autodata Norge A/S http://www.autodata.no +47 93 25 92 36 From boris at codesynthesis.com Fri Mar 15 13:48:24 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Mar 15 13:48:31 2013 Subject: [xsd-users] How can I add an xsl reference before serializing In-Reply-To: <1363364627.7221.8.camel@evans.autodata.local> References: <1363364627.7221.8.camel@evans.autodata.local> Message-ID: Hi Roger, Roger Evans writes: > Is there any way with C++/tree to add a (variable) stylesheet reference > in the serialization? > > I'm generating hundreds of xml invoices and need to give them > different stylesheet references. > Specifically, I want to insert > href="http://faktark2/ehf/999-Invoice.xsl" ?> > > just after the line in the generated document where the '999' > can vary. You will need to first serialize the object model to a DOM document, then add the processing instruction (that's what that thing is called), and then serialize the DOM document to XML. Note that you will also need to initialize and terminate the Xerces-C++ runtime yourself. To serialize the object model to the DOM document you can use the appropriate serialization function: root_type& r = ... // Root of the object model. xml_schema::namespace_infomap map; // Initialize the map as required. xml_schema::dom::auto_ptr doc (root (r, m)); To add the processing instruction, you can do this (you can use std::ostringstream to create the appropriate data string): #include std::string data ( "type=\"text/xsl\" href=\"http://faktark2/ehf/999-Invoice.xsl\""); xercesc::DOMProcessingInstruction* pi ( doc->createProcessingInstruction ( xsd::cxx::xml::string ("xml-stylesheet").c_str (), xsd::cxx::xml::string (data).c_str ())); doc->insertBefore (pi, doc->getDocumentElement ()); The C++/Tree Mapping FAQ[1] has more information on how to save the DOM document to XML (Q3.2; you can also find the same function in the 'messaging' example in dom-serialize.?xx). [1] http://wiki.codesynthesis.com/Tree/FAQ Boris From lukas.kall at gmail.com Wed Mar 20 10:21:57 2013 From: lukas.kall at gmail.com (Lukas Kall) Date: Wed Mar 20 10:22:36 2013 Subject: [xsd-users] Building windows binaries from linux using mingw64 Message-ID: Hi, I am scouting around for a way to build 64-bit windows binaries of a software that we are developing under linux that make use of CodeSynthesis-XSD. Optimally I would like to have an automated build script that we could run on a linux box. Maybe one could use Vagrant or similar. I have noted that Fedora have a set of prebuilt libraries for mingw64, however not xerces-c, at least not in 64-bit version -- so I have to compile that one myself. Has anybody set up a similar build script before that I could use as a template? Thanks Lukas K?ll From subbu.klce at gmail.com Wed Mar 20 12:23:12 2013 From: subbu.klce at gmail.com (subrahmanyam g) Date: Thu Mar 21 08:15:46 2013 Subject: [xsd-users] Fwd: Suspect a Bug in Generic Class generation for C++ In-Reply-To: References: Message-ID: Hi Sir, I have gone through an issue with the parsing method for xml using Generic class generation for c++.My xsd is a very big one.so i can give you a sample example which replicates the same here. *ex:* According to above schema A2GTFT element is an optional element. So it should allow only one instance otherwise it should throw an error. *ex: *This is the sample xml for the above schema string1 string2 But the problem i have overcome across was *ex:* string1 string2 * * * string1 string2 * Additional A2GTFT element should cause a error at run time.But our codesynthesis method is allowing the above xml & moreoever its not using the second element. (considering the first element) Expected behavior is throwing an error at run time. I will give more details if needed.I hope i 'll get the reply soon. From boris at codesynthesis.com Thu Mar 21 08:33:09 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Mar 21 08:33:16 2013 Subject: [xsd-users] Building windows binaries from linux using mingw64 In-Reply-To: References: Message-ID: Hi Lukas, Lukas Kall writes: > I am scouting around for a way to build 64-bit windows binaries of a > software that we are developing under linux that make use of > CodeSynthesis-XSD. Optimally I would like to have an automated build > script that we could run on a linux box. Maybe one could use Vagrant > or similar. I have noted that Fedora have a set of prebuilt libraries > for mingw64, however not xerces-c, at least not in 64-bit version -- > so I have to compile that one myself. So you want to cross-compile an XSD-based application from Linux to 64-bit Windows, presumably using the MinGW-w64 toolchain. I think that shouldn't be too hard: 1. For XSD itself use the Linux binary package. The generated code is the same on all platforms and the runtime library (libxsd) is header- only. 2. Cross-compiling Xerces-C++ should be straightforward since it uses autotools. Something along these lines should do the trick: ./configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 \ CXXFLAGS=-m64 LDFLAGS="-m64 -no-undefined" make The -m64 flag is only necessary if your toolchain supports multiple targets (i.e., 32 and 64 bit). Once this is done, you should be ready to build your application. Boris From boris at codesynthesis.com Thu Mar 21 08:38:06 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Mar 21 08:38:13 2013 Subject: [xsd-users] Fwd: Suspect a Bug in Generic Class generation for C++ In-Reply-To: References: Message-ID: Hi, subrahmanyam g writes: > Additional A2GTFT element should cause a error at run time. But our > codesynthesis method is allowing the above xml & moreoever its not > using the second element. (considering the first element) This is probably because you have XML Schema validation disabled. Enable it and the XML will be validated against the schema and you will get an error. For more information, see Section 5.1, "XML Schema Validation and Searching" in the C++/Tree Mapping Getting Started Guide: http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#5.1 Boris From olitour at gmail.com Fri Mar 22 04:41:24 2013 From: olitour at gmail.com (Olivier Tournaire) Date: Fri Mar 22 04:41:31 2013 Subject: [xsd-users] Compilation issues Message-ID: Hi, Just to inform you that I faced a few compilation issues with cxx-tree. I am on xubuntu 12.10, g++ 4.7.2, xsd 3.3.0 x86. When compiling citygml generated code, I got the following errors: - /usr/include/xsd/cxx/zc-istream.txx:35:7: erreur: ?setg? was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] - /usr/include/xsd/cxx/tree/parsing.txx:302:13: erreur: ?push_back? was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] - /usr/include/xsd/cxx/tree/parsing.txx:312:13: erreur: ?push_back? was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] For each error, the following "note" appears: - note: declarations in dependent base ?std::vector >? are not found by unqualified lookup Errors are easily fixed by adding "this->" when calling push_back or setg. Regards, Olivier From olitour at gmail.com Fri Mar 22 04:41:33 2013 From: olitour at gmail.com (Olivier Tournaire) Date: Fri Mar 22 04:41:41 2013 Subject: [xsd-users] Serializing and loading a file throws on windows Message-ID: Hi all, I wrote a simple test to check if loading a file, serializing it and loading it again works (and to check if members are correctly written). Here is the code: int main(int argc, char** argv) { try { auto_ptr iCity( CityModel(EXAMPLES_PATH + "/Building_LOD0-4/Building_and_garage_LOD2-EPSG25832.gml", xsd::cxx::tree::flags::dont_validate) ); // Write the input file ofstream output( string(EXAMPLES_PATH + "/Building_LOD0-4/Building_and_garage_LOD2-EPSG25832_copy_testing.gml").c_str() ); xml_schema::namespace_infomap ns_map; ns_map["xsi"].name = "http://www.w3.org/2001/XMLSchema-instance"; ns_map[""].name = "http://www.opengis.net/citygml/2.0"; ns_map[""].schema = "../../CityGML.xsd"; ns_map["xAL"].name = "urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"; ns_map["xAL"].schema = "../../xAL/xAL.xsd"; ns_map["xlink"].name = "http://www.w3.org/1999/xlink"; ns_map["xlink"].schema = "../../3.1.1/xlink/xlinks.xsd"; ns_map["dem"].name = "http://www.opengis.net/citygml/relief/2.0"; ns_map["dem"].schema = "../../CityGML/relief.xsd"; ns_map["bldg"].name = "http://www.opengis.net/citygml/building/2.0 "; ns_map["bldg"].schema = "../../CityGML/building.xsd"; ns_map["gml"].name = "http://www.opengis.net/gml"; ns_map["gml"].schema = "../../3.1.1/base/gml.xsd"; CityModel(output, *iCity, ns_map); // Throw (only on windows ...): why ??? auto_ptr iCity_copy( CityModel(EXAMPLES_PATH + "/Building_LOD0-4/Building_and_garage_LOD2-EPSG25832_copy_testing.gml", xml_schema::flags::dont_validate) ); return 0; } catch (const xml_schema::exception& e) { cerr << "Exception caught: " << e.what() << " --> " << e << endl; return 1; } } As commented, when reading the saved model, an error is thrown, only on windows. Do you have any explanation on why and how to solve this issue? Regards, Olivier From boris at codesynthesis.com Mon Mar 25 08:04:43 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Mar 25 08:14:51 2013 Subject: [xsd-users] Serializing and loading a file throws on windows In-Reply-To: References: Message-ID: Hi Olivier, Olivier Tournaire writes: > catch (const xml_schema::exception& e) > { > cerr << "Exception caught: " << e.what() << " --> " << e << endl; > return 1; > } > } > > As commented, when reading the saved model, an error is thrown, only on > windows. Do you have any explanation on why and how to solve this issue? It would be helpful to know what the exception says. Boris From boris at codesynthesis.com Mon Mar 25 08:03:08 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Mar 25 08:14:53 2013 Subject: [xsd-users] Compilation issues In-Reply-To: References: Message-ID: Hi Olivier, Olivier Tournaire writes: > Just to inform you that I faced a few compilation issues with cxx-tree. I > am on xubuntu 12.10, g++ 4.7.2, xsd 3.3.0 x86. > > [...] > > Errors are easily fixed by adding "this->" when calling push_back or setg. This is a known issue that has been fixed for the upcoming release. There is also a patch for XSD 3.3.0: http://www.codesynthesis.com/~boris/tmp/xsd/xsd-3.3.0-gcc-4.7-clang.patch Boris