[xsd-users] Roundtrip errors with CXX-Tree
Russ Johns
johns at lanl.gov
Tue Mar 11 10:59:43 EDT 2008
Thanks for the prompt reply-
it seems that it did not find the schema, though on Windows I made sure
it was there- when I switched to linux I added the schema::properties
coding, but apparently forgot to copy the schema to the new development
directory. Maybe there was a typo in the spelling of the schema
filename on windows... I'll check.
It works fine now... at least in Linux on xsd 3.1...
On Tue, 2008-03-11 at 08:43 +0200, Boris Kolpackov wrote:
> Hi Russell,
>
> Russell C. Johns <johns at lanl.gov> writes:
>
> > terminate called after throwing an instance of
> > 'xsd::cxx::tree::parsing<char>'
> > what(): instance document parsing failed
>
> Try to catch this exception and print it as you did with the
> serialization case:
>
> try
> {
> std::auto_ptr<TEST::input::TestInput> tif
> (TEST::input::TEST_input(argv[1],0,props));
> }
> catch (const xml_schema::exception& e)
> {
> std::cerr << e << std::endl;
> }
>
> This way you will get more information about the error.
>
>
> > I have tried this on windows and linux, with versions 2.3, 3.0, and 3.1
> > all produce the same error...
> >
> > is there an error in the parsing design?
>
> There might be, or it could be the way you construct the object model
> from the text format (note also that XMLSpy is famous for successfully
> parsing invalid XML documents and schemas). If printing the error does
> not shed any new light, we will need a compilable test case to debug.
FYI- I was thinking my parsing design rather than yours. but I
figured that XSD's/ Xerces serialization validation would be as strong
as it's parsing validation.
There are one or two holes in XSD/ Xerces validation, though they are
not particularly problematic. On one test element that was restricted
by ennumeration, it did not catch that I had added a new value to the
ennumeration without updating the Schema. Other than that I have not
observed any errors...
-Russ
>
> Boris
More information about the xsd-users
mailing list