users@jaxb.java.net

Re: XEW test project

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Sat, 12 Mar 2011 11:01:30 +0100

Hi Scott,

> Ok, no worries!  I'll stay tuned.  Also just wanted to know if I had the right email address ;)

I wanted to let you know about my progress. Unfortunatelly, it's not very good.

XJC per se does not support wrapper elements on the model level. This
means that with existing model APIs you can only do someting on the
very surface, in the generated code (like the old XEW plugin did).
This would work in isolation, but is hardly intergrateable with other
plugins.

The model API of XJC is generally too stiff for many use cases which I
also need. Therefore some time ago I've started working on my own
model API on top of XJC model API. I believe I've designed a very nice
API. Your case with XEW also fits in this model perfectly. I've
already implemented the plugin which replaces a chain of
property/class/property with a single property with a wrapper element.
So from this point of view it is implemented.

However, what I really underestimated and what appeared to be very
complex is code generation. The process is model > outline > code
model > source code. I have found out that I basically need to
reimplement the second step (outline > code model) fully. And this
appears to be pretty much.

I'll be working on this, but it seems that I'll have to postpone the
element wrapper plugin to one of the next versions.

Best wishes,
/lexi