cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: Trigger Cocoon http response code from within XSL code
Date Thu, 12 Dec 2013 23:49:02 GMT
Daniel Schmidt wrote:
> Hi Thorsten,
> 
> Thanks for pointing out actions. I will have a closer look at them.
> 
> Setting the status code is no problem, we already do that. The problem is that we only
know within the XSLT code if a page is available in a certain country, because this is defined
in XML.

Could use "stylesheet-directed termination" (xsl:message terminate="yes")
Then in the relevant sitemap use "map:handle-errors" to set the status-code
on the serializer.
http://forrest.apache.org/faq.html#handle-errors

-David

> Thanks.
> 
> 
> 
> From: Thorsten Scherler [mailto:scherler@gmail.com]
> Sent: Donnerstag, 12. Dezember 2013 14:33
> To: users@cocoon.apache.org
> Subject: Re: Trigger Cocoon http response code from within XSL code
> 
> On 12/12/2013 02:21 PM, Daniel Schmidt wrote:
> Hi,
> 
> In our project we have multiple languages and some pages are not available in a certain
country. If that is the case, we just output a message. For Search engines it would be good
to respond with a different status code then 200.
> 
> The question is: Is it possible to trigger a different http status code from within the
XSL-code to the sitemap? Is there a way of doing something like that?
> 
> Thank you!
> Daniel
> 
> 
> Daniel Schmidt | Jr Web Developer | TomTom Business Solutions | daniel.schmidt@tomtom.com<mailto:daniel.schmidt@tomtom.com>
| +49(0)341 24495-920 office | +49(0)341 24495-888 fax | www.tomtom.com/business<http://www.tomtom.com/business>
> 
> 
> Depending which version I would suggest an action to do that. There are examples how
to set the status code, the question which one would you want to set? From within xslt I think
it is a bit more complicated.
> 
> salu2
> 
> 
> --
> 
> Thorsten Scherler <scherler.at.gmail.com>
> 
> codeBusters S.L. - web based systems
> 
> <consulting, training and solutions>
> 
> 
> 
> http://www.codebusters.es/

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


Mime
View raw message