Hi, For anyone using exist w/ cocoon... I'm attaching an XQueryTransformer which can be used in place of the XQueryGenerator. Besides leaving the precious gerenator spot available, another advantage is that you can use request parameters with multiple values...
The tranformer is setup in the sitemap.xmap:
<map:transformers>
<map:transformer name="xquery"
src="org.exist.cocoon.XQueryTransformer">
<collection>@exist.uri@/db</collection>
<user>@exist.user@</user>
<password>@exist.pass@</password>
<create-session>false</create-session>
<expand-xincludes>false</expand-xincludes>
expects a document like this:
<xqtr:xquery src="xquery/1.xq">
<xqtr:parameter name="team" value="Steelers"/>
<xqtr:parameter name="nothingHere"/>
<xqtr:parameter name="players">
<xqtr:value>Greg</xqtr:value>
<xqtr:value>Lloyd</xqtr:value>
</xqtr:parameter>
</xqtr:xquery>
All optional parameters must appear in the list. The transformer
returns the result of the xquery file referenced by the src attribute.
There are certain things I left out that appear in the
XQueryGenerator, because I simply didn't need them. So it may need
some additional work, depending on your needs.
-Ben
XQueryTransformer.java
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
