From Marwijn.Hessel at Alten.nl Fri Aug 2 08:52:38 2013 From: Marwijn.Hessel at Alten.nl (Marwijn Hessel) Date: Fri Aug 2 11:27:09 2013 Subject: [xsde-users] Memory leak in generated code xsde-3.2.0? Message-ID: <001a01ce8f7f$2b6e4ab0$824ae010$@Alten.nl> Dear, Is there a known issue in the generated code of XSDE v3.2.0? The project I'm developing seems to be crashing in 'xsde/cxx/hashmap.cxx' with corrupted memory. Does this ring a bell? Kind regards, Marwijn PS: we use 'xsde cxx-hybrid --no-long-long --no-stl --no-iostream --generate-parser --generate-aggregate --generate-polymorphic --root-element Canvas' PS: the used XSD is attached -------------- next part -------------- A non-text attachment was scrubbed... Name: ScadaInterface.zip Type: application/octet-stream Size: 3583 bytes Desc: not available Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20130802/b6565c3a/ScadaInterface.obj From boris at codesynthesis.com Fri Aug 2 11:33:52 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Aug 2 11:34:22 2013 Subject: [xsde-users] Memory leak in generated code xsde-3.2.0? In-Reply-To: <001a01ce8f7f$2b6e4ab0$824ae010$@Alten.nl> References: <001a01ce8f7f$2b6e4ab0$824ae010$@Alten.nl> Message-ID: Hi Marwijn, Marwijn Hessel writes: > Is there a known issue in the generated code of XSDE v3.2.0? > > The project I'm developing seems to be crashing in 'xsde/cxx/hashmap.cxx' > with corrupted memory. No there are no known memory leaks or memory corruptions. We also test XSD/e extensively with valgrind. > PS: the used XSD is attached If you can also send the test driver and sample XML, I could take a look and see if I can figure what's going on. Boris From rbarr at pdftron.com Fri Aug 2 19:50:34 2013 From: rbarr at pdftron.com (Ryan Barr) Date: Fri Aug 2 19:50:41 2013 Subject: [xsde-users] Error converting Adobe XFA Template schema Message-ID: Hi, I am running into the following error when trying to convert an xsd. error: type 'xs:anyType' specified as the base in simpleContent definition must not have complex content Adobe provides the various XFA schemas as Relax:Next Generation format. Using TRANG I converted the rng file to an xsd file. When I run xsde on the generated xsd file I get the error above. Below are the pertinent xsd lines ... * * example usage is "xsde.exe cxx-hybrid --generate-parser template.xsd thanks! [TRANG] http://www.thaiopensource.com/relaxng/trang.html From boris at codesynthesis.com Mon Aug 5 08:47:20 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Aug 5 08:47:51 2013 Subject: [xsde-users] Error converting Adobe XFA Template schema In-Reply-To: References: Message-ID: Hi Ryan, Ryan Barr writes: > > * * I believe it is illegal in XML Schema to derive simple content restriction from complex content, which xs:anyType is. Changing xs:anyType to xs:anySimpleType or, better yet, getting rid of the restriction altogether should solve this problem. Boris From Marwijn.Hessel at Alten.nl Tue Aug 6 10:38:20 2013 From: Marwijn.Hessel at Alten.nl (Marwijn Hessel) Date: Tue Aug 6 10:56:34 2013 Subject: [xsde-users] XML parsing on a LPC4357 ARM environment fails Message-ID: <000c01ce92b2$99371140$cba533c0$@Alten.nl> Dear, We are trying to make the generated code work on a LPC4357 ARM environment with FreeRTOS. The main problem is parsing of the XML data. This example works on the LPC4357 target: Gyro Compass The next example does not work on the LPC4357 target: Gyro Compass The second example does not give any exception (or likewise), it triggers a hard fault. Which means the CPU is crashed. In the attachment you find the XSD and XML files we want to use in the project. The XSD/e version we use is v3.2.0. We have also added a test source file, main.cpp. We try to parse a snippet of our xml file using the generated XSD/e classes from our XSD file. Both example snippets can be found in the source file. Addition information about the LPC4357 you can find here: http://www.embeddedartists.com/products/kits/lpc4357_kit.php The compiler used is Yagarto (is GCC for ARM) which you can find here: http://www.emb4fun.de/archive/gabmt/index.html Kind regards, Marwijn PS: At the moment I'm working for Alphatron (see http://www.alphatron.nl/), can you provide us additional information about a support contract? -------------- next part -------------- A non-text attachment was scrubbed... Name: ScadaInterface.zip Type: application/octet-stream Size: 7370 bytes Desc: not available Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20130806/f3d892be/ScadaInterface.obj From rbarr at pdftron.com Tue Aug 6 20:49:59 2013 From: rbarr at pdftron.com (Ryan Barr) Date: Tue Aug 6 20:50:07 2013 Subject: [xsde-users] Error converting Adobe XFA Template schema In-Reply-To: References: Message-ID: Thanks for the info. I was finally able to generate an xsd after simply switching the xfa boolean type to the xmlschema boolean primitive, plus some other modifications. Now to find out if it actually works at runtime or not. On 5 August 2013 05:47, Boris Kolpackov wrote: > Hi Ryan, > > Ryan Barr writes: > > > > > * * > > I believe it is illegal in XML Schema to derive simple content > restriction from complex content, which xs:anyType is. Changing > xs:anyType to xs:anySimpleType or, better yet, getting rid of > the restriction altogether should solve this problem. > > Boris > From boris at codesynthesis.com Wed Aug 7 10:29:09 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Aug 7 10:29:39 2013 Subject: [xsde-users] XML parsing on a LPC4357 ARM environment fails In-Reply-To: <000c01ce92b2$99371140$cba533c0$@Alten.nl> References: <000c01ce92b2$99371140$cba533c0$@Alten.nl> Message-ID: Hi Marwijn, Marwijn Hessel writes: > scale="1.0" > > The second example does not give any exception (or likewise), it triggers a > hard fault. Which means the CPU is crashed. One difference that I noticed between the two examples is the presence of a floating point value (scale) in the second example. This also happens to be a tricky area in embedded systems with soft/hard float support. The symptoms also fit (i.e., a target crash). So you may want to make sure your build your application and the XSD/e runtime with the correct floating-point compiler flags. > In the attachment you find the XSD and XML files we want to use in the > project. The XSD/e version we use is v3.2.0. Thanks for the test case. I built it on my x86 Linux box and both fragments parse without any problems. I also ran it under valgrind which showed no memory-related issues whatsoever. Boris From rbarr at pdftron.com Wed Aug 7 19:16:34 2013 From: rbarr at pdftron.com (Ryan Barr) Date: Wed Aug 7 19:16:41 2013 Subject: [xsde-users] Handling multiple versions of the 'same' schema (e.g. Adobe XFA schemas) Message-ID: I got the hybrid parser to successfully read xml based on the http://www.xfa.org/schema/xfa-template/3.3/ schema (see previous posting). The problem is, I need to be able to parse earlier versions of the XFA schema. As you can see here, http://partners.adobe.com/public/developer/xml/index_arch.html, there are 10 older versions of this schema. For example I built against http://www.xfa.org/schema/xfa-template/3.3/ but would like to also parse http://www.xfa.org/schema/xfa-template/3.1/ Everything is fine when the input xml is version 3.3 (the one I ran code synthesis against), however, I get an "unexpected element encountered" exception when I call xml_schema::document_pimpl::parse() on xml from an earlier version of the schema (e.g. 3.1). Is it possible to handle older versions of a schema? Or do I have to rinse, lather, repeat everything, getting a total of 11 sets of c++ files? This would also mean separate namespaces, and figuring out at runtime which namespace to use!?! Has anyone else ran into this situation, I couldn't find anything in the mailing list? thanks! From boris at codesynthesis.com Thu Aug 8 10:27:08 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Aug 8 10:27:38 2013 Subject: [xsde-users] Handling multiple versions of the 'same' schema (e.g. Adobe XFA schemas) In-Reply-To: References: Message-ID: Hi Ryan, Ryan Barr writes: > The problem is, I need to be able to parse earlier versions of the XFA > schema. > > Is it possible to handle older versions of a schema? This is a tricky area and the answer to your question depends on whether the schemas were designed with evolution in mind. My guess is they were not. XSD/e in fact provides support for schema evolution (see examples in the examples/cxx/hybrid/evolution/ directory) but it requires that you evolve your schemas in a certain way. You can try to see what are the differences from version to version of your schema and if you can transform it to what's expected by XSD/e. > Or do I have to rinse, lather, repeat everything, getting a total > of 11 sets of c++ files? This would also mean separate namespaces, > and figuring out at runtime which namespace to use!?! Yes, that would be the "brute force" approach if the above does not work. Boris From Hicham.ELMOUADDINE-prestataire at ca-cib.com Thu Aug 22 09:27:49 2013 From: Hicham.ELMOUADDINE-prestataire at ca-cib.com (EL MOUADDINE, Hicham (Prestataire)) Date: Thu Aug 22 10:53:52 2013 Subject: [xsde-users] --export-symbol option for xsde. Message-ID: <7AD626C7FE8626438D202B64D510E2D5AC5B@EMMXPA019.emea.cib> Hello, I have to add export symbols to generated types. Is there any way to add "__declspec(dllexport)" to my classes? Thank you in advance for the answer. This message and any attachments are intended for the sole use of its addressee. If you are not the addressee, please immediately notify the sender and then destroy the message. As this message and/or any attachments may have been altered without our knowledge, its content is not legally binding on Cr?dit Agricole Corporate and Investment Bank. All rights reserved. Ce message et ses pi?ces jointes sont destin?s ? l'usage exclusif de leur destinataire. Si vous recevez ce message par erreur, merci d'en aviser imm?diatement l'exp?diteur et de le d?truire ensuite. Le pr?sent message pouvant ?tre alt?r? ? notre insu, Cr?dit Agricole Corporate and Investment Bank ne peut pas ?tre engag? par son contenu. Tous droits r?serv?s. From boris at codesynthesis.com Fri Aug 23 06:59:10 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Aug 23 07:00:24 2013 Subject: [xsde-users] --export-symbol option for xsde. In-Reply-To: <7AD626C7FE8626438D202B64D510E2D5AC5B@EMMXPA019.emea.cib> References: <7AD626C7FE8626438D202B64D510E2D5AC5B@EMMXPA019.emea.cib> Message-ID: Hi, EL MOUADDINE, Hicham (Prestataire) writes: > I have to add export symbols to generated types. > > Is there any way to add "__declspec(dllexport)" to my classes? No, there is currently no automatic way to do this. XSD/e is primarily used for mobile/embedded targets where it is normally not necessary to package the generated code into DLLs. Having said that, we can add this option for the next release and I can build you a pre-release binary with this feature. Let me know if you are interested. Boris From Hicham.ELMOUADDINE-prestataire at ca-cib.com Fri Aug 23 08:59:16 2013 From: Hicham.ELMOUADDINE-prestataire at ca-cib.com (EL MOUADDINE, Hicham (Prestataire)) Date: Fri Aug 23 09:04:11 2013 Subject: [xsde-users] --export-symbol option for xsde. In-Reply-To: References: <7AD626C7FE8626438D202B64D510E2D5AC5B@EMMXPA019.emea.cib> Message-ID: <7AD626C7FE8626438D202B64D510E2D5AD87@EMMXPA019.emea.cib> Hi Boris, Thank you very much for the answer. I use xsde in a non embedded target, and I 'm interested in xsde because of it low memory footprint (comparing to xsd). I've managed to solve my problem using a perl script and replacing the "class" keyword in the output files. I can wait for the feature for next releases (if possible). Hicham. -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Friday, August 23, 2013 12:59 PM To: EL MOUADDINE, Hicham (Prestataire) Cc: xsde-users@codesynthesis.com Subject: Re: [xsde-users] --export-symbol option for xsde. Hi, EL MOUADDINE, Hicham (Prestataire) writes: > I have to add export symbols to generated types. > > Is there any way to add "__declspec(dllexport)" to my classes? No, there is currently no automatic way to do this. XSD/e is primarily used for mobile/embedded targets where it is normally not necessary to package the generated code into DLLs. Having said that, we can add this option for the next release and I can build you a pre-release binary with this feature. Let me know if you are interested. Boris This message and any attachments are intended for the sole use of its addressee. If you are not the addressee, please immediately notify the sender and then destroy the message. As this message and/or any attachments may have been altered without our knowledge, its content is not legally binding on Cr?dit Agricole Corporate and Investment Bank. All rights reserved. Ce message et ses pi?ces jointes sont destin?s ? l'usage exclusif de leur destinataire. Si vous recevez ce message par erreur, merci d'en aviser imm?diatement l'exp?diteur et de le d?truire ensuite. Le pr?sent message pouvant ?tre alt?r? ? notre insu, Cr?dit Agricole Corporate and Investment Bank ne peut pas ?tre engag? par son contenu. Tous droits r?serv?s.