From boris at codesynthesis.com Tue Dec 1 09:04:06 2015 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Dec 1 09:04:06 2015 Subject: [xsde-users] Re: Polymorphic type is serialized as based In-Reply-To: References: Message-ID: Hi Andrey, Andrey Filimonov writes: > Do you mean it doesn't assign prefixes specifically when serializing > polymorphic types? Because for non polymorphic types it assigns perfectly. The underlying, low-level serializer (genx) assigns prefixes automatically when one writes attributes/elements with un-mapped namespaces. Here we are talking about the xsi:type attribute. genx has no idea about its semantics thus the higher level code has to translate the dynamic type's namespace to a prefix. That's what XSD/e serializer runtime does in set_type(). It, however, doesn't automatically add a mapping if there isn't one already. In real life, any self-respecting application will assign meaningful prefixed instead of generating XML with a p1, p2, etc. Boris From andrey.v.filimonov at gmail.com Fri Dec 4 19:36:53 2015 From: andrey.v.filimonov at gmail.com (Andrey Filimonov) Date: Fri Dec 4 19:37:01 2015 Subject: [xsde-users] Re: Polymorphic type is serialized as based In-Reply-To: References: Message-ID: Many thanks, Boris, Adding namespace mapping made it work. As for assigning meaningful names, generally i agree, but for embedded applications this may be arguable. The generated/parsed xmls [at least in my case] are never meant to be human readable. At the same time assigning meaningful [we should read human readable] prefixes will cause size increase which may be a problem for resource-limited embedded platforms. Andrey. 2015-12-01 17:04 GMT+03:00 Boris Kolpackov : > Hi Andrey, > > Andrey Filimonov writes: > > > Do you mean it doesn't assign prefixes specifically when serializing > > polymorphic types? Because for non polymorphic types it assigns > perfectly. > > The underlying, low-level serializer (genx) assigns prefixes automatically > when one writes attributes/elements with un-mapped namespaces. Here we are > talking about the xsi:type attribute. genx has no idea about its semantics > thus the higher level code has to translate the dynamic type's namespace to > a prefix. That's what XSD/e serializer runtime does in set_type(). It, > however, doesn't automatically add a mapping if there isn't one already. > > In real life, any self-respecting application will assign meaningful > prefixed instead of generating XML with a p1, p2, etc. > > Boris > From andrey.v.filimonov at gmail.com Fri Dec 4 20:07:39 2015 From: andrey.v.filimonov at gmail.com (Andrey Filimonov) Date: Fri Dec 4 20:07:46 2015 Subject: [xsde-users] Parser fails to recognize a substitution Message-ID: Hello, i'm having definitions of the elements and types as follows: Signal values for events and baselines Both xsd files are compiled in a single xsde pass. When i try to parse xml like this PT1M 0 5.0 parsing fails because parser expects streamPayloadBase and not signalPayload which can substitute streamPayloadBase. Substitution map for streamPayloadBase is empty. Best wishes, Andrey. From Chris.Jones at helvar.com Tue Dec 8 06:37:33 2015 From: Chris.Jones at helvar.com (Jones Chris) Date: Tue Dec 8 06:37:41 2015 Subject: [xsde-users] Polymorphic crash. Message-ID: <8C88D4BF58EFE4488D13924F71A00D06CE839C@servex10.Service.asp> Hi Boris, I'm currently working on a system where we are using your XSDe system to help us generate polymorphic structures, however I seem to have found a problem causing the XSDe Utility to crash. Using 3.2.0 on a windows 7 system. Take the two xsd files And And using the command : xsde.exe cxx-hybrid --output-dir "out" --generate-parser --generate-aggregate --generate-polymorphic --root-element EntitiesTest2 --no-long-long --polymorphic-type ProductBaseTest2 --polymorphic-type ControlledLoadTest2 --polymorphic-type EntityTest2 --namespace-map http://www.w3.org/2001/XMLSchema=XMLEntities "Test1.xsd" "Test2.xsd" And the result is "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." I have played around with this a little bit and there are some salient bits of information. If you move the "SDIMLoad" out of its own schema and into the other one, everything is fine, in fact you can inherit to your hearts delight and the code generated is as expected. If you inherit "SDIMLoad" from "ProductBaseTest2" as opposed to "ControlledLoadTest2" then things seem to work, and the generated code is as expected. If there's any other information I can supply for you please just ask. Chris Jones -------------- next part -------------- A non-text attachment was scrubbed... Name: Test1.xsd Type: text/xml Size: 1224 bytes Desc: Test1.xsd Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20151208/5011ced2/Test1.xml -------------- next part -------------- A non-text attachment was scrubbed... Name: Test2.xsd Type: text/xml Size: 802 bytes Desc: Test2.xsd Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20151208/5011ced2/Test2.bin From boris at codesynthesis.com Tue Dec 8 10:21:30 2015 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Dec 8 10:21:34 2015 Subject: [xsde-users] Polymorphic crash. In-Reply-To: <8C88D4BF58EFE4488D13924F71A00D06CE839C@servex10.Service.asp> References: <8C88D4BF58EFE4488D13924F71A00D06CE839C@servex10.Service.asp> Message-ID: Hi Chris, Jones Chris writes: > Using 3.2.0 on a windows 7 system. Could you try the 3.3.0 pre-release and see if the problem is still there? http://codesynthesis.com/~boris/tmp/xsde/xsde-3.3.0.a7-i686-windows.zip Thanks, Boris From boris at codesynthesis.com Tue Dec 8 10:35:25 2015 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Dec 8 10:35:28 2015 Subject: [xsde-users] Parser fails to recognize a substitution In-Reply-To: References: Message-ID: Hi Andrey, Andrey Filimonov writes: > parsing fails because parser expects streamPayloadBase and not > signalPayload which can substitute streamPayloadBase. Substitution map > for streamPayloadBase is empty. Can you re-read Sections 3.7, "Support for Polymorphism" and 4.10 "Polymorphic Object Models" and see if you missed anything? In particular, things get tricky when your polymorphic hierarchy is spread out over multiple schemas. If that doesn't help, I would need a small but complete test case that reproduces the problem. Boris From Chris.Jones at helvar.com Wed Dec 9 07:30:44 2015 From: Chris.Jones at helvar.com (Jones Chris) Date: Wed Dec 9 07:30:48 2015 Subject: [xsde-users] Polymorphic crash. In-Reply-To: References: <8C88D4BF58EFE4488D13924F71A00D06CE839C@servex10.Service.asp> Message-ID: <8C88D4BF58EFE4488D13924F71A00D06CE83DA@servex10.Service.asp> Sorry Boris, the problem is still there. Exactly the same outcome (i.e. a crash). Chris Jones -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: 08 December 2015 15:22 To: Jones Chris Cc: xsde-users@codesynthesis.com Subject: Re: [xsde-users] Polymorphic crash. Hi Chris, Jones Chris writes: > Using 3.2.0 on a windows 7 system. Could you try the 3.3.0 pre-release and see if the problem is still there? http://codesynthesis.com/~boris/tmp/xsde/xsde-3.3.0.a7-i686-windows.zip Thanks, Boris From boris at codesynthesis.com Thu Dec 10 09:36:22 2015 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Dec 10 09:36:23 2015 Subject: [xsde-users] Polymorphic crash. In-Reply-To: <8C88D4BF58EFE4488D13924F71A00D06CE83DA@servex10.Service.asp> References: <8C88D4BF58EFE4488D13924F71A00D06CE839C@servex10.Service.asp> <8C88D4BF58EFE4488D13924F71A00D06CE83DA@servex10.Service.asp> Message-ID: Hi Chris, Ok, I've fixed this bug, thanks for the report and the test case (and verifying that it was still an issue with the latest pre-release). Here is the new pre-release with the fix: http://codesynthesis.com/~boris/tmp/xsde/xsde-3.3.0.a8-i686-windows.zip Could you try it and let me know if there are any issues? Thanks, Boris From Chris.Jones at helvar.com Fri Dec 11 07:13:53 2015 From: Chris.Jones at helvar.com (Jones Chris) Date: Fri Dec 11 07:13:58 2015 Subject: [xsde-users] Polymorphic crash. In-Reply-To: References: <8C88D4BF58EFE4488D13924F71A00D06CE839C@servex10.Service.asp> <8C88D4BF58EFE4488D13924F71A00D06CE83DA@servex10.Service.asp> Message-ID: <8C88D4BF58EFE4488D13924F71A00D06CE845F@servex10.Service.asp> Hi Boris, Thanks for the quick turnaround A little bit of jiggling of our XDS's was required (Looks like the old version was happy with some XSD sloppiness) but that new version seems to have fixed the problem we were having... and the generated code looks correct. Thanks for your help. Chris Jones -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: 10 December 2015 14:36 To: Jones Chris Cc: xsde-users@codesynthesis.com Subject: Re: [xsde-users] Polymorphic crash. Hi Chris, Ok, I've fixed this bug, thanks for the report and the test case (and verifying that it was still an issue with the latest pre-release). Here is the new pre-release with the fix: http://codesynthesis.com/~boris/tmp/xsde/xsde-3.3.0.a8-i686-windows.zip Could you try it and let me know if there are any issues? Thanks, Boris From Jonathan.Haws at sdl.usu.edu Wed Dec 16 11:21:28 2015 From: Jonathan.Haws at sdl.usu.edu (Jonathan Haws) Date: Wed Dec 16 11:21:37 2015 Subject: [xsde-users] Polymorphic crash. References: <8C88D4BF58EFE4488D13924F71A00D06CE839C@servex10.Service.asp> <8C88D4BF58EFE4488D13924F71A00D06CE83DA@servex10.Service.asp> Message-ID: Boris, Do you have a Linux build of the latest version? Or is there a way to build the xsde tool that I am forgetting? Thanks! Jon On 12/10/2015 07:36 AM, Boris Kolpackov wrote: > Hi Chris, > > Ok, I've fixed this bug, thanks for the report and the test case (and > verifying that it was still an issue with the latest pre-release). Here > is the new pre-release with the fix: > > http://codesynthesis.com/~boris/tmp/xsde/xsde-3.3.0.a8-i686-windows.zip > > Could you try it and let me know if there are any issues? > > Thanks, > Boris > > -- Jonathan R. Haws Embedded Engineer Space Dynamics Laboratory (435) 713-3489 jhaws@sdl.usu.edu From boris at codesynthesis.com Thu Dec 17 10:01:01 2015 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Dec 17 10:00:58 2015 Subject: [xsde-users] Polymorphic crash. In-Reply-To: References: <8C88D4BF58EFE4488D13924F71A00D06CE839C@servex10.Service.asp> <8C88D4BF58EFE4488D13924F71A00D06CE83DA@servex10.Service.asp> Message-ID: Hi Jonathan, Jonathan Haws writes: > Do you have a Linux build of the latest version? Here you go: http://codesynthesis.com/~boris/tmp/xsde/xsde-3.3.0.a8-x86_64-linux-gnu.tar.bz2 Boris