From anzalone.s at gmail.com Thu Sep 25 04:36:12 2014 From: anzalone.s at gmail.com (Salvatore Anzalone) Date: Thu Sep 25 04:36:18 2014 Subject: [xsde-users] XSDe on VS2012 In-Reply-To: References: Message-ID: Hello, I am Salvatore Anzalone, from ISIR-UPMC, Paris. We are trying to use the XSDe library you developed as part of a distributed framework to control humanoid robots. A first version of this system will be presented at SIMPAR 2014 http://www.simpar.org/. In a previous version of our framework we used your XSD library. In that case the installation and the use of your tool was very easy. Unfortunately, XSD is not optimised as XSDe, so, due to our performances constraints, we were forced to port our system to XSDe. The differences we found in the performances of two framework using the two libraries were significant (and we will show these at the conference). However, in a Linux machine the framework using XSDe works like a charm. Our efforts are now focused on achieving an easier portability of the framework between Linux and Windows (later, Android and Raspberry). I found huge problems on recompiling the XSDe library in the Visual Studio 2012 environment. I tried to use the binary distribution, http://www.codesynthesis.com/products/xsde/download.xhtml, and I was able to create my C++ files from my XSD. But when I tried to use them in my app, VS2012 asked me for some XSDe includes and for the XSDe library. In Linux such problem was easy to manage, but in Windows I still have some difficulties. I added the needed include files in my project, but I am not able to compile any XSDe library from the package files. I was not able to find any Visual Studio solution in the package, and the makefiles and nmakefiles are not working. I also tried to use the src with dependencies, http://www.codesynthesis.com/download/xsde/3.2/ but I had issues also there: makefiles ar not working. Am I doing something wrong? Does XSDe actually work in a Windows environment? Do you have a procedure to compile the XSDe library? Better, do you think you will be able to make available the precompiled, static libraries and the needed includes? Thank you so much, Salvatore Anzalone From boris at codesynthesis.com Fri Sep 26 02:45:07 2014 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Sep 26 02:51:35 2014 Subject: [xsde-users] XSDe on VS2012 In-Reply-To: References: Message-ID: Hi Salvatore, Salvatore Anzalone writes: > I am not able to compile any XSDe library from the package files. I > was not able to find any Visual Studio solution in the package, and > the makefiles and nmakefiles are not working. XSD/e does not include projects/solutions for Visual Studio (there are just too many versions/targets/configurations; we would have to provide hundreds of project files). Instead you use the nmakefile's to build with Visual Studio. The procedure is described in the INSTALL file that comes with XSD/e ("Microsoft nmake" section). In particular, the config.nmake file that is on the config/ directory is for building vanilla Win32 libxsde (as opposed to, say, WinCE), so you will probably want to start with that file and maybe adjust CFLAGS and CXXFLAGS variables to match your configuration (again, read the INSTALL file). > I also tried to use the src with dependencies, > http://www.codesynthesis.com/download/xsde/3.2/ but I had issues also > there: makefiles ar not working. This is a source code for the XSD/e compiler itself. You want to use the binary from Download page. Quoting the Download page: "XSD/e is available in the form of precompiled binary distributions for a number of host development platforms. A binary distribution contains the XSD/e compiler binary for the selected host platform as well as the source code for the runtime library and examples. You will need to configure and compile the XSD/e runtime library for your target OS and CPU architecture. For more information on the configuration and building refer to the INSTALL file in each binary distribution." > Am I doing something wrong? Yes, probably not reading the INSTALL file ;-). If that still doesn't help, be more specific about what steps you have done and what exactly doesn't work (instead of a blank statement like "the makefiles and nmakefiles are not working"). > Does XSDe actually work in a Windows environment? Yes. > Do you have a procedure to compile the XSDe library? Yes, in the INSTALL file. > Better, do you think you will be able to make available the precompiled, > static libraries and the needed includes? No, there are just too many variations in versions/targets/configurations to make this feasible. Boris From anzalone.s at gmail.com Mon Sep 29 09:39:12 2014 From: anzalone.s at gmail.com (Salvatore Anzalone) Date: Mon Sep 29 09:39:19 2014 Subject: [xsde-users] XSDe on VS2012 In-Reply-To: References: Message-ID: Thank you so much, I will try to use your hints. Best, Salvatore On Fri, Sep 26, 2014 at 8:45 AM, Boris Kolpackov wrote: > Hi Salvatore, > > Salvatore Anzalone writes: > > > I am not able to compile any XSDe library from the package files. I > > was not able to find any Visual Studio solution in the package, and > > the makefiles and nmakefiles are not working. > > XSD/e does not include projects/solutions for Visual Studio (there > are just too many versions/targets/configurations; we would have to > provide hundreds of project files). Instead you use the nmakefile's > to build with Visual Studio. The procedure is described in the INSTALL > file that comes with XSD/e ("Microsoft nmake" section). In particular, > the config.nmake file that is on the config/ directory is for building > vanilla Win32 libxsde (as opposed to, say, WinCE), so you will probably > want to start with that file and maybe adjust CFLAGS and CXXFLAGS > variables to match your configuration (again, read the INSTALL file). > > > > I also tried to use the src with dependencies, > > http://www.codesynthesis.com/download/xsde/3.2/ but I had issues also > > there: makefiles ar not working. > > This is a source code for the XSD/e compiler itself. You want to use > the binary from Download page. Quoting the Download page: > > "XSD/e is available in the form of precompiled binary distributions for > a number of host development platforms. A binary distribution contains > the XSD/e compiler binary for the selected host platform as well as the > source code for the runtime library and examples. You will need to > configure and compile the XSD/e runtime library for your target OS > and CPU architecture. For more information on the configuration and > building refer to the INSTALL file in each binary distribution." > > > > Am I doing something wrong? > > Yes, probably not reading the INSTALL file ;-). If that still doesn't > help, be more specific about what steps you have done and what exactly > doesn't work (instead of a blank statement like "the makefiles and > nmakefiles are not working"). > > > > Does XSDe actually work in a Windows environment? > > Yes. > > > > Do you have a procedure to compile the XSDe library? > > Yes, in the INSTALL file. > > > > Better, do you think you will be able to make available the precompiled, > > static libraries and the needed includes? > > No, there are just too many variations in versions/targets/configurations > to make this feasible. > > Boris > -- -------------------------------------------------------- Salvatore Maria Anzalone, Ph.D. -------------------------------------------------------- * Institut Syst?mes Intelligents et de Robotique * Universit? Pierre et Marie Curie, Paris E-Mail: Salvatore Anzalone Skype: anzalone.s Mobile Phone (it): +39-3491073838 -------------------------------------------------------- From raviraja at qti.qualcomm.com Mon Sep 29 21:54:53 2014 From: raviraja at qti.qualcomm.com (Rangarajan, Ravi_Sowmian) Date: Mon Sep 29 21:59:42 2014 Subject: [xsde-users] Q: Issue found with xml_schema::base64_binary Message-ID: Hi Boris. When base64 encoding an MD5 of a file, following steps are followed. I have attached the FDT.xsd schema that is used to generate the reference code. Buffer md5 is a 16-byte buffer that contains MD5 of a file as binary and it needs to be sent as base64-encoded. I have verified computed MD5 is correct (as against reference info for that file) - however, base64md5 is showing up as "CXvk0ap1opO5qLQUh+hLAg== " in the final output, where first 24 chars of this string are correct while last four, i.e. are extra (MD5 should end with == in above example). I observed exact same extra chars in base64 encoded (via the xml constructor below) string of another base64_binary field in FDT.xsd. I am not sure if these chars mean something. I am wondering if there is a known issue in computing a base64_binary field? And, how can I print such a field (base64md5) before invoking file.Content_MD5 API? Thanks Ravi ====================================== unsigned int transportObjectId = xxx; std::string fileURI = "kkkk"; FDT::FileType file(XML_DELIMITER, fileURI, transportObjectId); ... //--- size of md5 buffer is 16-bytes xml_schema::base64_binary base64md5(md5, sizeof(md5)); file.Content_MD5(base64md5); ====================================== -------------- next part -------------- A non-text attachment was scrubbed... Name: FDT.xsd Type: text/xml Size: 4421 bytes Desc: FDT.xsd Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20140930/0c328721/FDT.xml From boris at codesynthesis.com Tue Sep 30 06:04:36 2014 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Sep 30 06:11:00 2014 Subject: [xsde-users] Q: Issue found with xml_schema::base64_binary In-Reply-To: References: Message-ID: Hi Ravi, Rangarajan, Ravi_Sowmian writes: > When base64 encoding an MD5 of a file, following steps are followed. I have > attached the FDT.xsd schema that is used to generate the reference > code. Buffer md5 is a 16-byte buffer that contains MD5 of a file as binary > and it needs to be sent as base64-encoded. I have verified computed MD5 is > correct (as against reference info for that file) - however, base64md5 is > showing up as "CXvk0ap1opO5qLQUh+hLAg== " in the final output, where > first 24 chars of this string are correct while last four, i.e. are > extra (MD5 should end with == in above example). Brian Tuite has already asked this question (off-list): > 2. XSD/e appends " " to type base64_binary > > XSDE library is appending line feed in hex format ( ) while doing > base64 encoding of data with data type xs:base64Binary. > > For example, for the following schema > > use="optional"/> > > And for the input string ce4981fba69b1b6d7419c42fc5f53aca, the output > should be generated as zkmB+6abG210GcQvxfU6yg== > > But it comes out to be zkmB+6abG210GcQvxfU6yg== And my reply was: XSD/e outputs what is called a canonical representation of base64Binary which requires a trailing newline. See this email for details, especially towards the end: http://lists.w3.org/Archives/Public/xml-dist-app/2001Jul/0323.html So we cannot change it in the default XSD/e implementation. The options that I see are: 1. Again, customize the serializer to write it in the form you expect. 2. Customize the XSD/e source code and remove the lines that add the trailing newline. We could also add an #ifdef to disable this final newline to the XSD/e runtime for the next release. To which Brian replied that he is already using a custom serialize for base64_binary. Could you check with him if you can use the same solution? Boris