[xsde-users] Re: cxx-hybrid use with cxx-parser? (new problem)

Eric Broadbent eric.broadbent at csr.com
Sat Dec 10 17:37:09 EST 2011


A more critical problem has arisen that I am now stuck with.
A previous encounter with out-of-schema attributes occurring in the XML data forced me to generate the cxx-parser code with the "--suppress-validation" flag, which allows these attributes to be in the datastream benignly.

After learning that I could use cxx-hybrid to build an object model automatically, I decided to try generating code with that.

However, I encountered this error when generating the code from the schema:
	"error: complex type 'CT_GForce' contains choice compositor"
	"error: parser validation is required to handle this construct"

Is there any way to deal with this?  The runtime error forced validation off - whereas the code-generation wants validation on.
The thing that is curious is that validation could be suppressed when generating the code using cxx-parser, but cxx-hybrid requires it - for the same schema elements.

Thanks for any advice.

-Eric B.



On Dec 9, 2011, at 2:58 PM, Eric Broadbent wrote:

> I have a main schema which references several child schemas.
> I am trying to build a parser which uses the object model generated by the cxx-hybrid tool, to produce output from XML files.
> Starting with the serializer implementation is fine - modifications can be made that to write the output format needed.
> 
> Is is possible/reasonable to invoke cxx-parser with the --generate-test-driver option - supplying the root element and schema, and then combine that with the rest of the code generated by cxx-hybrid?
> 
> Would one need to plug in all the generated classes to a type-map so the parser knows to make the connections in the generated driver code?
> 
> There is no "driver" generated by cxx-hybrid - and all the examples use an existing test shell.
> Using the cxx-hybrid, one gets this error using the --generate-test-driver option:
> 	error: unknown option '--generate-test-driver'
> 
> If anyone has encountered the same situation and has some advice, would be very interested to hear what method you used.
> Thanks, 
> -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
> 
> 
> 
> To report this email as spam click https://www.mailcontrol.com/sr/jcZIwo0RHwXTndxI!oX7UqcUCtlg0TD8CTQMQi!GhQowm+gIXlZFPto0MI5lKVzV3y0Wgd5FmiD02A3zwbO5JA== .




More information about the xsde-users mailing list