From andrew.j.chalk at lmco.com Wed Feb 15 15:27:29 2017 From: andrew.j.chalk at lmco.com (Chalk, Andrew J) Date: Thu Feb 16 11:32:57 2017 Subject: EXTERNAL: Re: [xsd-users] XSD Forward Declaration Bug In-Reply-To: References: <9FFFD432B44ECB4EAAEE296EF2765BEAAA1992@HVXDSP45.us.lmco.com> Message-ID: <9FFFD432B44ECB4EAAEE296EF2765BEAAA4048@HVXDSP45.us.lmco.com> See my email to you of yesterday. It has source code attached that illustrates the bugs we discussed. Best Regards, Andrew -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Thursday, January 19, 2017 8:59 AM To: Chalk, Andrew J (US N-AMERICAN CYBERSYSTEMS) Cc: xsd-users@codesynthesis.com Subject: EXTERNAL: Re: [xsd-users] XSD Forward Declaration Bug Hi Andrew, Chalk, Andrew J writes: > XSD 4.0.0. for Linux appears to have a bug in the C++ it generates. > It creates incomplete types to provide declarations of classes. The > problem is, it does this when the class is used in the translation > unit in the definition of a derived class. I.e. > > Class A; > > class B : public A > { > // content > }; > > Since the size of incomplete type A is unknown, the compilation fails. > > Can you replicate this? It's hard to reproduce things just from the description of an error. But I remember we've fixed something similar for 4.1.0. Can you try this pre- release as a first step: http://codesynthesis.com/~boris/tmp/xsd/xsd-4.1.0.a8-x86_64-linux-gnu.tar.bz2 Boris From boris at codesynthesis.com Fri Feb 17 09:43:47 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Feb 17 09:43:55 2017 Subject: EXTERNAL: Re: [xsd-users] XSD Forward Declaration Bug In-Reply-To: <9FFFD432B44ECB4EAAEE296EF2765BEAAA4048@HVXDSP45.us.lmco.com> References: <9FFFD432B44ECB4EAAEE296EF2765BEAAA1992@HVXDSP45.us.lmco.com> <9FFFD432B44ECB4EAAEE296EF2765BEAAA4048@HVXDSP45.us.lmco.com> Message-ID: Hi Andrew, Thanks for sending the schemas. I took a look and the problem is circular inclusion that involves inheritance. These is no way to map such schemas in the file-per-schema mode and one has to use the file-per-type mode instead. This post has more information on the problem: http://www.codesynthesis.com/~boris/blog/2008/02/13/codesynthesis-xsd-3-1-0-released/ I've compiled your schemas like this (note that now you only compile the "root" schema of your vocabulary): $ xsd cxx-tree --output-dir out --file-per-type data.xsd Then the generated code compiles without any problems: $ g++ out/*.cxx Boris From ben at nebland.com Tue Feb 21 18:05:29 2017 From: ben at nebland.com (Benjamin DuPont) Date: Tue Feb 21 18:05:54 2017 Subject: [xsd-users] reduce size of generated code In-Reply-To: References: <9FFFD432B44ECB4EAAEE296EF2765BEAAA1992@HVXDSP45.us.lmco.com> <9FFFD432B44ECB4EAAEE296EF2765BEAAA4048@HVXDSP45.us.lmco.com> Message-ID: <117a23e6-9396-08ad-1fc8-fbbc771902aa@nebland.com> I'm working with some fairly large and complex schemas which result in a large code base. Does anyone have tips for reducing the size of the generated code? Is there a way to remove generation of the smart pointer setters? Ben From ben at nebland.com Tue Feb 21 20:20:28 2017 From: ben at nebland.com (Benjamin DuPont) Date: Tue Feb 21 20:20:44 2017 Subject: [xsd-users] Incomplete type In-Reply-To: References: Message-ID: The schema files I'm using are quite complex. When I generate source (using xsd or xsd/e) without the --file-per-type option, I get *error: invalid use of incomplete type* compile errors. I ran across this thread: http://codesynthesis.com/pipermail/xsd-users/2017-January/004856.html. The 4.1 version has the same issue. When I generate code with the file-per-type option, the generator outputs: warning D002: --extern-xml-schema is recommended when --file-per-type is specified to reduce generated code size I've tried unsuccessfully to use this option along with --generate-xml-schema. Any tips as to how to use this feature? Ben From boris at codesynthesis.com Wed Feb 22 11:33:16 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Feb 22 11:33:24 2017 Subject: [xsd-users] Incomplete type In-Reply-To: References: Message-ID: Hi Benjamin, Please don't send a new question by replying to an existing email (even if changing the subject) since it breaks email threading. Benjamin DuPont writes: > When I generate code with the file-per-type option, the generator outputs: > warning D002: --extern-xml-schema is recommended when --file-per-type is > specified to reduce generated code size > > I've tried unsuccessfully to use this option along with > --generate-xml-schema. Any tips as to how to use this feature? This release announcement has some details: http://www.codesynthesis.com/~boris/blog/2008/02/13/codesynthesis-xsd-3-1-0-released/ From boris at codesynthesis.com Wed Feb 22 11:41:37 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Feb 22 11:41:46 2017 Subject: [xsd-users] reduce size of generated code In-Reply-To: <117a23e6-9396-08ad-1fc8-fbbc771902aa@nebland.com> References: <9FFFD432B44ECB4EAAEE296EF2765BEAAA1992@HVXDSP45.us.lmco.com> <9FFFD432B44ECB4EAAEE296EF2765BEAAA4048@HVXDSP45.us.lmco.com> <117a23e6-9396-08ad-1fc8-fbbc771902aa@nebland.com> Message-ID: Hi Benjamin, Again, please don't send a new question by replying to an existing email (even if changing the subject) since it breaks email threading. Benjamin DuPont writes: > I'm working with some fairly large and complex schemas which result in a > large code base. Does anyone have tips for reducing the size of the > generated code? There is no magic, unfortunately. If the schema is complex, then the generated code will unfortunately be substantial. XSD already does does a long way in trying to weed out duplicate types, etc. > Is there a way to remove generation of the smart pointer setters? All the available options are listed in the compiler manual (man page): http://codesynthesis.com/projects/xsd/documentation/xsd.xhtml In particular, look for --suppress-* options. Boris From ben at nebland.com Wed Feb 22 13:56:02 2017 From: ben at nebland.com (Benjamin DuPont) Date: Wed Feb 22 13:56:15 2017 Subject: [xsd-users] file-per-type Message-ID: <4adb431f-cfa5-4e18-8e49-e2ca2cd8fa84@nebland.com> The I've done some experimenting with file-per-type following the example here: http://www.codesynthesis.com/~boris/blog/2008/02/13/codesynthesis-xsd-3-1-0-released/ The generated header file seems to be missing includes and definitions so the resulting code doesn't compile. I get errors such as: error: declaration of ?operator< References: <4adb431f-cfa5-4e18-8e49-e2ca2cd8fa84@nebland.com> Message-ID: Hi Benjamin, Benjamin DuPont writes: > The generated header file seems to be missing includes and definitions so > the resulting code doesn't compile. I get errors such as: > > error: declaration of ?operator< operator<< (::xml_schema::list_stream&, > > I copied a header section from a file that was generated with the > --file-per-type option and that fixed the issues. I am not sure what section you copied from which file to where, but if you are using --generate-xml-schema/--extern-xml-schema options, then make sure you pass exactly the same --generate-*/--suppress-*/etc options to the --generate-xml-schema invocation as to the ones when you compile your schemas. Boris From laasunde at hotmail.com Mon Feb 27 11:40:43 2017 From: laasunde at hotmail.com (Lars) Date: Mon Feb 27 11:41:06 2017 Subject: [xsd-users] VS2015 support Message-ID: Hello, When will XSD add support for Visual Studio 2015? kind regards, Lars From andrew.j.chalk at lmco.com Mon Feb 27 08:55:39 2017 From: andrew.j.chalk at lmco.com (Chalk, Andrew J) Date: Mon Feb 27 12:14:41 2017 Subject: EXTERNAL: Re: [xsd-users] XSD Forward Declaration Bug In-Reply-To: References: <9FFFD432B44ECB4EAAEE296EF2765BEAAA1992@HVXDSP45.us.lmco.com> <9FFFD432B44ECB4EAAEE296EF2765BEAAA4048@HVXDSP45.us.lmco.com> Message-ID: <9FFFD432B44ECB4EAAEE296EF2765BEAAA438B@HVXDSP45.us.lmco.com> Cool! I just got back after a week's vacation but will take a look at these now. Best, - A -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Friday, February 17, 2017 8:44 AM To: Chalk, Andrew J (US N-AMERICAN CYBERSYSTEMS) Cc: xsd-users@codesynthesis.com Subject: Re: EXTERNAL: Re: [xsd-users] XSD Forward Declaration Bug Hi Andrew, Thanks for sending the schemas. I took a look and the problem is circular inclusion that involves inheritance. These is no way to map such schemas in the file-per-schema mode and one has to use the file-per-type mode instead. This post has more information on the problem: http://www.codesynthesis.com/~boris/blog/2008/02/13/codesynthesis-xsd-3-1-0-released/ I've compiled your schemas like this (note that now you only compile the "root" schema of your vocabulary): $ xsd cxx-tree --output-dir out --file-per-type data.xsd Then the generated code compiles without any problems: $ g++ out/*.cxx Boris From bernhard.rapp at student.tugraz.at Tue Feb 28 03:13:41 2017 From: bernhard.rapp at student.tugraz.at (Bernhard Rapp) Date: Tue Feb 28 03:14:04 2017 Subject: [xsd-users] VS2015 support In-Reply-To: References: Message-ID: <15988936-dc8e-357d-f08a-2d2062ea23a7@student.tugraz.at> Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: OpenPGP digital signature Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20170228/d9e5832b/signature.pgp From laasunde at hotmail.com Tue Feb 28 03:55:04 2017 From: laasunde at hotmail.com (Lars) Date: Tue Feb 28 03:55:18 2017 Subject: SV: [xsd-users] VS2015 support In-Reply-To: <15988936-dc8e-357d-f08a-2d2062ea23a7@student.tugraz.at> References: , <15988936-dc8e-357d-f08a-2d2062ea23a7@student.tugraz.at> Message-ID: hello, Apologize for not being clear in the orginal post. The release note for XSD 4.0 states "This release also adds support for Clang as well as Visual Studio 2012 (11.0) and 2013 (12.0), including project/solution files for all the examples. The .msi package also includes pre-built Xerces-C++ libraries for these versions of VC++." http://www.codesynthesis.com/pipermail/xsd-announcements/2014/000041.html We wanted to know if XSD 4.0 supports VS2015 and when it will be updated with VS2015 project files for example etc? Kind regards, Lars [xsd-announcements] XSD 4.0.0 released www.codesynthesis.com Hi, We have released XSD 4.0.0. The NEWS file entries for this release are as follows: * Xerces-C++ 2-series (2.8.0 and earlier) is no longer supported. ________________________________ Fra: Bernhard Rapp Sendt: 28. februar 2017 09:13 Til: laasunde@hotmail.com Kopi: xsd-users@codesynthesis.com Emne: Re: [xsd-users] VS2015 support Dear Lars, if I understood your question correctly, please see this wiki page: http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studio#Visual_Studio_201X_.281X.0.29 Using XSD with Microsoft Visual Studio - Code Synthesis Wiki wiki.codesynthesis.com This page discusses various ways of integrating the XSD compiler with the Microsoft Visual Studio IDE as well as other Visual Studio-specific topics. I followed these instruction, and xsd works like a charm with VS2015. Best regards, Bernhard On 27.02.2017 17:40, Lars wrote: > Hello, > > > When will XSD add support for Visual Studio 2015? > > > kind regards, Lars From laasunde at hotmail.com Tue Feb 28 03:59:44 2017 From: laasunde at hotmail.com (Lars) Date: Tue Feb 28 03:59:59 2017 Subject: SV: [xsd-users] VS2015 support In-Reply-To: References: , <15988936-dc8e-357d-f08a-2d2062ea23a7@student.tugraz.at>, Message-ID: I would also like to add that VS2015 is not listed in supported compilers list. http://www.codesynthesis.com/products/xsd/platforms.xhtml Kind regards, Lars CodeSynthesis XSD - Supported Platforms and Compilers www.codesynthesis.com Supported Platforms and C++ Compilers. CodeSynthesis XSD is written in standard C++ and any modern C++ compiler should be able to compile the generated code. ________________________________ Fra: xsd-users-bounces@codesynthesis.com p? vegne av Lars Sendt: 28. februar 2017 09:55 Til: Bernhard Rapp Kopi: xsd-users@codesynthesis.com Emne: SV: [xsd-users] VS2015 support hello, Apologize for not being clear in the orginal post. The release note for XSD 4.0 states "This release also adds support for Clang as well as Visual Studio 2012 (11.0) and 2013 (12.0), including project/solution files for all the examples. The .msi package also includes pre-built Xerces-C++ libraries for these versions of VC++." http://www.codesynthesis.com/pipermail/xsd-announcements/2014/000041.html [xsd-announcements] XSD 4.0.0 released www.codesynthesis.com Hi, We have released XSD 4.0.0. The NEWS file entries for this release are as follows: * Xerces-C++ 2-series (2.8.0 and earlier) is no longer supported. We wanted to know if XSD 4.0 supports VS2015 and when it will be updated with VS2015 project files for example etc? Kind regards, Lars [xsd-announcements] XSD 4.0.0 released [xsd-announcements] XSD 4.0.0 released www.codesynthesis.com Hi, We have released XSD 4.0.0. The NEWS file entries for this release are as follows: * Xerces-C++ 2-series (2.8.0 and earlier) is no longer supported. www.codesynthesis.com Code Synthesis: Open Source C++ Development Tools www.codesynthesis.com Code Synthesis is a systems software development company with a focus on build systems, object persistence, domain-specific languages (DSL) and their ... Hi, We have released XSD 4.0.0. The NEWS file entries for this release are as follows: * Xerces-C++ 2-series (2.8.0 and earlier) is no longer supported. ________________________________ Fra: Bernhard Rapp Sendt: 28. februar 2017 09:13 Til: laasunde@hotmail.com Kopi: xsd-users@codesynthesis.com Emne: Re: [xsd-users] VS2015 support Dear Lars, if I understood your question correctly, please see this wiki page: http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studio#Visual_Studio_201X_.281X.0.29 Using XSD with Microsoft Visual Studio - Code Synthesis Wiki wiki.codesynthesis.com This page discusses various ways of integrating the XSD compiler with the Microsoft Visual Studio IDE as well as other Visual Studio-specific topics. Using XSD with Microsoft Visual Studio - Code Synthesis Wiki wiki.codesynthesis.com This page discusses various ways of integrating the XSD compiler with the Microsoft Visual Studio IDE as well as other Visual Studio-specific topics. I followed these instruction, and xsd works like a charm with VS2015. Best regards, Bernhard On 27.02.2017 17:40, Lars wrote: > Hello, > > > When will XSD add support for Visual Studio 2015? > > > kind regards, Lars From boris at codesynthesis.com Tue Feb 28 05:28:15 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Feb 28 05:28:25 2017 Subject: [xsd-users] VS2015 support In-Reply-To: References: <15988936-dc8e-357d-f08a-2d2062ea23a7@student.tugraz.at> Message-ID: Hi Lars, As Bernhard helpfully pointed out, XSD works fine with VC14 (aka Visual Studio 2015) and a lot of people are using it with this compiler. The libxsd runtime is header only so you don't need a VC project for it. Having said that, it is not yet supported "officially" in that there are no project/solution files for examples (though you should be able to migrate one of the existing) and it is not listed as a supported compiler on the project's page. We will, however, "officially" support it in the upcoming release (along with VC15/VS2017). Boris From laasunde at hotmail.com Tue Feb 28 06:16:51 2017 From: laasunde at hotmail.com (Lars) Date: Tue Feb 28 06:17:05 2017 Subject: SV: [xsd-users] VS2015 support In-Reply-To: References: <15988936-dc8e-357d-f08a-2d2062ea23a7@student.tugraz.at> , Message-ID: Thank your for your reply Boris. I wanted to make sure there were no issue with xsd and vs2015 prior to switching compiler. Since I did not find it in the supported compiler I posted here. Out of curiosity, what is the timeframe for the next release? Kind regards, Lars ________________________________ Fra: Boris Kolpackov Sendt: 28. februar 2017 11:28 Til: Lars Kopi: Bernhard Rapp; xsd-users@codesynthesis.com Emne: Re: [xsd-users] VS2015 support Hi Lars, As Bernhard helpfully pointed out, XSD works fine with VC14 (aka Visual Studio 2015) and a lot of people are using it with this compiler. The libxsd runtime is header only so you don't need a VC project for it. Having said that, it is not yet supported "officially" in that there are no project/solution files for examples (though you should be able to migrate one of the existing) and it is not listed as a supported compiler on the project's page. We will, however, "officially" support it in the upcoming release (along with VC15/VS2017). Boris From boris at codesynthesis.com Tue Feb 28 07:27:45 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Feb 28 07:27:55 2017 Subject: [xsd-users] VS2015 support In-Reply-To: References: <15988936-dc8e-357d-f08a-2d2062ea23a7@student.tugraz.at> Message-ID: Hi Lars, Lars writes: > Out of curiosity, what is the timeframe for the next release? Can't really say for sure, hopefully before mid-year. But if you hit any issues with VC14 (or VC15) in the existing version, we will fix them and build you a pre-release. Boris From andrew.j.chalk at lmco.com Tue Feb 28 15:01:08 2017 From: andrew.j.chalk at lmco.com (Chalk, Andrew J) Date: Wed Mar 1 11:03:09 2017 Subject: EXTERNAL: Re: [xsd-users] XSD Forward Declaration Bug In-Reply-To: References: <9FFFD432B44ECB4EAAEE296EF2765BEAAA1992@HVXDSP45.us.lmco.com> <9FFFD432B44ECB4EAAEE296EF2765BEAAA4048@HVXDSP45.us.lmco.com> Message-ID: <9FFFD432B44ECB4EAAEE296EF2765BEAAA4893@HVXDSP45.us.lmco.com> Thanks. That appears to fix the problem. - A -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Friday, February 17, 2017 8:44 AM To: Chalk, Andrew J (US N-AMERICAN CYBERSYSTEMS) Cc: xsd-users@codesynthesis.com Subject: Re: EXTERNAL: Re: [xsd-users] XSD Forward Declaration Bug Hi Andrew, Thanks for sending the schemas. I took a look and the problem is circular inclusion that involves inheritance. These is no way to map such schemas in the file-per-schema mode and one has to use the file-per-type mode instead. This post has more information on the problem: http://www.codesynthesis.com/~boris/blog/2008/02/13/codesynthesis-xsd-3-1-0-released/ I've compiled your schemas like this (note that now you only compile the "root" schema of your vocabulary): $ xsd cxx-tree --output-dir out --file-per-type data.xsd Then the generated code compiles without any problems: $ g++ out/*.cxx Boris