You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by SAXESS - Hussayn Dabbous <da...@saxess.com> on 2003/02/06 11:07:49 UTC

Using the results of an aggregate part.

Hy,

I need to transform one source into two different views
and finally collect these views into one single output page.

I do this with an aggregation, that implicitly calls the
same source twice and feeds the result into different
transformers:


<map:match pattern="search/canvas">
   <map:aggregate element="canvas">
     <map:part element = "coll" src="cocoon:/search/coll"/>
     <map:part element = "mask" src="cocoon:/search/mask"/>
   </map:aggregate>
   <map:transform src = "canvas.xsl"/>
   <map:serialize type = "html"/>
</map:match>

<map:match pattern="/search/coll">
   <map:generate src="http://myserver/collection.xml"/>
   <map:transform src="collection.xsl"/>
   <map:serialize type = "xml"/>
</map:match>

<map:match pattern="/search/mask">
   <map:generate src="http://myserver/collection.xml"/>
   <map:transform src="mask.xsl"/>
   <map:serialize type = "xml"/>
</map:match>

The goal is to call the http: request only once,
not twice as is done with the sitemap above.

One possible solution would be to create one single
XSL-transform by merging the rules of canvas.xsl
and collection.xsl into one merge.xsl and add a template that
actually controls the merge. That would result in calling
the http only once, but i do not want to solve it like this,
because the only place, where i want to define the merge shall
be the sitemap i.e. within the first match rule above.

Now the question raises, how i can gather an xml-fragment,
put it into some temporary place (ideally in memory) and
refer to this fragement from another part of the pipeline.
On top of this the xml-fragment should be kept local to the
request (each request retrieves the fragment and puts it
into a request-bound place and after the request terminates throw
away the fragment)

any ideas, how this could be achieved ?

regards, hussayn

-- 
Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
50935 Köln
Telefon: +49-221-56011-0
Fax:     +49-221-56011-20
E-Mail:  dabbous@saxess.com



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>