Hello

Thankyou very much for these useful tips Joerg. It has also illustrated to me the use of the cocoon psuedo protocol. Very nice indeed.

Best wishes

Jon


On Sun, 19 Oct 2003 10:15:57 +0200 You wrote:

<map:match pattern="request.html">
  <map:aggregate element="root">
    <map:part src="cocoon:/request"/>
    <map:part src="other-file.xml"/>
  </map:aggregate>
  <map:transform src="aggregation2html.xsl"/>
  <map:serialize type="html"/>
</map:match>

<map:match pattern="request">
  <map:generate type="request"/>
  <map:serialize type="xml"/>
</map:match>

This is the general way. If the other-file.xml depends on a request parameter you can do like shown in the documentation at http://cocoon.apache.org/2.1/userdocs/concepts/modules-ref.html#RequestParameterModule.

If it depends on different request parameters you must change to sitemap to something like the following:

<map:match pattern="request.html">
  <map:generate type="request"/>
  <map:transform src="request2xinclude.xsl"/>
  <map:transform type="xinclude"/>
  <map:transform src="aggregation2html.xsl"/>
  <map:serialize type="html"/>
</map:match>

<map:match pattern="*.xml">
  <map:generate src="{1}.xml"/>
  <map:serialize type="xml"/>
</map:match>

The request2xinclude.xsl has to add an <xi:include/> element to the XML where its href attribute points to "cocoon:/anything.xml".

Joerg

On 19.10.2003 05:25, Jon Bedworth wrote:

Hello

I am prety much a novice at Cocoon and I was therefore wondering if anyone could provide me with some pointers on how to aggregate http request parameters with an xml file and serialise the output. Essentially I am attempting to query xml data via request parameters and return html pages back to the user based on their choices.

Specifically I want to do the following:

1. User requests a page using a url containing a querystring (not a form at this stage).

2. The parameters from this string are converted to xml (by using RequestGenerator)

3. This xml is passed along with some other xml file into some xsl which dynamically generates a new page based on the user's request and the existing xml data.

I know that the solution involves some combination of aggregation, mapping and include operations (e.g. cInclude) but I lack the necessary experience to know how to do this exactly.

Any thoughts gratefully appreciated, however brief.

Thankyou

Jon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________ Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to