Return-Path: X-Original-To: apmail-cocoon-users-archive@www.apache.org Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4171E10C3D for ; Thu, 12 Dec 2013 23:49:38 +0000 (UTC) Received: (qmail 97166 invoked by uid 500); 12 Dec 2013 23:49:37 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 97092 invoked by uid 500); 12 Dec 2013 23:49:37 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 97085 invoked by uid 99); 12 Dec 2013 23:49:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Dec 2013 23:49:37 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [66.111.4.28] (HELO out4-smtp.messagingengine.com) (66.111.4.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Dec 2013 23:49:32 +0000 Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id DF3AC20D77 for ; Thu, 12 Dec 2013 18:49:05 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Thu, 12 Dec 2013 18:49:05 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:subject:message-id :references:mime-version:content-type:in-reply-to; s=smtpout; bh=CPniw8gxW5Hnh8Mn4COqZQZ6hvU=; b=ODyZZY1i7aeF1ts3feXdRl2wa5+/ oAcddkJ2yh2ZHZrNaklG8z7KruV4CswHqpHudU8BOGWXgQiMUHDWh6nZEDIkznYn P2QTinP/IzmB/diYxw22vNRozDIsLF3L8k70q9isVjRcDxPY0XAKkP11vorHUF7h iUM2N+jtPH/aKp4= X-Sasl-enc: QDZzhpDaZYcbMzO/YyOhWeTlrc/TVDmGWnyLREWTlDwQ 1386892145 Received: from localhost (unknown [123.51.79.54]) by mail.messagingengine.com (Postfix) with ESMTPA id 2AF6CC00E84 for ; Thu, 12 Dec 2013 18:49:04 -0500 (EST) Date: Fri, 13 Dec 2013 10:49:02 +1100 From: David Crossley To: users@cocoon.apache.org Subject: Re: Trigger Cocoon http response code from within XSL code Message-ID: <20131212234902.GC248@igmb.local> References: <31DE4BD22F1A1246AD1A584BC505CAD09604EF2C@NLSRVWP-EXM01.ttg.global> <52A9BB09.1030905@gmail.com> <31DE4BD22F1A1246AD1A584BC505CAD09604EFBB@NLSRVWP-EXM01.ttg.global> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31DE4BD22F1A1246AD1A584BC505CAD09604EFBB@NLSRVWP-EXM01.ttg.global> User-Agent: Mutt/1.4.2.3i X-Virus-Checked: Checked by ClamAV on apache.org 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 | +49(0)341 24495-920 office | +49(0)341 24495-888 fax | 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 > > codeBusters S.L. - web based systems > > > > > > http://www.codebusters.es/ --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org