You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gary Larsen <ga...@envisn.com> on 2005/07/14 15:26:52 UTC

Adding xml string to an aggregation

This is probably a simple concept I'm trying to understand so please forgive
me.

 

In the sitemap I'm aggregating various sources:

 

<map:aggregate element="root" >

    <map:part src="cocoon:/usersessionPart"/>

    <map:part src="xmldb:exist:///db/netvisn/content/{1}"/>

/map:aggregate>

 

I need to also aggregate an XML formatted string that I've generated in the
flow.  Is there syntax for using a request attribute as a source in an
aggregate or is there a better way to accomplish this?

 

Thanks,

Gary


Re: Adding xml string to an aggregation

Posted by Jorg Heymans <jh...@domek.be>.
Gary Larsen wrote:

> The sitemap aggregation part required map:generate:
> 
>       <map:match pattern="modelSpecPart">
>           <map:generate  src="module:flow-attr:modelSpec"/>
>           <map:serialize type="xml"/>
>       </map:match>
> 

I don't think you need to setup an extra pipeline just for the purpose
of aggregating it, following should work also:

<map:aggregate element="root" >
    <map:part src="cocoon:/usersessionPart"/>
    <map:part src="xmldb:exist:///db/netvisn/content/{1}"/>
    <map:part src="module:flow-attr:modelSpec"/>
/map:aggregate>


Regards
Jorg


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


RE: Adding xml string to an aggregation

Posted by Gary Larsen <ga...@envisn.com>.
Thanks for you help Jorg!

In the flow script I changed the send page:

	cocoon.sendPage(navPipeName, {"modelSpec": modelSpec}) ;

The sitemap aggregation part required map:generate:

      <map:match pattern="modelSpecPart">
          <map:generate  src="module:flow-attr:modelSpec"/>
          <map:serialize type="xml"/>
      </map:match>


Cheers,
Gary

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Jorg Heymans
Sent: Thursday, July 14, 2005 11:26 AM
To: users@cocoon.apache.org
Subject: Re: Adding xml string to an aggregation

Gary Larsen wrote:
> 
> I need to also aggregate an XML formatted string that I've generated in
> the flow.  Is there syntax for using a request attribute as a source in
> an aggregate or is there a better way to accomplish this?
> 

This came up a while ago. Have a look at [1], in particular
<map:read src="module:flow-attr:myxml"/>


HTH
Jorg

[1] http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=111799393328198&w=2


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


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


Re: Adding xml string to an aggregation

Posted by Jorg Heymans <jh...@domek.be>.
Gary Larsen wrote:
> 
> I need to also aggregate an XML formatted string that I’ve generated in
> the flow.  Is there syntax for using a request attribute as a source in
> an aggregate or is there a better way to accomplish this?
> 

This came up a while ago. Have a look at [1], in particular
<map:read src="module:flow-attr:myxml"/>


HTH
Jorg

[1] http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=111799393328198&w=2


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