[xsd-users] cxx-parser: The generated test driver is silent.

Jeroen N. Witmond [Bahco] jnw at xs4all.nl
Tue Nov 20 14:00:10 EST 2007


Hi Boris,

I'm afraid I've run into another problem related to anyType, in this case
in cxx-parser. When I generate code from anyType.xsd (attached), using xsd
options --generate-print-impl and --generate-test-driver, and run the
driver on file test.xml (attached), it produces no output. I expected "BB:
SomeID".

I've tried to debug this problem, and there seems to be a problem in file
anyType-pskel.cxx starting at line 81. In "bool
problem_pskel::_attribute_impl (const ::xml_schema::ro_string& ns, const
::xml_schema::ro_string& n, const ::xml_schema::ro_string& v)", the call
to "this->::xml_schema::any_type_pskel::_attribute_impl (ns, n, v)" always
returns true. (I ran into this problem while using more substantial xsd
and xml files. The attached files are a minimal testcase.)

I'm not surprised that ::xml_schema::any_type_pskel::_attribute_impl()
always returns true. But perhaps it should do it at the end of
problem_pskel::_attribute_impl. :)

Versions 3.0.0 and 3.1.0.a1 of xsd generate the same code for this xsd file.

Jeroen.

PS: I'll send the tarball containing the generated files to you privately
if you want.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: anyType.xsd
Type: application/octet-stream
Size: 439 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20071120/4485c0d4/anyType.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.xml
Type: text/xml
Size: 183 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20071120/4485c0d4/test.bin


More information about the xsd-users mailing list