On Mar 25, 2008, at 11:15 AM, shai200 wrote:
But I want the generator to take the XML output of my action and use
that as
the text to pass down, and not read a file or a servlet.
How do I do that?
Action should not be used to create whole XML content for the
generator. In this situation, you could use any of following approaches:
1. Action returns name of the source to use by generator:
<!-- Action which picks what source to use. Returns 'source'
parameter with URL -->
<map:act type="pick-a-source">
<map:generate src="{source}"/>
</map:act>
2. Instead of Action, implement a Generator and use it:
<!-- Call your 'xml-generation' generator which produces XML -->
<map:generate type="xml-generation"/>
3. Alternatively, implement a Source and use it:
<!-- Standard file generator accesses XML generated by your 'xml-
source' protocol -->
<map:generate src="xml-source:"/>
4. Check if any of existing input modules and/or sources provide the
needed functionality (probably by using XModuleSource, even though
previous 3 approaches are better)
Vadim
Vadim Gritsenko wrote:
On Mar 25, 2008, at 12:31 AM, shai200 wrote:
This doesn't work for me for some reason. I get an error (see end of
this
message).
<snip/>
And my sitemap entry is:
<map:match pattern="xmlaction">
<map:act type="xml-injection">
<map:generate>
<map:parameter name="param"
value="{paramAction}"/>
</map:generate>
Generator must have src attribute pointing to source document it
should use. For example, following would work:
<map:generate type="jx" src="pages/result.jx">
<map:parameter name="param" value="{paramAction}"/>
</map:generate>
Vadim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]