users@jaxb.java.net

Re: Variable interpolation

From: Kenny MacLeod <kennym_at_kizoom.com>
Date: Sun, 21 Oct 2007 10:06:27 +0100

You could use an external .exj binding file to attach the type adapters,
but I'm not sure if they can use type wildcards in that way.

To be honest, .xjb files are still a bit of a mystery to me, I just stab
around in the dark until I get one that vaguely works.


Brian Pontarelli wrote:
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>