[xsde-users] XSD/e 3.0.0 released

Boris Kolpackov boris at codesynthesis.com
Mon Feb 9 08:41:57 EST 2009


Hi Filippo,

Della Betta Filippo <filippo.dellabetta at telecomitalia.it> writes:

> I did the same for the serializer (providing a new implementation 
> for listType_simpl and list_simpl with --custom-serializer, putting 
> a std::stack of state and implementing post() callback to do pop() 
> on the stack). Attached the custom implementation files. Do you think
> it is the correct way to do this ?

The only problem with your implementation that I can see is that you
don't call listType_simpl::post() from list_simpl::post(). This way,
the state stack will keep growing if you reuse the serializer. Also,
since the list type itself does not have any elements or attributes,
list_simpl doesn't really need any state. I am attaching the modified
list-simpl.* files for your reference. The test driver produces the
output XML identical to the input.

Boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: list-simpl.h
Type: text/x-chdr
Size: 350 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20090209/5949688c/list-simpl.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: list-simpl.cpp
Type: text/x-c++src
Size: 358 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20090209/5949688c/list-simpl.cpp


More information about the xsde-users mailing list