cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Guillard <pguill...@citycita.net>
Subject Re: error-handling on a "cincluded" pipeline only
Date Tue, 02 Aug 2005 17:01:54 GMT
Thanks a lot Yvan. I didn't understand why it is not possible with 
cocoon protocol but it helped.

Phil


Janet Yvan wrote:

>Hi.
>
>You may have to call the pipeline which uses the cinclude from another
>pipeline which will render the whole things except the cinclude. 
>
><map:pipeline>
> <map:match pattern="include">
>  <map:generate src="main"/>  
>  <map:transform src="cinclude_xsl.xsl"/>
>  <map:transform type="cinclude"/>
>  <map:serialize type="xml"/>
> </map:match>
>
> <map:handle-errors>
>  ...
> </map:handle-errors>
></map:pipeline>
>
><map:pipeline>
> <map:match pattern="main">
>  <map:generate src="http://.../include"/>
>  <map:transform src="my_page.xsl"/>
>  <map:serialize type="xhtml"/>
> </map:match>
></map:pipeline>
>
>I know this might not be the best way, but it is the only one I know and I
>know it works fine. What is not really good in such a thing is that you
>don't use cocoon's internal URLs, but it is the only way I found to validate
>data before the end of the pipeline.
>
>Yvan
>
>
>-----Message d'origine-----
>De : Philippe Guillard [mailto:pguillard@citycita.net] 
>Envoyé : mardi 2 août 2005 06:58
>À : users@cocoon.apache.org
>Objet : error-handling on a "cincluded" pipeline only
>
>Hi all,
>
>I'd like to handle the error on a "cincluded" pipeline without 
>generating an error for the main pipeline. I mean in case the cinclude 
>has a trouble, i still want the main thing to be rendered and just a 
>"not available " message in replavement of what should be rendered for 
>the cinclude. What should i do? Should be similar to portal coplets.
>
>Regards,
>Phil
>
>Sample:
>      <map:match pattern="main">
>        <map:generate src="main"/>
>         <map:transform src="main.xsl"/>    (inside there is a cinclude)
>         <map:transform type="cinclude"/>
>        <map:serialize/>
>      </map:match>
>
>    <map:match pattern="included">
>         <map:generate src="included.xml"/>  
>        <map:serialize/>
>        <!-- NOT OK
>        <map:handle-errors>
>          <map:transform src="stylesheets/system/error2html.xsl"/>
>          <map:serialize status-code="500"/>
>        </map:handle-errors>-->      
>    </map:match>
>
>    <!-- This generates an error page globally-->
>   <map:handle-errors>
>        <map:generate src="notavailable.xml"/>
>        <map:serialize/>
>   </map:handle-errors>
>
>---------------------------------------------------------------------
>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
>
>
>
>  
>


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


Mime
View raw message