You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Berin Loritsch <bl...@apache.org> on 2001/08/23 16:30:33 UTC

Re: [C2.1] You can only select one Generator (file)

java guru wrote:
> 
> Hi.,
>   I have just used the following successfully..
> ************************************************
>    <map:match pattern="welcome2">
>         <map:act type="session-isvalid">
>                 <map:generate src="docs/samples/samples.xml"/>
>                 <map:serialize/>
>         </map:act>
>                 <map:generate src="docs/samples/hello-page.xml"/>
>                 <map:serialize/>
>    </map:match>
> 
> ****************************************
> As u can see., i am using two generators...


Actually, The sitemap only uses the first one set.  What will happen
with this construct is this:

If the Action returns null, the second generate/serialize pair will
be executed.

If the Action returns a Map, the first generate/serialize pair will
be executed.


As u can see, You are really only using 1 (one) generator...

> 
>  --- Philipp Schmidt <ph...@codamax.com> wrote: > Hi
>  all,
> >
> >  why does something like this
> >
> >  <map:match pattern="navigation.xml">
> >   <map:act type="session-validator">
> >     <map:parameter name="descriptor"
> > value="context://auth//descriptors//params.xml"/>
> >        <map:parameter name="validate"
> > value="username"/>
> >       <map:generate src="myNavigation.xml"/>
> >       <map:transform src="myNavigation.xsl"/>
> >    </map:act>
> >        <map:generate src="anotherNavigation.xml"/>
> >        <map:serialize/>
> >    </map:match>
> >
> > generate a  "org.apache.cocoon.ProcessingException:
> > Generator already
> > set. You can only select one Generator (file)"
> > error.
> > I can't switch to  <map:redirect-to
> > uri="anotherNavigation.xml"/>
> > beacuse navigation.xml will be aggregated and this
> > gives me no result .
> > Any clues how to fix this or is there any reason why
> > i can't do two
> > <map:generate> ?
> >
> > Thanks advance
> >
> > Philipp
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > Please check that your question has not already been
> > answered in the
> > FAQ before posting.
> > <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail:
> > <co...@xml.apache.org>
> > For additional commands, e-mail:
> > <co...@xml.apache.org>
> >
> 
> =====
> Thanks and have great day
> srini
> 
> ____________________________________________________________
> Do You Yahoo!?
> Send a newsletter, share photos & files, conduct polls, organize chat events. Visit http://in/ groups.yahoo.com
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>

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

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


Re: [C2.1] You can only select one Generator (file)

Posted by java guru <ja...@yahoo.co.in>.
Hi.,
  Sorry if i gave the impression that i AM  using two
generators..
  The orginal author of this problem seems to have
problem with coding two generators inside a
map:match..

You are right in the sense that logically only one
generator is used..

 --- Berin Loritsch <bl...@apache.org> wrote: >
java guru wrote:
> > 
> > Hi.,
> >   I have just used the following successfully..
> > ************************************************
> >    <map:match pattern="welcome2">
> >         <map:act type="session-isvalid">
> >                 <map:generate
> src="docs/samples/samples.xml"/>
> >                 <map:serialize/>
> >         </map:act>
> >                 <map:generate
> src="docs/samples/hello-page.xml"/>
> >                 <map:serialize/>
> >    </map:match>
> > 
> > ****************************************
> > As u can see., i am using two generators...
> 
> 
> Actually, The sitemap only uses the first one set. 
> What will happen
> with this construct is this:
> 
> If the Action returns null, the second
> generate/serialize pair will
> be executed.
> 
> If the Action returns a Map, the first
> generate/serialize pair will
> be executed.
> 
> 
> As u can see, You are really only using 1 (one)
> generator...
> 
> > 
> >  --- Philipp Schmidt <ph...@codamax.com> wrote:
> > Hi
> >  all,
> > >
> > >  why does something like this
> > >
> > >  <map:match pattern="navigation.xml">
> > >   <map:act type="session-validator">
> > >     <map:parameter name="descriptor"
> > >
> value="context://auth//descriptors//params.xml"/>
> > >        <map:parameter name="validate"
> > > value="username"/>
> > >       <map:generate src="myNavigation.xml"/>
> > >       <map:transform src="myNavigation.xsl"/>
> > >    </map:act>
> > >        <map:generate
> src="anotherNavigation.xml"/>
> > >        <map:serialize/>
> > >    </map:match>
> > >
> > > generate a 
> "org.apache.cocoon.ProcessingException:
> > > Generator already
> > > set. You can only select one Generator (file)"
> > > error.
> > > I can't switch to  <map:redirect-to
> > > uri="anotherNavigation.xml"/>
> > > beacuse navigation.xml will be aggregated and
> this
> > > gives me no result .
> > > Any clues how to fix this or is there any reason
> why
> > > i can't do two
> > > <map:generate> ?
> > >
> > > Thanks advance
> > >
> > > Philipp
> > >
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > Please check that your question has not already
> been
> > > answered in the
> > > FAQ before posting.
> > > <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail:
> > > <co...@xml.apache.org>
> > > For additional commands, e-mail:
> > > <co...@xml.apache.org>
> > >
> > 
> > =====
> > Thanks and have great day
> > srini
> > 
> >
>
____________________________________________________________
> > Do You Yahoo!?
> > Send a newsletter, share photos & files, conduct
> polls, organize chat events. Visit http://in/
> groups.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > Please check that your question has not already
> been answered in the
> > FAQ before posting.
> <http://xml.apache.org/cocoon/faqs.html>
> > 
> > To unsubscribe, e-mail:
> <co...@xml.apache.org>
> > For additional commands, e-mail:
> <co...@xml.apache.org>
> 
>
---------------------------------------------------------------------
> Please check that your question has not already been
> answered in the
> FAQ before posting.
> <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail:
> <co...@xml.apache.org>
> For additional commands, e-mail:
> <co...@xml.apache.org>
>  

=====
Thanks and have great day
srini

____________________________________________________________
Do You Yahoo!?
Send a newsletter, share photos & files, conduct polls, organize chat events. Visit http://in/ groups.yahoo.com

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

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