[xsd-users] G2S protocol with confilicting type

Boris Kolpackov boris at codesynthesis.com
Mon Sep 15 08:28:38 EDT 2008


Hi Michal,

Michal Widera <michal_widera at poczta.onet.pl> writes:

> I'm try to use XSD on G2S protocol.
> Protocol is coded as xsd set and is free available on Gaming Standards website:
> http://www.gamingstandards.com/pdfs/standards/G2S_v1.0.3.zip
> (in this zip there is a full schema with set of xsd)
> 
> Unfortunately i get some errors after issuing following command:
> xsd cxx-tree --root-element g2sMessage --type-naming ucc g2sMessage.xsd

G2S is a peculiar schema. It contains files that are not self-sufficient
and cannot be compiled independently. That is, when you load them via
g2sMessage.xsd, they are valid but by themselves they don't contain
the necessary include's/import's for declarations that they use.

Because of this you need to use the file-per-type compilation mode.
For more information about this mode see the following blog post:

http://www.codesynthesis.com/~boris/blog/2008/02/13/codesynthesis-xsd-3-1-0-released/

We also happened to have a GNU make-based test for this schema which
I uploaded here if you are interested:

http://www.codesynthesis.com/~boris/tmp/g2s-test.tar.gz

The test builds a simple test driver that loads and prints a G2S
document. A few notes on the test:

1. You need to place the G2S schemas into the same directory as the
   Makefile.

2. You may need to adjust the paths to the XSD compiler and runtime
   library at the beginning of the Makefile.

3. If you have several CPUs/Cores, consider using the -j GNU make
   option -- the schema is quite big and it takes some time to compile.

Boris




More information about the xsd-users mailing list