From boris at codesynthesis.com Mon May 3 05:26:09 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon May 3 05:17:08 2010 Subject: [xsde-users] Cross-compilation libxsde for PPC under vxWorks In-Reply-To: <4BDAF227.3080208@tiscali.it> References: <4BCDA5B0.4070407@tiscali.it> <4BD7F47D.2030307@tiscali.it> <4BDAF227.3080208@tiscali.it> Message-ID: Hi, Jaws writes: > i resolved the issue related the compilation/link adding the option > -fno-rtti -O2. > Now I have a problem on the target. I have created an example that read an > xml file make the parsing and generate some messages. > Everithing works on Linux , but When I try to run on the target (PPC860 > with vxWorks) from the command on the shell, I have received the following > error: > > fp unavailable > Machine Status Register: 0x00009032 > Data Access Register: 0xeeeeeeee > Condition Register: 0x42004024 > Fp Control and Status Register: 0xeeeeeeee Could it be that your target does not support floating point operations? There are a few built-in XML Schema types that are mapped to types that require this support. These types are: xs:float, xs:double, xs:decimal, xs:time, xs:dateTime, and xs:duration. Can you check if your schema uses any of these types? Also, the stack trace you provided is not very helpful because the program is compiled with optimization. Can you recompile everything with -g instead of -O2 and show the resulting stack trace? Boris From jaws75 at tiscali.it Mon May 3 08:37:09 2010 From: jaws75 at tiscali.it (Jaws) Date: Mon May 3 08:37:10 2010 Subject: [xsde-users] Cross-compilation libxsde for PPC under vxWorks In-Reply-To: References: <4BCDA5B0.4070407@tiscali.it> <4BD7F47D.2030307@tiscali.it> <4BDAF227.3080208@tiscali.it> Message-ID: <4BDEC375.9000607@tiscali.it> The hardware FP unit is not enabled. It is enabled only the soft-float. The xml schema use xs:decimal and xs:double type. I rebuild the runtime library with the -g option and without any optimization. This is the stack trace of the error: fp unavailable Exception current instruction address: 0x018a9a34 Fixed Point Register: 0x69734d6c Condition Register: 0x44004084 Fp Control and Status Register: 0x73655265 19b200 vxTaskEntry +5c : ed580 () ed630 shell +b4 : ed2c0 () ed3f8 execute +26c: execute () ed2a0 execute +114: yyparse () fff30 yyparse +c94: fe2ec () fe444 yystart +d98: db_test(const char *) () e970c4 db_test(const char *)+10 : loadxmlFile(const char *) () e973b4 loadxmlFile(const char *)+2b8: xsde::cxx::parser::expat::document_pimpl (2d87af0, 2d87b80, 1000, 0) 18a2ce0 xsde::cxx::parser::expat::document_pimpl+148: XML_Parse (a53e640, 2d87b80, 1000, 0) 18a9128 XML_Parse +230: XML_ParseBuffer (a53e640, 1000, 0) 18a9274 XML_ParseBuffer+124: 18ae628 (a53e640, a545400, a546400, a53e658) 18ae698 XML_GetFeatureList+46a0: 18aed78 (a53e640, a545400, a546400, a53e658) 18aee1c XML_GetFeatureList+4e24: 18aee3c (a53e640, 1d34ed4, a545400, a546400, 1d, a545400, a53e658) 18af8b0 XML_GetFeatureList+58b8: 18aa1d8 (a53e640, a545400, a546400, a53e658) 18aa23c XML_GetFeatureList+244: 18aa7bc (a53e640, 0, 1d34ed4, a545400, a546400, a53e658) 18ab1a4 XML_GetFeatureList+11ac: xsde::cxx::parser::expat::document_pimpl (2d87af0, a5c2bc0, a53e1b0) 18a3178 xsde::cxx::parser::expat::document_pimpl+38 : xsde::cxx::parser::expat::document_pimpl (2d87af0, a5c2bc0, a53e1b0) 18a325c xsde::cxx::parser::expat::document_pimpl+34 : XML_GetParsingStatus (a53e640, 2d877a8) Another strange thing is: if I try to build the application code without the optimization my linkcheck returns an error like this: _ZnwjPv undefined If I build the application code to test the xml part with at least -O1 the undefined symbol disappear. Any suggestion is welcome. Thanks Boris Kolpackov ha scritto: Hi, Jaws [1] writes: i resolved the issue related the compilation/link adding the option -fno-rtti -O2. Now I have a problem on the target. I have created an example that read an xml file make the parsing and generate some messages. Everithing works on Linux , but When I try to run on the target (PPC860 with vxWorks) from the command on the shell, I have received the following error: fp unavailable Machine Status Register: 0x00009032 Data Access Register: 0xeeeeeeee Condition Register: 0x42004024 Fp Control and Status Register: 0xeeeeeeee Could it be that your target does not support floating point operations? There are a few built-in XML Schema types that are mapped to types that require this support. These types are: xs:float, xs:double, xs:decimal, xs:time, xs:dateTime, and xs:duration. Can you check if your schema uses any of these types? Also, the stack trace you provided is not very helpful because the program is compiled with optimization. Can you recompile everything with -g instead of -O2 and show the resulting stack trace? Boris References 1. mailto:jaws75@tiscali.it From jaws75 at tiscali.it Tue May 4 04:02:52 2010 From: jaws75 at tiscali.it (Jaws) Date: Tue May 4 04:02:59 2010 Subject: [xsde-users] Cross-compilation libxsde for PPC under vxWorks In-Reply-To: <4BDEC375.9000607@tiscali.it> References: <4BCDA5B0.4070407@tiscali.it> <4BD7F47D.2030307@tiscali.it> <4BDAF227.3080208@tiscali.it> <4BDEC375.9000607@tiscali.it> Message-ID: <4BDFD4AC.7010604@tiscali.it> I resolved the issues!!. Thanks for your support. Jaws ha scritto: > The hardware FP unit is not enabled. It is enabled only the > soft-float. > The xml schema use xs:decimal and xs:double type. > I rebuild the runtime library with the -g option and without any > optimization. > This is the stack trace of the error: > fp unavailable > Exception current instruction address: 0x018a9a34 > Fixed Point Register: 0x69734d6c > Condition Register: 0x44004084 > Fp Control and Status Register: 0x73655265 > 19b200 vxTaskEntry +5c : ed580 () > ed630 shell +b4 : ed2c0 () > ed3f8 execute +26c: execute () > ed2a0 execute +114: yyparse () > fff30 yyparse +c94: fe2ec () > fe444 yystart +d98: db_test(const char *) () > e970c4 db_test(const char *)+10 : loadxmlFile(const char *) () > e973b4 loadxmlFile(const char *)+2b8: > xsde::cxx::parser::expat::document_pimpl (2d87af0, 2d87b80, 1000, 0) > 18a2ce0 xsde::cxx::parser::expat::document_pimpl+148: XML_Parse > (a53e640, 2d87b80, 1000, 0) > 18a9128 XML_Parse +230: XML_ParseBuffer (a53e640, 1000, 0) > 18a9274 XML_ParseBuffer+124: 18ae628 (a53e640, a545400, a546400, > a53e658) > 18ae698 XML_GetFeatureList+46a0: 18aed78 (a53e640, a545400, a546400, > a53e658) > 18aee1c XML_GetFeatureList+4e24: 18aee3c (a53e640, 1d34ed4, a545400, > a546400, 1d, a545400, a53e658) > 18af8b0 XML_GetFeatureList+58b8: 18aa1d8 (a53e640, a545400, a546400, > a53e658) > 18aa23c XML_GetFeatureList+244: 18aa7bc (a53e640, 0, 1d34ed4, a545400, > a546400, a53e658) > 18ab1a4 XML_GetFeatureList+11ac: > xsde::cxx::parser::expat::document_pimpl (2d87af0, a5c2bc0, a53e1b0) > 18a3178 xsde::cxx::parser::expat::document_pimpl+38 : > xsde::cxx::parser::expat::document_pimpl (2d87af0, a5c2bc0, a53e1b0) > 18a325c xsde::cxx::parser::expat::document_pimpl+34 : > XML_GetParsingStatus (a53e640, 2d877a8) > Another strange thing is: if I try to build the application code > without the optimization my linkcheck returns an error like this: > _ZnwjPv undefined > If I build the application code to test the xml part with at least -O1 > the undefined symbol disappear. > Any suggestion is welcome. > Thanks > Boris Kolpackov ha scritto: > > Hi, > > Jaws [1] writes: > > > > i resolved the issue related the compilation/link adding the option > -fno-rtti -O2. > Now I have a problem on the target. I have created an example that read an > xml file make the parsing and generate some messages. > Everithing works on Linux , but When I try to run on the target (PPC860 > with vxWorks) from the command on the shell, I have received the following > error: > > fp unavailable > Machine Status Register: 0x00009032 > Data Access Register: 0xeeeeeeee > Condition Register: 0x42004024 > Fp Control and Status Register: 0xeeeeeeee > > > Could it be that your target does not support floating point operations? > There are a few built-in XML Schema types that are mapped to types that > require this support. These types are: xs:float, xs:double, xs:decimal, > xs:time, xs:dateTime, and xs:duration. Can you check if your schema uses > any of these types? > > Also, the stack trace you provided is not very helpful because the > program is compiled with optimization. Can you recompile everything > with -g instead of -O2 and show the resulting stack trace? > > Boris > > References > > 1. mailto:jaws75@tiscali.it > > From boris at codesynthesis.com Tue May 4 04:13:55 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue May 4 04:05:28 2010 Subject: [xsde-users] Cross-compilation libxsde for PPC under vxWorks In-Reply-To: <4BDEC375.9000607@tiscali.it> References: <4BCDA5B0.4070407@tiscali.it> <4BD7F47D.2030307@tiscali.it> <4BDAF227.3080208@tiscali.it> <4BDEC375.9000607@tiscali.it> Message-ID: Hi, Jaws writes: > The hardware FP unit is not enabled. It is enabled only the soft-float. > > The xml schema use xs:decimal and xs:double type. > > I rebuild the runtime library with the -g option and without any > optimization. > This is the stack trace of the error: Hm, the stack trace is still not very helpful, probably because you still had to build with -O1, I assume. Can you show me the C++ compiler options you used to build the XSD/e runtime as well as your application? We need to make sure that the option that enables soft-float (I assume it is -msoft-float) is used consistently. You also need to make sure that you link to the proper VxWorks runtime that includes the soft-float support. It may also make sense to test all this with a separate application. Can you try something like this and see if it works: #include #include int main (int, char*[]) { double v = strtod ("123.456", 0); v = -v; char str[128]; sprintf (str, "%.*f", 2, v); printf ("%s\n", str); } > Another strange thing is: if I try to build the application code > without the optimization my linkcheck returns an error like this: > > _ZnwjPv undefined > > If I build the application code to test the xml part with at least -O1 > the undefined symbol disappear. This symbol is for placement operator new: operator new(unsigned int, void*) It should be defined by the compiler runtime. I suggest thatyou contact VxWorks support regarding this sinceit looks like a toolchain issue. Boris From boris at codesynthesis.com Tue May 4 04:31:46 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue May 4 04:22:47 2010 Subject: [xsde-users] Cross-compilation libxsde for PPC under vxWorks In-Reply-To: <4BDFD4AC.7010604@tiscali.it> References: <4BCDA5B0.4070407@tiscali.it> <4BD7F47D.2030307@tiscali.it> <4BDAF227.3080208@tiscali.it> <4BDEC375.9000607@tiscali.it> <4BDFD4AC.7010604@tiscali.it> Message-ID: Hi, Jaws writes: > I resolved the issues!!. Can you let us know what was the issue and how you resolved it? This can be useful if someone else encounters a similar problem in the future. Thanks, Boris From jaws75 at tiscali.it Tue May 4 04:40:11 2010 From: jaws75 at tiscali.it (Jaws) Date: Tue May 4 04:40:21 2010 Subject: [xsde-users] Cross-compilation libxsde for PPC under vxWorks In-Reply-To: References: <4BCDA5B0.4070407@tiscali.it> <4BD7F47D.2030307@tiscali.it> <4BDAF227.3080208@tiscali.it> <4BDEC375.9000607@tiscali.it> <4BDFD4AC.7010604@tiscali.it> Message-ID: <4BDFDD6B.8090106@tiscali.it> I solved the issue adding some define related to type customization of my platform and OS. So they are very specific changes I didn't solve at the moment the issue related to the optimization option that must be set to O1 to avoid the link failure on the operator new. But I think it is another problem specific for my platform. I'll post the update. Thanks Boris Kolpackov ha scritto: Hi, Jaws [1] writes: I resolved the issues!!. Can you let us know what was the issue and how you resolved it? This can be useful if someone else encounters a similar problem in the future. Thanks, Boris References 1. mailto:jaws75@tiscali.it From ietab at hotmail.com Thu May 6 09:48:05 2010 From: ietab at hotmail.com (mozilla org) Date: Thu May 6 15:31:35 2010 Subject: [xsde-users] Custom allocators/deallocators Message-ID: Hello Is it possible to have a private memory pool with xsde? In our embedded system are we not allowed to allocate/deallocate from the system heap when we are up and running. Everything must be allocated at start-up, we are afraid of out-of memory exceptions and memory fragmentation. If a sub-system needs "dynamic" memory then we have to use a private memory pool with it's own memory handler for that sub-system. /Kjell _________________________________________________________________ Hotmail: Trusted email with powerful SPAM protection. https://signup.live.com/signup.aspx?id=60969 From boris at codesynthesis.com Fri May 7 02:51:31 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri May 7 02:42:46 2010 Subject: [xsde-users] Custom allocators/deallocators In-Reply-To: References: Message-ID: Hi Kjell, ietab@hotmail.com writes: > Is it possible to have a private memory pool with xsde? In our embedded > system are we not allowed to allocate/deallocate from the system heap > when we are up and running. Everything must be allocated at start-up, > we are afraid of out-of memory exceptions and memory fragmentation. > If a sub-system needs "dynamic" memory then we have to use a private > memory pool with it's own memory handler for that sub-system. While we are planning to add more convenient support for this in the next release of XSD/e, there is a way to achieve this with the current version by overriding operator new/delete (and performing a few other steps). This will work well if no other sub-system uses C++ new/delete for memory management. Let me know if this will work for your application and I will describe in more detail what needs to be done. Alternatively, I can give you a beta version for the next release. Also, can you let us know which platform/toolchain you are using. Boris From ietab at hotmail.com Fri May 7 05:14:10 2010 From: ietab at hotmail.com (mozilla org) Date: Fri May 7 06:02:55 2010 Subject: [xsde-users] Custom allocators/deallocators In-Reply-To: References: , Message-ID: Hello Our platforms are Windows and VxWorks, we might move to Linux in near future and skip VxWorks. On Windows are we using Visual Studio and on VxWorks the Gnu compiler. The project I am working on is in the specification state, we only make some prototyping for prof of concept. A beta is perfect we will not need any xsde release until next year. /Kjell > Date: Fri, 7 May 2010 08:51:31 +0200 > From: boris@codesynthesis.com > To: ietab@hotmail.com > CC: xsde-users@codesynthesis.com > Subject: Re: [xsde-users] Custom allocators/deallocators > > Hi Kjell, > > ietab@hotmail.com writes: > > > Is it possible to have a private memory pool with xsde? In our embedded > > system are we not allowed to allocate/deallocate from the system heap > > when we are up and running. Everything must be allocated at start-up, > > we are afraid of out-of memory exceptions and memory fragmentation. > > If a sub-system needs "dynamic" memory then we have to use a private > > memory pool with it's own memory handler for that sub-system. > > While we are planning to add more convenient support for this in the > next release of XSD/e, there is a way to achieve this with the current > version by overriding operator new/delete (and performing a few other > steps). This will work well if no other sub-system uses C++ new/delete > for memory management. Let me know if this will work for your application > and I will describe in more detail what needs to be done. > > Alternatively, I can give you a beta version for the next release. > > Also, can you let us know which platform/toolchain you are using. > > Boris _________________________________________________________________ Hotmail: Powerful Free email with security by Microsoft. https://signup.live.com/signup.aspx?id=60969 From iftroja at live.com Sat May 8 11:04:18 2010 From: iftroja at live.com (Kjell Svensson) Date: Sat May 8 11:04:25 2010 Subject: [xsde-users] Valid but XSD/e reports unexpected element Message-ID: Hello I have created a schema and an xml document in Altova xmlspy. XMLSpy reports that the xml document is okay and valid against the schema, but xsd/e reports ~\cxx\hybrid\hello\hello3.xml:5:77: unexpected element encountered I have tried to remove the schema location etc in the XML doc without success. What I'm I doing wrong? This is my schema: This is my xml: 10 ErrStr1 DO1 DO Unblocked 100 19.1 Good 100 17.1 Good LocalAuto Lable 10 safety Access 10 11 12 true enc 1001.1 100.1 3003.2 100 1 18.1 19.1 2 true 10 The code: IOSignal_paggr iosignalp; xml_schema::document_pimpl doc_p (iosignalp.root_parser (), iosignalp.root_name ()); iosignalp.pre (); doc_p.parse (argv[1]); // Throw exception /Kjell _________________________________________________________________ Hotmail: Free, trusted and rich email service. https://signup.live.com/signup.aspx?id=60969 From boris at codesynthesis.com Sun May 9 03:52:18 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun May 9 03:43:39 2010 Subject: [xsde-users] Valid but XSD/e reports unexpected element In-Reply-To: References: Message-ID: Hi Kjell, Kjell Svensson writes: > xmlns:tns="http://www.example.org/iosystem" > targetNamespace="http://www.example.org/iosystem" > [...] > > The code: > IOSignal_paggr iosignalp; > > xml_schema::document_pimpl doc_p (iosignalp.root_parser (), > iosignalp.root_name ()); Your schema has target namespace so the above two lines should be: xml_schema::document_pimpl doc_p (iosignalp.root_parser (), iosignalp.root_namespace (), iosignalp.root_name ()); Boris From iftroja at live.com Sun May 9 06:33:46 2010 From: iftroja at live.com (Kjell Svensson) Date: Sun May 9 06:33:54 2010 Subject: [xsde-users] Valid but XSD/e reports unexpected element In-Reply-To: References: , Message-ID: Works perfect, thank you. /Kjell > Date: Sun, 9 May 2010 09:52:18 +0200 > From: boris@codesynthesis.com > To: iftroja@live.com > CC: xsde-users@codesynthesis.com > Subject: Re: [xsde-users] Valid but XSD/e reports unexpected element > > Hi Kjell, > > Kjell Svensson writes: > > > > xmlns:tns="http://www.example.org/iosystem" > > targetNamespace="http://www.example.org/iosystem" > > [...] > > > > The code: > > IOSignal_paggr iosignalp; > > > > xml_schema::document_pimpl doc_p (iosignalp.root_parser (), > > iosignalp.root_name ()); > > Your schema has target namespace so the above two lines should > be: > > xml_schema::document_pimpl doc_p (iosignalp.root_parser (), > iosignalp.root_namespace (), > iosignalp.root_name ()); > > Boris _________________________________________________________________ Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. https://signup.live.com/signup.aspx?id=60969 From boris at codesynthesis.com Tue May 11 07:15:03 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue May 11 07:06:33 2010 Subject: [xsde-users] Custom allocators/deallocators In-Reply-To: References: Message-ID: Hi Kjell, mozilla org writes: > A beta is perfect we will not need any xsde release until next year. Ok, the custom allocator feature is ready. Which development platform(s) would you like the beta binaries for? Boris From TRamos at cantorgaming.com Wed May 12 13:46:00 2010 From: TRamos at cantorgaming.com (Ramos, Terence) Date: Wed May 12 13:46:48 2010 Subject: [xsde-users] visual studio project Message-ID: <1D11EEBF3C35004C9CBB14CA3977781304CD452F@TBEXCHMBXPDVS01.na.ad.espeed.com> Hello, I'm trying to create a windows mobile 5.0 and a win32 visual studio 2005 project for xsde 3.1.0. I created an empty project for Windows Mobile 5.0 and win32 and added in all the source from libxsde and also added that as an additional include. For the win32 platform I'm getting these errors: 1>c:\tramos\work\xsde-3.1.0-i686-windows\libxsde\xsde\cxx\hybrid\cdr\ist ream.hxx(17) : fatal error C1083: Cannot open include file: 'ace/CDR_Stream.h': No such file or directory 1>exceptions.cxx 1>istream.cxx 1>c:\tramos\work\xsde-3.1.0-i686-windows\libxsde\xsde\cxx\hybrid\cdr\ist ream.hxx(17) : fatal error C1083: Cannot open include file: 'ace/CDR_Stream.h': No such file or directory 1>ostream.cxx 1>c:\tramos\work\xsde-3.1.0-i686-windows\libxsde\xsde\cxx\hybrid\cdr\ost ream.hxx(17) : fatal error C1083: Cannot open include file: 'ace/CDR_Stream.h': No such file or directory 1>qname.cxx 1>c:\tramos\work\xsde-3.1.0-i686-windows\libxsde\xsde\cxx\hybrid\cdr\ist ream.hxx(17) : fatal error C1083: Cannot open include file: 'ace/CDR_Stream.h': No such file or directory 1>string-sequence.cxx 1>c:\tramos\work\xsde-3.1.0-i686-windows\libxsde\xsde\cxx\hybrid\cdr\ist ream.hxx(17) : fatal error C1083: Cannot open include file: 'ace/CDR_Stream.h': No such file or directory 1>parser-map.cxx 1>c:\tramos\work\xsde-3.1.0-i686-windows\libxsde\xsde\cxx\parser\map.ixx (30) : error C2039: '_dynamic_type' : is not a member of 'xsde::cxx::parser::parser_base' 1> c:\tramos\work\xsde-3.1.0-i686-windows\libxsde\xsde\cxx\parser\elements. hxx(41) : see declaration of 'xsde::cxx::parser::parser_base' 1>sequence.cxx For the windows mobile 5.0 platform I'm getting these errors: 1>..\..\libxsde\xsde\c\expat\xmltok_impl.c(90) : error C2061: syntax error : identifier 'scanComment' 1>..\..\libxsde\xsde\c\expat\xmltok_impl.c(90) : error C2059: syntax error : ';' 1>..\..\libxsde\xsde\c\expat\xmltok_impl.c(90) : error C2059: syntax error : '' 1>..\..\libxsde\xsde\c\expat\xmltok_impl.c(128) : error C2061: syntax error : identifier 'scanDecl' 1>..\..\libxsde\xsde\c\expat\xmltok_impl.c(128) : error C2059: syntax error : ';' 1>..\..\libxsde\xsde\c\expat\xmltok_impl.c(128) : error C2059: syntax error : '' 1>..\..\libxsde\xsde\c\expat\xmltok_impl.c(175) : error C2061: syntax error : identifier 'checkPiTarget' 1>..\..\libxsde\xsde\c\expat\xmltok_impl.c(175) : error C2059: syntax error : ';' 1>..\..\libxsde\xsde\c\expat\xmltok_impl.c(175) : error C2059: syntax error : '' 1>..\..\libxsde\xsde\c\expat\xmltok_impl.c(223) : error C2061: syntax error : identifier 'scanPi' What other settings am I missing? -tr This e-mail is confidential. If you are not named above as an addressee or are not the intended recipient of this e-mail, please notify the sender and immediately delete it. E-mails are susceptible to data corruption, interception, falsification, delay, unauthorised amendment and viruses. You should therefore carry out such virus and other checks as you consider appropriate. Cantor Gaming does not accept liability for any such events or any consequences thereof in respect of e-mails sent or received. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Gaming. The contents of e-mails may be monitored for security purposes. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Cantor Gaming. This email was sent to you by Cantor Gaming. Cantor Gaming is the trading name of Cantor G&W Nevada L.P., a Nevada limited partnership with offices located at 135 East 57th Street, New York, New York 10022, and Cantor G&W International L.P., a limited partnership registered in England (registered number LP010479) with registered office One Churchill Place, Canary Wharf, London E14 5RD. From boris at codesynthesis.com Thu May 13 09:51:30 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu May 13 09:41:09 2010 Subject: [xsde-users] visual studio project In-Reply-To: <1D11EEBF3C35004C9CBB14CA3977781304CD452F@TBEXCHMBXPDVS01.na.ad.espeed.com> References: <1D11EEBF3C35004C9CBB14CA3977781304CD452F@TBEXCHMBXPDVS01.na.ad.espeed.com> Message-ID: Hi Terence, Ramos, Terence writes: > I'm trying to create a windows mobile 5.0 and a win32 visual studio 2005 > project for xsde 3.1.0. I created an empty project for Windows Mobile > 5.0 and win32 and added in all the source from libxsde and also added > that as an additional include. It won't be easy to build the XSD/e runtime library with a VS project. That's the reason why we use nmakefiles for that. The VS projects are just not powerful/customizable enough. Have you considered building libxsde using the standard method (that is, via nmake)? Generally, the libxsde build consists of the following steps: 1. The libxsde/xsde/config.h file is generated based on the configuration read from config/config.nmake. This file contains #define's for various configuration parameters that are, in most cases, named the same as variables in config.nmake. 2. Based on on the configuration read from config/config.nmake, nmakefile creates a list of files that will be compiled and included into the resulting library. Certain files are only include if particular configuration parameters are enabled or disabled. It may be possible to create a VS project that builds the XSD/e runtime library for a specific configuration. For that you will need to create the config.h file manually (or use one created with the recommended build process). Then you will need to add to the project file all the C and C++ files that are compiled in this configuration. To figure out which files to include you will need to study libxsde/xsde/nmakefile. > 1>c:\tramos\work\xsde-3.1.0-i686-windows\libxsde\xsde\cxx\hybrid\cdr\ist > ream.hxx(17) : fatal error C1083: Cannot open include file: > 'ace/CDR_Stream.h': No such file or directory That's because the istream.cxx file is only compiled if XSE_CDR configuration parameter is on. > 1>parser-map.cxx > > 1>c:\tramos\work\xsde-3.1.0-i686-windows\libxsde\xsde\cxx\parser\map.ixx > (30) : error C2039: '_dynamic_type' : is not a member of > 'xsde::cxx::parser::parser_base' Again, this file is only used when polymorphism is enabled. > > 1> > c:\tramos\work\xsde-3.1.0-i686-windows\libxsde\xsde\cxx\parser\elements. > hxx(41) : see declaration of 'xsde::cxx::parser::parser_base' > > 1>sequence.cxx > > > > For the windows mobile 5.0 platform I'm getting these errors: > > > > 1>..\..\libxsde\xsde\c\expat\xmltok_impl.c(90) : error C2061: syntax > error : identifier 'scanComment' xmltok_impl.c should not be explicitly compiled. It is included into the other file. See libxsde/xsde/nmakefile for details. Boris From boris at codesynthesis.com Fri May 14 11:40:16 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri May 14 11:29:55 2010 Subject: [xsde-users] visual studio project Message-ID: Below is a reply from Terence that he sent to me privately. I am re-sending it to the mailing list in case someone else tries to do something similar in the future. From: "Ramos, Terence" Subject: RE: [xsde-users] visual studio project Date: Thu, 13 May 2010 12:00:10 -0400 Hello, Thank you for your response. I'm new to using mail list and didn't know how to reply to my own post to update that I was already successful in making this work. I basically created a program to mimic what the make files are doing and spit out a valid files section for my visual studio project depending on the configurations I needed. I was able to test this for win32 and windows mobile 5.0 and it works great. -tr From boris at codesynthesis.com Tue May 25 09:05:27 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue May 25 08:57:06 2010 Subject: [xsde-users] Re: [xsd-users] xsde hello example: undefined references In-Reply-To: References: Message-ID: Hi Theo, Theo de Vries writes: > I have been using xsde for some time now, with pleasure. I am glad you are enjoying it. In the future please send questions about XSD/e to the xsde-users@codesynthesis.com mailing list instead of xsd-users. > /usr/bin/c++ -fmessage-length=0 -Wl -lpthread -lxsde > CMakeFiles/hello.dir/src/driver.cxx.o > CMakeFiles/hello.dir/generated/hello.cxx.o > CMakeFiles/hello.dir/generated/hello-pimpl.cxx.o > CMakeFiles/hello.dir/generated/hello-pskel.cxx.o -o hello -rdynamic You need to specify '-lxsde' after all the object files, not before. So the above command line should be something like this: /usr/bin/c++ -fmessage-length=0 -Wl -lpthread CMakeFiles/hello.dir/src/driver.cxx.o CMakeFiles/hello.dir/generated/hello.cxx.o CMakeFiles/hello.dir/generated/hello-pimpl.cxx.o CMakeFiles/hello.dir/generated/hello-pskel.cxx.o -lxsde -o hello -rdynamic I am not familiar with CMake so unfortunately I cannot suggest what you may need to change in your FindXSDE.cmake to achieve this. Boris From t.j.a.devries at gmail.com Tue May 25 10:45:12 2010 From: t.j.a.devries at gmail.com (Theo de Vries) Date: Tue May 25 10:54:14 2010 Subject: [xsde-users] Re: [xsd-users] xsde hello example: undefined references In-Reply-To: References: Message-ID: My apologies for having picked the wrong list. Your feedback is very helpful (as usual), I never knew that libs should follow after object files! Thank you. For reference, I have attached a renewed hello example with a corrected CMakeLists.txt; this one actually compiles and runs. As a side note I would like to mention that QtCreator works quite well with cmake-based projects such as this one. Cheers, Theo. 2010/5/25 Boris Kolpackov : > Hi Theo, > > Theo de Vries writes: > >> I have been using xsde for some time now, with pleasure. > > I am glad you are enjoying it. In the future please send questions > about XSD/e to the xsde-users@codesynthesis.com mailing list instead > of xsd-users. > >> /usr/bin/c++ -fmessage-length=0 -Wl -lpthread -lxsde >> CMakeFiles/hello.dir/src/driver.cxx.o >> CMakeFiles/hello.dir/generated/hello.cxx.o >> CMakeFiles/hello.dir/generated/hello-pimpl.cxx.o >> CMakeFiles/hello.dir/generated/hello-pskel.cxx.o -o hello -rdynamic > > You need to specify '-lxsde' after all the object files, not before. > So the above command line should be something like this: > > /usr/bin/c++ -fmessage-length=0 -Wl -lpthread > CMakeFiles/hello.dir/src/driver.cxx.o > CMakeFiles/hello.dir/generated/hello.cxx.o > CMakeFiles/hello.dir/generated/hello-pimpl.cxx.o > CMakeFiles/hello.dir/generated/hello-pskel.cxx.o -lxsde -o hello -rdynamic > > I am not familiar with CMake so unfortunately I cannot suggest what > you may need to change in your FindXSDE.cmake to achieve this. > > Boris > -------------- next part -------------- A non-text attachment was scrubbed... Name: helloworkspace.tar.gz Type: application/x-gzip Size: 113653 bytes Desc: not available Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20100525/1b790f7a/helloworkspace.tar-0001.bin From boris at codesynthesis.com Wed May 26 11:59:24 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed May 26 11:51:17 2010 Subject: [xsde-users] Re: [xsd-users] xsde hello example: undefined references In-Reply-To: References: Message-ID: Hi Theo, Theo de Vries writes: > Your feedback is very helpful (as usual), I never knew that libs > should follow after object files! XSD/e runtime is a static library (archive). For static libraries the linker only links in object files from the archive that are needed by the resulting executable. As a result, the object files need to come first. > For reference, I have attached a renewed hello example with a > corrected CMakeLists.txt; this one actually compiles and runs. Thanks! I have uploaded it to the Wiki: http://wiki.codesynthesis.com/Using_XSDE_with_CMake Boris From jaws75 at tiscali.it Thu May 27 08:50:24 2010 From: jaws75 at tiscali.it (Jaws) Date: Thu May 27 08:50:39 2010 Subject: [xsde-users] Load multiple xml files and combine the data Message-ID: <4BFE6A90.6060002@tiscali.it> Hi all, I was able to work with the library with a singole XML file. I need to add some new data coming from another xml file that will define some other data with the same schema. How can I do this mainteining the previous data and adding the new ones? Thanks Jaws From boris at codesynthesis.com Thu May 27 11:16:25 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu May 27 11:08:31 2010 Subject: [xsde-users] Load multiple xml files and combine the data In-Reply-To: <4BFE6A90.6060002@tiscali.it> References: <4BFE6A90.6060002@tiscali.it> Message-ID: Hi Jaws, Jaws writes: > I need to add some new data coming from another xml file that will > define some other data with the same schema. > > How can I do this mainteining the previous data and adding the new > ones? This depends on what the schema looks like at the point where you want to add new data. The most likely case will probably be adding entries from one sequence of elements to another. For instance, copying books from one library document to another in the 'library' example (see examples/cxx/tree/hybrid/library/). In case of the 'library' example, the book type is variable-length so if you want to make a copy of it to insert into another document then you will need to do it manually (if the element type that you want to copy if fixed-length then you can just copy it with a copy constructor). However, there is a shortcut if you don't need the source document after this operation. In this scenario, instead of copying elements, you can move them from one object model to another by detaching each one from the source document and attaching it to the destination document. Here is how this can be done for the library example: auto_ptr src = ... auto_ptr dst = ... catalog::book_sequence& src_books (src->book ()); catalog::book_sequence& dst_books (dst->book ()); for (catalog::book_iterator i = src_books.begin (); i != src_books.end (); ++i) { book* b = src_books.detach (i); dst_books.push_back (b); } This code fragment removes all the books from src document and adds them at the end of the dst document. Boris From jaws75 at tiscali.it Fri May 28 03:41:39 2010 From: jaws75 at tiscali.it (Jaws) Date: Fri May 28 03:41:45 2010 Subject: [xsde-users] Load multiple xml files and combine the data In-Reply-To: References: <4BFE6A90.6060002@tiscali.it> Message-ID: <4BFF73B3.3030209@tiscali.it> Thanks for you answer. Let's suppose to extend the library example adding in the catalog other elements like DVD and CD. So we will change the schema adding these new classes of records. Let's suppose that you need to add to the original database only the new DVDs. You'll have another XML files, we can call the Xml_update, that report only the new DVD records. How can we manage ths situation? Are we obliged to have the Xml_update file with the same structure to the original databse but with the Book and CD section empty? Or is it possible to read the file that contains only the DVD part? Hope I was clear in the explanation. Thanks in advance Jaws Boris Kolpackov ha scritto: Hi Jaws, Jaws [1] writes: I need to add some new data coming from another xml file that will define some other data with the same schema. How can I do this mainteining the previous data and adding the new ones? This depends on what the schema looks like at the point where you want to add new data. The most likely case will probably be adding entries from one sequence of elements to another. For instance, copying books from one library document to another in the 'library' example (see examples/cxx/tree/hybrid/library/). In case of the 'library' example, the book type is variable-length so if you want to make a copy of it to insert into another document then you will need to do it manually (if the element type that you want to copy if fixed-length then you can just copy it with a copy constructor). However, there is a shortcut if you don't need the source document after this operation. In this scenario, instead of copying elements, you can move them from one object model to another by detaching each one from the source document and attaching it to the destination document. Here is how this can be done for the library example: auto_ptr src = ... auto_ptr dst = ... catalog::book_sequence& src_books (src->book ()); catalog::book_sequence& dst_books (dst->book ()); for (catalog::book_iterator i = src_books.begin (); i != src_books.end (); ++i) { book* b = src_books.detach (i); dst_books.push_back (b); } This code fragment removes all the books from src document and adds them at the end of the dst document. Boris References 1. mailto:jaws75@tiscali.it From boris at codesynthesis.com Fri May 28 06:55:25 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri May 28 06:47:40 2010 Subject: [xsde-users] Load multiple xml files and combine the data In-Reply-To: <4BFF73B3.3030209@tiscali.it> References: <4BFE6A90.6060002@tiscali.it> <4BFF73B3.3030209@tiscali.it> Message-ID: Hi Jaws, Jaws writes: > Let's suppose to extend the library example adding in the catalog other > elements like DVD and CD. So we will change the schema adding these new > classes of records. > Let's suppose that you need to add to the original database only the new > DVDs. You'll have another XML files, we can call the Xml_update, that > report only the new DVD records. > > How can we manage ths situation? Are we obliged to have the Xml_update > file with the same structure to the original databse but with the Book > and CD section empty? Or is it possible to read the file that contains > only the DVD part? It all depends on how this is represent in the schema. Let's say we have the following extended catalog type: Then you can have a document that only contains DVDs and you can iterate over the dvd sequence and copy/move its entries to another document in the same way as I described in my previous email. > Hope I was clear in the explanation. It is hard to understand what you trying to achieve without a concrete schema fragment. Can you modify the 'library' example to demonstrate your use-case? Boris