Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 88103 invoked from network); 12 Aug 2004 12:00:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Aug 2004 12:00:57 -0000 Received: (qmail 96248 invoked by uid 500); 12 Aug 2004 12:00:52 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 95922 invoked by uid 500); 12 Aug 2004 12:00:49 -0000 Mailing-List: contact docs-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: docs@cocoon.apache.org Delivered-To: mailing list docs@cocoon.apache.org Received: (qmail 95910 invoked by uid 99); 12 Aug 2004 12:00:49 -0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Thu, 12 Aug 2004 05:00:49 -0700 Received: (qmail 87967 invoked from network); 12 Aug 2004 12:00:46 -0000 Received: from localhost.hyperreal.org (HELO minotaur.apache.org) (127.0.0.1) by localhost.hyperreal.org with SMTP; 12 Aug 2004 12:00:46 -0000 Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: docs@cocoon.apache.org To: docs@cocoon.apache.org Subject: =?iso-8859-1?q?=5BCocoon_Wiki=5D_New=3A__ResponseHeaderTransformer?= Date: Thu, 12 Aug 2004 12:00:46 -0000 Message-ID: <20040812120046.87961.87147@minotaur.apache.org> X-Spam-Rating: localhost.hyperreal.org 1.6.2 0/1000/N X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Date: 2004-08-12T05:00:46 Editor: NicoVerwer Wiki: Cocoon Wiki Page: ResponseHeaderTransformer URL: http://wiki.apache.org/cocoon/ResponseHeaderTransformer no comment New Page: =3D=3D ResponseHeaderTransformer =3D=3D - TARGET-AUDIENCE: '''*beginner*''' advanced expert[[BR]] - COCOON-RELEASES: 2.0.3, 2.0.4[[BR]] - DOCUMENT-STATUS: '''*draft*''' reviewed released[[BR]] ---- This is a simple transformer that allows you to set HTTP response headers f= rom the content of the XML that flows through the pipeline. Other ways to set response headers are: * HttpHeaderAction, which takes headers from the sitemap: {{{ }}} * From Flow, which takes the header from a Flowscript: {{{ cocoon.response.setHeader("Cache-Control", "no-cache") }}} The ResponseHeaderTransformer is different from either of these methods, be= cause it takes the header names and values from the XML that is processed b= y the pipeline. '''Declaration in sitemap:''' {{{ }}} '''Usage in pipeline:''' {{{ }}} The transformer will look for elements in the "http://apache.org/cocoon/res= ponseHeader/1.0" namespace: = {{{ }}} These elements are removed from the XML, and the header (Cache-Control) is = set (to "no-cache").