[xsd-users] Problem in translating schema to C++ (following parser guide)

Pedro pmonteirorocha at sapo.pt
Fri Jul 2 05:59:23 EDT 2010


On 01-07-2010 17:51, Boris Kolpackov wrote:
> Hi Pedro,
>
> In the future please keep your replies CC'ed to the xsd-users mailing
> list as discussed in the posting guidelines:
>
> http://www.codesynthesis.com/support/posting-guidelines.xhtml
>
>
>    
Sorry, I thought the answer would come from that e-mail.
> Pedro<pmonteirorocha at sapo.pt>  writes:
>
>    
>> Hmm, I've tryed following that guide too, but I'm stuck at the "xsdcxx
>> cxx-tree hello.xsd". Same error. I have XSD 3.3.0.
>>      
> Are you using xsdcxx Debian/Ubuntu package or are you using the
> xsd package downloaded from the codesynthesis.com website? Can
> you try to download the .tar.bz2 package and see if the 'xsd'
> binary in the bin/ subdirectory works for you?
>
> The error makes me think that there is some conflict between the
> g++ version (or, more precisely, libstdc++) that was used to build
> xsdcxx and the version that you have installed on your box. You may
> want to try to upgrade or downgrade libstdc++6 package and see if
> this helps.
>
>    
Used the package from the Ubuntu repository, and then switched to the 
xsd package from codesynthesis.com. Same error, nothing changed.
Executing the xsd in the /bin folder of the .tar.bz2 package returns the 
same error.
Updated the libstdx++ package. I had 4.1, or 4.4 already...
I now have the following libraries:
Libstdc++6-v3(Standard); Libstdc++6.4.4(development). All 32 bits. I do 
not have any libstdc++6 v3 "shared library subset kit" package, neither 
the debugging files.

I have the xsdcxx 3.2.0.1-1.1 build 2 version, and from 
"http://packages.ubuntu.com/lucid/xsdcxx" it says libstdc++6 
<http://packages.ubuntu.com/lucid/libstdc++6> (>= 4.4.0).
Each one seems to be correct.

The xsd package was compiled with which version?
>    
>> I've installed xsd3.3.0 in Windows XP, and extracted the .cxx and
>> .hxx files with "xsd  cxx-parser --xml-parser expat hello.xsd" but
>> I'm not sure those files can be used in windows and linux.
>>      
> Yes, the files are the same on all platforms. Just make sure you
> have the same version of XSD on both platforms (that is, using
> 3.3.0 on Windows and 3.2.0 on Linux won't work).
>
>
>    
This should allow me to proceed foward, altough having to create the 
files in windows is a bit of a pain.
>> Also, when i compile hello.xml with xsd, the result is a bit different
>> from the hello.xsd that the example shows:
>>
>> [...]
>>
>> and it gives me a few errors when I try to compile in windows xsd.exe.
>>      
> This schema is invalid. Since it was generated with Mono's xsd.exe, I
> am afraid I can't help you with that. You may want to contact the
> Mono developers to report this problem.
>
> Generally, thought, schemas that are auto-generated from a sample
> XML document are quite inaccurate. They usually require a lot of
> manual editing to make them usable.
>    
So it seems I'll have to handcraft my xsd file...

> Boris
>    

I'll test all the libstc libraries, downgrading until I reach 4.1, and 
Ill install the 2 libraries I don't have, just in case something is missing.

Thank you for your support,
Pedro Rocha.





More information about the xsd-users mailing list