[Yanel-dev] Contract of BasicXMLResource subclasses, when
using controller-adapter
Cedric Staub
cedric.staub at wyona.com
Wed Oct 20 16:03:45 CEST 2010
Hello Rob
On Wed, Oct 20, 2010 at 02:10:29PM +0100, Rob Adamson wrote:
> All I need to know is how to use Jelly, or perhaps XSLT, to handle the
> 'done' view.
>
> My question is, how to I get data into this template, from the adapted
> resource's getContentXML.
>
> Should I output the data in the XML stream?
>
> Should I call some magic method?
>
> How should I refer to the data in the template?
There are two ways to do this as far as I know:
- In XSLT, the data needs to be available in the XML output generated by
the getContentXML function. The data generated by getContentXML is the
basis for the transformation with the given XSL stylesheet.
- In Jelly you can make a call to Java functions. You could simply
implement functions in your resource that return the data that you
want to have, and then call those functions from within Jelly.
I don't know how controller-adapter handles this though. I tried looking
at the source code of the controller-adapter resource type, and it looks
like both should be possible:
"Runs the pipeline of templates. You can feed an XML, JELLY or XSLT to
the pipe." -- JellyControllerAdapter.java
Sorry that this is all I can tell you, but I've never worked with the
controller-adapter resource before.
Greetings,
Cedric
More information about the Yanel-development
mailing list