Hi Ivan,

Ivan Brusic wrote:

> I don't want to apply a converter to the top-level class. That would
> require too much work whenever a new field is added.

That's why there are reflection-based converters.

> Adding a simple
> annotation to a single variable is already a compromise. I am trying to
> clean up the current logic which is not maintainable.
> 
> So basically Converters do not have access to the field name of the
> variable they are annotating?

No. This is by design.

> I will only be annotating Java primitives
> (although I can switch to the class equivalents) and Strings.

Look at the code of the ToAttributedValueConverter. That one does something 
similar, you should be able to adapt the code to an own converter that does 
what you need.

> Back to the XSL route. I already created an XSLT that output the format
> that I require, but according the the example, it seems like the
> transformation occurs parallel to the marshal call. I need the
> transformation to occur after marshaling has occurred. I have not actually
> run the code, but that is my take on the code.

XStream has a streaming model. If you want to post-process the resulting 
XML, simply act when XStream is finished.

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to