cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Anderson <>
Subject XQueryTransformer
Date Tue, 15 Mar 2005 19:12:46 GMT
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:transformer name="xquery"

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">

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.

View raw message