[xsd-users] CodeSythesis XSD - CXX Tree Multithreading issue

Boris Kolpackov boris at codesynthesis.com
Tue Mar 6 09:05:15 EST 2012


Hi Tom,

In the future please keep your replies CC'ed to the xsd-users mailing
list as discussed in the posting guidelines:

http://www.codesynthesis.com/support/posting-guidelines.xhtml


tomislav.reichenbach at valida.at <tomislav.reichenbach at valida.at> writes:

> > 3. How do you see that the XML is incomplete? Do you write it to a file?
> >    Is it possible that not all the data has been flushed yet? Can you
> >    confirm that the object model is complete (i.e., that it is parsed
> >    correctly and the problem is in serialization)?
> 
> The thread is finished and returns with incomplete result. The model is
> parsed correctly, afterwards the calculation with the parsed model are
> done, and only then in the serialization phase the error occurs. I have
> spent some time analyzing the code and trying to see where it happens
> and have narrow it the the serialization call.

By "the error occurs" do you mean that an exception is thrown? Or does
the thread complete without any errors but the written XML is incomplete?

What happens if you disable your calculation code (i.e., just parse XML
into the object model and then write this object model back to XML without
any modifications)?

If none of this makes any difference, then the next step would be to
determine whether this is an XSD problems or a Xerces-C++ problem by
removing XSD from the equation. Right now, when you call an XSD-generated
parsing function, it first parses XML to DOM and then parses DOM to the
object model. Similarly, when you call the serialization function, it
first creates DOM from the object model and then serializes DOM to XML.
The idea is to just do: XML->DOM->XML. Will you be able to modify your
code to do this? You can find ready-to-use functions for DOM parsing and
serialization in the 'messaging' example (see the dom-{parse,serialize}.?xx
files).

Boris



More information about the xsd-users mailing list