Hi Casper,
I've added com.sun.jersey.api.provider.jaxb.XmlHeader annotation. If you
get the latest snapshot of Jersey, you can give it a try.
Martin
On 9.3.2011 21:21, Casper Bang wrote:
> I was wondering if there wasn't a way for me to associate a stylesheet
> with XML output generated by JAXB, such that browsers won't complain
> and would render things more pleasantly (i.e. underline links and make
> i easy to explore/navigate a resource graph). I've come across some
> interesting stuff in the jboss docs, hinting at an XmlHeader
> annotation:
> http://docs.jboss.org/resteasy/docs/1.1.GA/userguide/html/Built_in_JAXB_providers.html
> However, it is not to be found in JAXB nor supplemented by Jersey. In
> another thread Paul outlines a manual way to do it:
> http://jersey.576304.n2.nabble.com/Marshaling-JAXB-objects-including-stylesheet-information-td2429726.html
>
> I am curious, is there really no other way to do it? I realize of
> course that XML is for machine processing first and foremost, but I
> see no harm in supplying styling info now it's actually a W3C
> recommendation [http://www.w3.org/TR/xml-stylesheet/].
>
> /Casper