[xsde-users] Type Maps & generated code results

Eric Broadbent eric.broadbent at csr.com
Mon Dec 5 00:14:38 EST 2011


I have two different sets of code generated with the same schemas and same basic commands, but one uses a type map file along with the --type-map command, and the other doesn't.  When I compare the generated code, there are no diffs, and the return type from the "post_<type>()" method is still void.

I know that XSDe is at least scanning my type map file because I first had normal C-style comments in there and I got error messages.

I am also using the "--namespace-map" option, and am supplying the same namespace mapping in the map file.
For example, this is in library.map in the .../examples/cxx/parser/library/library.map

  namespace http://www.codesynthesis.com/library library

so as far as I can tell the command line used to generate the parser-code should have also included "--namespace-map http://www.codesynthesis.com/library=library"
This is the convention that I'm using in my map file.

I see that in the examples (library.map and library-pimpl.cxx), the generated code has lines comments indicating where one needs to fill in code to build the object to return in the post_<type>() method:

    // TODO
    //
    // return ... ;

However I don't see any lines like this in the code I'm generating, so I must be doing something wrong.

Given a correct command invocation and a properly formed type map, is there anything else besides the "--type-map" option that we need to do to get the parser to generate the code to use our schema-to-C mappings?
If not, how should I go about debugging this?  I thought that perhaps putting some garbage mappings in the map file would help to illuminate the problem, but they were consumed without any indication of a problem.

Thanks for any advice,

-Eric B.




Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog



More information about the xsde-users mailing list