From ajay.auti at siemens.com Tue Jan 2 23:42:47 2024 From: ajay.auti at siemens.com (Auti, Ajay) Date: Wed Jan 3 01:16:07 2024 Subject: [xsd-users] USING UTF-8 Encoding while generating XML , now need to give Support of UNICODE Characters in XML Message-ID: HI Team , I am using UTF-8 Encoding to generate .cxx and .hxx for respected .xsd files . Now I want to support Unicode characters to save into XML file . While writing such characters Current implementation gives exception and my application got Crash .(MFC MDI Application-Visual Studio 2019 ) To Support this , I had tried to change --char-type char to --char-type wchar_t type It changed my .cxx and .hxx files to wchar_t but my Code Synthesis library included files are not supporting wchar_t type. So here also I faced conflicts . Is there any solution to direct support wchar_t type or How to support UNICODE characters using code synthesis lib? Can you please provide me with one example code to migrate char to wchar_t and write UNICODE characters in to the XML file using code synthesis. Please do the needful and let me know in case any information required. Regards, Ajay From boris at codesynthesis.com Thu Jan 4 09:11:51 2024 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Jan 4 09:02:29 2024 Subject: [xsd-users] USING UTF-8 Encoding while generating XML , now need to give Support of UNICODE Characters in XML In-Reply-To: References: Message-ID: Auti, Ajay writes: > To Support this , I had tried to change --char-type char to > --char-type wchar_t type It changed my .cxx and .hxx files to wchar_t > but my Code Synthesis library included files are not supporting wchar_t > type. They support both char and wchar_t but for wchar_t a number of macros have to be defined to enable it. These macros are automatically defined by the generated code before including the relevant libxsd headers so if you don't include any of them directly, everything should work. I suggest that you work out these issues using a simple examples, say the `hello` example from the xsd-examples package. Change it to use wchar_t and see if you still get errors that you get in your application. If not, then the issue is most likely in your application code. See also: https://codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#3.2 From wangyuzhi-1984 at 163.com Fri Jan 5 00:01:56 2024 From: wangyuzhi-1984 at 163.com (=?GBK?B?zfXT8dam?=) Date: Fri Jan 5 04:01:56 2024 Subject: [xsd-users] =?gbk?b?yrnTw3hzZC00LjAuMMq1z9ZYbWy94s72z+C52LmmxNw=?= =?gbk?b?o6zTptPDs8zQ8s6qZXhlyrHV/bOjo6xkbGy3vcq9yrHWtNDQsai07Q==?= Message-ID: <3c9927d.335d.18cd7ffd52e.Coremail.wangyuzhi-1984@163.com> Dear Sir? I encountered an issue with xsd-4.0.0? When using xsd-4.0.0 in Qt to implement XML parsing functionality, the application works fine in .exe format but throws an error when using .dll. The error is as follows: Do you know the reason and solution for this issue? Looking forward for your reply! Thank you very much! -- Best Regards ??? -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 52013 bytes Desc: not available Url : https://codesynthesis.com/pipermail/xsd-users/attachments/20240105/8b0eddb6/image-0001.png From ajay.auti at siemens.com Wed Jan 10 01:54:42 2024 From: ajay.auti at siemens.com (Auti, Ajay) Date: Wed Jan 10 08:45:09 2024 Subject: [xsd-users] USING UTF-8 Encoding while generating XML , now need to give Support of UNICODE Characters in XML In-Reply-To: References: Message-ID: Hi Team , I am try to run Hello example as you suggested. 1. Found lots of linking errors please check below attached image . * Visual studio Empty project with (libxerces-c-3.2.4+2-x86_64-windows10-msvc17.6) and (libxsd-4.2.0-windows) versions [cid:image001.png@01DA43BF.66C4D0C0] 1. Please help me with a number of macros have to be defined to enable wchar_t . * I am using below macros : "xsd cxx-tree --namespace-map --generate-serialization --proprietary-license --char-type wchar_t --char-encoding auto" Can you please mentioned me defined macrosto enable wchar_t Thanks , Ajay -----Original Message----- From: Boris Kolpackov Sent: Thursday, January 4, 2024 7:42 PM To: Auti, Ajay (ADV D IN MO RI-PS SYS ES-ET) Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] USING UTF-8 Encoding while generating XML , now need to give Support of UNICODE Characters in XML Auti, Ajay > writes: > To Support this , I had tried to change --char-type char to > --char-type wchar_t type It changed my .cxx and .hxx files to wchar_t > but my Code Synthesis library included files are not supporting > wchar_t type. They support both char and wchar_t but for wchar_t a number of macros have to be defined to enable it. These macros are automatically defined by the generated code before including the relevant libxsd headers so if you don't include any of them directly, everything should work. I suggest that you work out these issues using a simple examples, say the `hello` example from the xsd-examples package. Change it to use wchar_t and see if you still get errors that you get in your application. If not, then the issue is most likely in your application code. See also: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodesynthesis.com%2Fprojects%2Fxsd%2Fdocumentation%2Fcxx%2Ftree%2Fguide%2F%233.2&data=05%7C02%7Cajay.auti%40siemens.com%7Cbcc67c7cd2d1497cdd8808dc0d2f1c38%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638399743214202390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Ck8DiT4TI2%2Bh0pocXALtvJ%2F7dQbepQhB3nVJnYVi8Dc%3D&reserved=0 -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 201912 bytes Desc: image001.png Url : https://codesynthesis.com/pipermail/xsd-users/attachments/20240110/e584e247/image001-0001.png From ajay.auti at siemens.com Thu Jan 18 01:58:02 2024 From: ajay.auti at siemens.com (Auti, Ajay) Date: Thu Jan 18 05:19:36 2024 Subject: [xsd-users] USING UTF-8 Encoding while generating XML , now need to give Support of UNICODE Characters in XML In-Reply-To: References: Message-ID: Hi Team , Please see attached Demo Application with Configuration which gives Linking Errors . 1. My current Demo application throw below linking errors (I have attached this application in mail ) Build started... 1>------ Build started: Project: DemoCodeSynthesis, Configuration: Debug Win32 ------ 1>Source.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification 1>Source.obj : error LNK2019: unresolved external symbol "class std::auto_ptr __cdecl hello(class std::basic_string,class std::allocator > const &,class xsd::cxx::tree::flags,class xsd::cxx::tree::properties const &)" (?hello@@YA?AV?$auto_ptr@Vhello_t@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@Vflags@tree@cxx@xsd@@ABV?$properties@D@567@@Z) referenced in function _main 1>D:\Study\DemoCodeSynthesis\Debug\DemoCodeSynthesis.exe : fatal error LNK1120: 1 unresolved externals 1>Done building project "DemoCodeSynthesis.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Configuration : [cid:image001.png@01DA4A09.C2CB37B0][cid:image002.png@01DA4A09.C2CB37B0] [cid:image003.png@01DA4A09.C2CB37B0] 1. Please help me with a number of macros have to be defined to enable wchar_t . * I am using below macros : "xsd cxx-tree --namespace-map --generate-serialization --proprietary-license --char-type wchar_t --char-encoding auto" E.g In my application I have provide Macros with below style in .vcxproj file xsd cxx-tree --namespace-map http://www.w3.org/2000/09/xmldsig#=xmldsig --generate-serialization --proprietary-license --char-type char --char-type wchar_t --char-encoding auto ..\CCIA\Schema\IndicationsCatalog.xsd xsd schema\IndicationsCatalog.xsd IndicationsCatalog.hxx;IndicationsCatalog.cxx;%(Outputs) xsd cxx-tree --namespace-map http://www.w3.org/2000/09/xmldsig#=xmldsig --generate-serialization --proprietary-license --char-type char --char-type wchar_t --char-encoding auto ..\CCIA\Schema\*.xsd xsd schema\IndicationsCatalog.xsd IndicationsCatalog.hxx;IndicationsCatalog.cxx;%(Outputs) Please suggest on this and please let me know in case of any information required . Regards, Ajay From: Auti, Ajay (ADV D IN MO RI-PS SYS ES-ET) Sent: Thursday, January 18, 2024 12:26 PM To: 'xsd-users@codesynthesis.com' ; 'boris@codesynthesis.com' Subject: RE: [xsd-users] USING UTF-8 Encoding while generating XML , now need to give Support of UNICODE Characters in XML Hi Team , Please see attached Demo Application with Configuration which gives Linking Errors . 1. My current Demo application throw below linking errors (I have attached this application in mail ) Build started... 1>------ Build started: Project: DemoCodeSynthesis, Configuration: Debug Win32 ------ 1>Source.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification 1>Source.obj : error LNK2019: unresolved external symbol "class std::auto_ptr __cdecl hello(class std::basic_string,class std::allocator > const &,class xsd::cxx::tree::flags,class xsd::cxx::tree::properties const &)" (?hello@@YA?AV?$auto_ptr@Vhello_t@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@Vflags@tree@cxx@xsd@@ABV?$properties@D@567@@Z) referenced in function _main 1>D:\Study\DemoCodeSynthesis\Debug\DemoCodeSynthesis.exe : fatal error LNK1120: 1 unresolved externals 1>Done building project "DemoCodeSynthesis.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Configuration : [cid:image001.png@01DA4A09.C2CB37B0][cid:image002.png@01DA4A09.C2CB37B0] [cid:image003.png@01DA4A09.C2CB37B0] 1. Please help me with a number of macros have to be defined to enable wchar_t . * I am using below macros : "xsd cxx-tree --namespace-map --generate-serialization --proprietary-license --char-type wchar_t --char-encoding auto" E.g In my application I have provide Macros with below style in .vcxproj file xsd cxx-tree --namespace-map http://www.w3.org/2000/09/xmldsig#=xmldsig --generate-serialization --proprietary-license --char-type char --char-type wchar_t --char-encoding auto ..\CCIA\Schema\IndicationsCatalog.xsd xsd schema\IndicationsCatalog.xsd IndicationsCatalog.hxx;IndicationsCatalog.cxx;%(Outputs) xsd cxx-tree --namespace-map http://www.w3.org/2000/09/xmldsig#=xmldsig --generate-serialization --proprietary-license --char-type char --char-type wchar_t --char-encoding auto ..\CCIA\Schema\*.xsd xsd schema\IndicationsCatalog.xsd IndicationsCatalog.hxx;IndicationsCatalog.cxx;%(Outputs) Please suggest on this and please let me know in case of any information required . Regards, Ajay From: Auti, Ajay (ADV D IN MO RI-PS SYS ES-ET) Sent: Thursday, January 18, 2024 12:20 PM To: xsd-users@codesynthesis.com; boris@codesynthesis.com Subject: RE: [xsd-users] USING UTF-8 Encoding while generating XML , now need to give Support of UNICODE Characters in XML Hi Team , Please see attached Demo Application with Configuration which gives Linking Errors . 1. My current Demo application throw below linking errors (I have attached this application in mail ) Build started... 1>------ Build started: Project: DemoCodeSynthesis, Configuration: Debug Win32 ------ 1>Source.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification 1>Source.obj : error LNK2019: unresolved external symbol "class std::auto_ptr __cdecl hello(class std::basic_string,class std::allocator > const &,class xsd::cxx::tree::flags,class xsd::cxx::tree::properties const &)" (?hello@@YA?AV?$auto_ptr@Vhello_t@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@Vflags@tree@cxx@xsd@@ABV?$properties@D@567@@Z) referenced in function _main 1>D:\Study\DemoCodeSynthesis\Debug\DemoCodeSynthesis.exe : fatal error LNK1120: 1 unresolved externals 1>Done building project "DemoCodeSynthesis.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 1. Please help me with a number of macros have to be defined to enable wchar_t . * I am using below macros : "xsd cxx-tree --namespace-map --generate-serialization --proprietary-license --char-type wchar_t --char-encoding auto" E.g In my application I have provide Macros with below style in .vcxproj file xsd cxx-tree --namespace-map http://www.w3.org/2000/09/xmldsig#=xmldsig --generate-serialization --proprietary-license --char-type char --char-type wchar_t --char-encoding auto ..\CCIA\Schema\IndicationsCatalog.xsd xsd schema\IndicationsCatalog.xsd IndicationsCatalog.hxx;IndicationsCatalog.cxx;%(Outputs) xsd cxx-tree --namespace-map http://www.w3.org/2000/09/xmldsig#=xmldsig --generate-serialization --proprietary-license --char-type char --char-type wchar_t --char-encoding auto ..\CCIA\Schema\*.xsd xsd schema\IndicationsCatalog.xsd IndicationsCatalog.hxx;IndicationsCatalog.cxx;%(Outputs) Please suggest on this and please let me know in case of any information required . Regards, Ajay From: Auti, Ajay (ADV D IN MO RI-PS SYS ES-ET) Sent: Wednesday, January 10, 2024 12:25 PM To: xsd-users@codesynthesis.com; boris@codesynthesis.com Subject: RE: [xsd-users] USING UTF-8 Encoding while generating XML , now need to give Support of UNICODE Characters in XML Hi Team , I am try to run Hello example as you suggested. 1. Found lots of linking errors please check below attached image . * Visual studio Empty project with (libxerces-c-3.2.4+2-x86_64-windows10-msvc17.6) and (libxsd-4.2.0-windows) versions [cid:image004.png@01DA4A09.C2CB37B0] 1. Please help me with a number of macros have to be defined to enable wchar_t . * I am using below macros : "xsd cxx-tree --namespace-map --generate-serialization --proprietary-license --char-type wchar_t --char-encoding auto" Can you please mentioned me defined macrosto enable wchar_t Thanks , Ajay -----Original Message----- From: Boris Kolpackov > Sent: Thursday, January 4, 2024 7:42 PM To: Auti, Ajay (ADV D IN MO RI-PS SYS ES-ET) > Cc: xsd-users@codesynthesis.com Subject: Re: [xsd-users] USING UTF-8 Encoding while generating XML , now need to give Support of UNICODE Characters in XML Auti, Ajay > writes: > To Support this , I had tried to change --char-type char to > --char-type wchar_t type It changed my .cxx and .hxx files to wchar_t > but my Code Synthesis library included files are not supporting > wchar_t type. They support both char and wchar_t but for wchar_t a number of macros have to be defined to enable it. These macros are automatically defined by the generated code before including the relevant libxsd headers so if you don't include any of them directly, everything should work. I suggest that you work out these issues using a simple examples, say the `hello` example from the xsd-examples package. Change it to use wchar_t and see if you still get errors that you get in your application. If not, then the issue is most likely in your application code. See also: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcodesynthesis.com%2Fprojects%2Fxsd%2Fdocumentation%2Fcxx%2Ftree%2Fguide%2F%233.2&data=05%7C02%7Cajay.auti%40siemens.com%7Cbcc67c7cd2d1497cdd8808dc0d2f1c38%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638399743214202390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Ck8DiT4TI2%2Bh0pocXALtvJ%2F7dQbepQhB3nVJnYVi8Dc%3D&reserved=0 -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 167903 bytes Desc: image001.png Url : https://codesynthesis.com/pipermail/xsd-users/attachments/20240118/a580fc36/image001-0001.png -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 145060 bytes Desc: image002.png Url : https://codesynthesis.com/pipermail/xsd-users/attachments/20240118/a580fc36/image002-0001.png -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 75585 bytes Desc: image003.png Url : https://codesynthesis.com/pipermail/xsd-users/attachments/20240118/a580fc36/image003-0001.png -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 201912 bytes Desc: image004.png Url : https://codesynthesis.com/pipermail/xsd-users/attachments/20240118/a580fc36/image004-0001.png From thomas.lestriez at edf.fr Tue Jan 30 08:04:09 2024 From: thomas.lestriez at edf.fr (LESTRIEZ Thomas) Date: Tue Jan 30 08:25:28 2024 Subject: [xsd-users] directory hierarchy of c++ hxx cxx files Message-ID: Hi, I have several xsd files in different directories with a hierarchy. DIR 1 / xsd1.xsd DIR 2/ xsd2.xsd DIR 2/ DIR 3/ xsd3.xsd I would like my hxx cxx keep this hierarchy. Right now, I have all my cxx hxx generated in the save directory. But the includes in the hxx are good (they respect the initial xsd directory hierarchy, which is not the final hxx cxx directory hierarchy). Someone could help me to well configure c++ generation to keep the initial xsd directory hierarchy? Thank you by advance Thomas LESTRIEZ Ce message et toutes les pi?ces jointes (ci-apr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse. Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message. Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus. ____________________________________________________ This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message. E-mail communication cannot be guaranteed to be timely secure, error or virus-free. From boris at codesynthesis.com Tue Jan 30 09:04:23 2024 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Jan 30 08:54:56 2024 Subject: [xsd-users] directory hierarchy of c++ hxx cxx files In-Reply-To: References: Message-ID: LESTRIEZ Thomas writes: > I have several xsd files in different directories with a hierarchy. > > DIR 1 / xsd1.xsd > DIR 2/ xsd2.xsd > DIR 2/ DIR 3/ xsd3.xsd > > I would like my hxx cxx keep this hierarchy. > > Right now, I have all my cxx hxx generated in the save directory. But > the includes in the hxx are good (they respect the initial xsd directory > hierarchy, which is not the final hxx cxx directory hierarchy). > > Someone could help me to well configure c++ generation to keep the > initial xsd directory hierarchy? There is the --output-dir option that seems like what you are looking for. From the xsd(1) man page[1]: --output-dir Write generated files to instead of the current directory. So perhaps something like this: xsd ... --output-dir DIR1 DIR1/xsd1.xsd xsd ... --output-dir DIR2 DIR2/xsd2.xsd xsd ... --output-dir DIR2/DIR3 DIR2/DIR3/xsd3.xsd [1] https://codesynthesis.com/projects/xsd/documentation/xsd.xhtml From thomas.lestriez at edf.fr Tue Jan 30 09:17:23 2024 From: thomas.lestriez at edf.fr (LESTRIEZ Thomas) Date: Tue Jan 30 09:13:06 2024 Subject: [xsd-users] directory hierarchy of c++ hxx cxx files In-Reply-To: References: Message-ID: Actually, this is what I used. I was expected for a solution more "automatic", without call the program on inch files. But thanks a lot for you're response. I Will continue as you suggest. LESTRIEZ Thomas writes: > I have several xsd files in different directories with a hierarchy. > > DIR 1 / xsd1.xsd > DIR 2/ xsd2.xsd > DIR 2/ DIR 3/ xsd3.xsd > > I would like my hxx cxx keep this hierarchy. > > Right now, I have all my cxx hxx generated in the save directory. But > the includes in the hxx are good (they respect the initial xsd > directory hierarchy, which is not the final hxx cxx directory hierarchy). > > Someone could help me to well configure c++ generation to keep the > initial xsd directory hierarchy? There is the --output-dir option that seems like what you are looking for. From the xsd(1) man page[1]: --output-dir Write generated files to instead of the current directory. So perhaps something like this: xsd ... --output-dir DIR1 DIR1/xsd1.xsd xsd ... --output-dir DIR2 DIR2/xsd2.xsd xsd ... --output-dir DIR2/DIR3 DIR2/DIR3/xsd3.xsd [1] https://codesynthesis.com/projects/xsd/documentation/xsd.xhtml Ce message et toutes les pi?ces jointes (ci-apr?s le 'Message') sont ?tablis ? l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme ? sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse. Si vous n'?tes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez re?u ce Message par erreur, merci de le supprimer de votre syst?me, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions ?galement d'en avertir imm?diatement l'exp?diteur par retour du message. Il est impossible de garantir que les communications par messagerie ?lectronique arrivent en temps utile, sont s?curis?es ou d?nu?es de toute erreur ou virus. ____________________________________________________ This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message. E-mail communication cannot be guaranteed to be timely secure, error or virus-free.