users@jaxb.java.net

Variable interpolation

From: Brian Pontarelli <brian_at_pontarelli.com>
Date: Sat, 20 Oct 2007 08:59:31 -0600

I recall that this was brought up on the list a long time ago, but I
couldn't find it in the archives (or I might have dreamt it). I'm
trying to allow all String text bodies and attribute values to have
variables interpolated in a JSP (or unified) EL fashion:

<example attr="${variable1}">${variable2}</example>

The XmlAdapter looks like it might work, but this might require a plugin
for XJC to add the XmlJavaTypeAdapter annotation to all the Strings or
some by-hand work. Is there any other mechanism for handling all types
during the unmarshalling that I could leverage to reduce the overall
work involved?

It would also be nice to be able to handle all the values including
primitives, wrappers, lists, arrays, etc as well and not just the
Strings. Anyone have ideas?

Thanks,
-bp