Is is possible to use XSLT to marshall/unmarshall between xml format and GORM domain objects?

37 views
Skip to first unread message

masaharo

unread,
Sep 18, 2009, 7:44:57 AM9/18/09
to grails-jaxrs, matti...@sanoma.fi
It is not allways possible to use the same XML format for getting data
from or putting data into database via rest. Often companies have
adapted their specific XML dialects. Is it possible to use these
dialects and still keep using the grails-jaxrs plugin with it's great
set of features?

Martin Krasser

unread,
Sep 18, 2009, 9:33:28 AM9/18/09
to grails-jaxrs
There's currently no such interface for applying XSLT transformations
to standard Grails XML representations of domain objects. You'd need
to write a custom entity provider to do the XSLT transformation. For
instructions how to wirte custom entity providers for domain objects
see http://code.google.com/p/grails-jaxrs/wiki/AdvancedFeatures#Entity_providers.

I'll add this as a feature request to the issue tracker. Btw, any
contributions are welcome :)

masaharo

unread,
Sep 21, 2009, 5:44:18 AM9/21/09
to grails-jaxrs
Thanks for the hint!

It seems a simple way to deal with custom XML formats to use the
custom entity provider functionality.
Using them there is no urgent need for XSLT transformations in this
case. Just need to implement the groovy-XML-conversion in both ways,
MessageBodyReaderSupport and MessageBodyWriterSupport, which is also
the case when using custom XSLT transformations.




On Sep 18, 4:33 pm, Martin Krasser <krass...@googlemail.com> wrote:
> There's currently no such interface for applying XSLT transformations
> to standard Grails XML representations of domain objects. You'd need
> to write a custom entity provider to do the XSLT transformation. For
> instructions how to wirte custom entity providers for domain objects
> seehttp://code.google.com/p/grails-jaxrs/wiki/AdvancedFeatures#Entity_pr....
Reply all
Reply to author
Forward
0 new messages