From boris at codesynthesis.com Thu Jan 7 07:32:58 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Jan 7 07:24:34 2010 Subject: [xsde-users] Re: =?iso-8859-1?Q?Error_?= =?iso-8859-1?Q?during_serialization_of_the_character_'=FC'?= In-Reply-To: References: <20091215155518.75beee6b@streamteam.de> Message-ID: Hi Thomas, Happy new year! The binary with support for ISO-8859-1 is ready: http://www.codesynthesis.com/~boris/tmp/xsde-3.2.0.a2-i686-windows.zip You will need to add the XSDE_ENCODING parameter to your config file and rebuild the XSD/e runtime (see config/config.nmake for details). You will also need to recompile your schemas with the '--char-encoding iso8859-1' option. After that you should be able to use '?' directly in your application. See Chapter 3, "Mapping Configuration" in the C++/Hybrid Getting Started Guide for details. Here is the relevant item from the NEWS file: * Support for ISO-8859-1 in addition to UTF-8 as application encoding. Note that this encoding is not the same as the XML document encoding that is being parsed or serialized. Rather, it is the encoding that is used inside the application. When an XML document is parsed the character data is automatically converted to the application encoding. Similarly, when an XML document is serialized, the data in the application encoding is automatically converted to the resulting document encoding. To select a particular encoding, configure the XSD/e runtime library accordingly and pass the --char-encoding option to the XSD/e compiler when translating your schemas. Let us know if you run into any problems. Boris From erik.sjolund at gmail.com Tue Jan 12 03:57:20 2010 From: erik.sjolund at gmail.com (=?ISO-8859-1?Q?Erik_Sj=F6lund?=) Date: Tue Jan 12 03:57:25 2010 Subject: [xsde-users] some bug fixes ( patches attached ) Message-ID: <4B4C3970.6080603@gmail.com> Hi, I really like this software. Thanks for releasing it under an open source license! patch1 fixes a bug in xsde-3.1.0/examples/cxx/hybrid/binary/xdr/driver.cxx patch2 and patch3 fix a bug in xsde-3.1.0/documentation/cxx/hybrid/guide/index.xhtml in two different ways. cheers, Erik Sj?lund -------------- next part -------------- diff -ur xsde-3.1.0/examples/cxx/hybrid/binary/xdr/driver.cxx xsde-3.1.0.new/examples/cxx/hybrid/binary/xdr/driver.cxx --- xsde-3.1.0/examples/cxx/hybrid/binary/xdr/driver.cxx 2009-04-06 16:37:27.000000000 +0200 +++ xsde-3.1.0.new/examples/cxx/hybrid/binary/xdr/driver.cxx 2010-01-12 09:48:22.000000000 +0100 @@ -132,7 +132,7 @@ doc_s.add_prefix ("lib", "http://www.codesynthesis.com/library"); doc_s.add_schema ("http://www.codesynthesis.com/library", "library.xsd"); - catalog_s.pre (*c); + catalog_s.pre (*copy); doc_s.serialize (std::cout, xml_schema::document_simpl::pretty_print); catalog_s.post (); } -------------- next part -------------- diff -ur xsde-3.1.0/documentation/cxx/hybrid/guide/index.xhtml xsde-3.1.0.new/documentation/cxx/hybrid/guide/index.xhtml --- xsde-3.1.0/documentation/cxx/hybrid/guide/index.xhtml 2009-04-06 15:36:13.000000000 +0200 +++ xsde-3.1.0.new/documentation/cxx/hybrid/guide/index.xhtml 2010-01-12 09:45:05.000000000 +0100 @@ -976,13 +976,12 @@ hello_s.root_name ()); ostringstream ostr; - hello_s.pre (*h); + hello_s.pre (h); doc_s.serialize (ostr, xml_schema::document_simpl::pretty_print); hello_s.post (); - delete h; - - cout << ostr.c_str () << endl; + string s = ostr.str(); + cout << s << endl; } catch (const xml_schema::serializer_exception& e) { -------------- next part -------------- diff -ur xsde-3.1.0/documentation/cxx/hybrid/guide/index.xhtml xsde-3.1.0.new/documentation/cxx/hybrid/guide/index.xhtml --- xsde-3.1.0/documentation/cxx/hybrid/guide/index.xhtml 2009-04-06 15:36:13.000000000 +0200 +++ xsde-3.1.0.new/documentation/cxx/hybrid/guide/index.xhtml 2010-01-12 09:46:58.000000000 +0100 @@ -974,15 +974,12 @@ hello_saggr hello_s; xml_schema::document_simpl doc_s (hello_s.root_serializer (), hello_s.root_name ()); - ostringstream ostr; - hello_s.pre (*h); - doc_s.serialize (ostr, xml_schema::document_simpl::pretty_print); + hello_s.pre (h); + doc_s.serialize (cout, xml_schema::document_simpl::pretty_print); hello_s.post (); - delete h; - - cout << ostr.c_str () << endl; + cout << endl; } catch (const xml_schema::serializer_exception& e) { From boris at codesynthesis.com Tue Jan 12 09:35:58 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Jan 12 09:26:30 2010 Subject: [xsde-users] some bug fixes ( patches attached ) In-Reply-To: <4B4C3970.6080603@gmail.com> References: <4B4C3970.6080603@gmail.com> Message-ID: Hi Erik, Erik Sj?lund writes: > I really like this software. Thanks for releasing it under an open > source license! I am glad you like it. > patch1 fixes a bug in > xsde-3.1.0/examples/cxx/hybrid/binary/xdr/driver.cxx Fixed (as well as in the cdr and custom examples). > patch2 and patch3 fix a bug in > xsde-3.1.0/documentation/cxx/hybrid/guide/index.xhtml > in two different ways. I used a modified version of the first fix. While the second version is also valid, the goal of this example is to demonstrate how to save the resulting XML into a memory buffer. Thanks for the patches! Boris