cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From papa nagy <grossva...@gmail.com>
Subject setting and reading generator parameters
Date Wed, 14 Jul 2010 12:42:21 GMT
hi,
i am writing a functioning XQueryGenerator for cocoon 2.2 and
exist-db. for this i registered the generator with type="xquery", and
is working quite well.

my problem is that although i can specify the collection in the
pipeline section but i would like to specify a default value in the
map:components section, preferably in the same way as
"use-request-parameters" for the transformers. here in the
TraxTransformer there is a "conf" passed to the "configure" method
with these parameters specified. How can I make it work with a
generator?

thanks a lot

in the map:components
-------------------------------------------------------------------
<map:components>
     <map:generators default="file">
           <map:generator name="xquery"
              logger="sitemap.generator.xquery"
               src="package.XQueryGenerator"/>
       </map:generators>
    <map:transformers default="xslt">
			<map:transformer name="xslt-with-parameters"
				src="org.apache.cocoon.transformation.TraxTransformer">
			<use-request-parameters>true</use-request-parameters>
			</map:transformer>
       </map:transformers>

...
-------------------------------------------------------------------
and using it with:
-------------------------------------------------------------------
		<map:pipeline>
           <map:match pattern="stat">
              <map:generate src="xquery/stat.xq" type="xquery">
				<map:parameter name="collection"
value="xmldb:exist://192.168.3.23:8080/exist/xmlrpc/db/stat"/>
			  </map:generate>
			  <map:transform src="static/stat_to_html.xslt"/>
              <map:serialize encoding="UTF-8" type="html"/>
           </map:match>
        </map:pipeline>
-------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message