Request Generator
http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Main
User Documentation
Generators
Overview
Default
File Generator
Core
HTML Generator
Directory Generator
Image Directory Generator
Fragment Extractor Generator
JSP Generator
Script Generator
Server Pages Generator
Velocity Generator
Request Generator
Status Generator
Stream Generator
Error Generator
Optional
Php Generator

Request Generator

The request generator uses the current request to produce xml data. It converts some of the information contained in the request to structured xml.

  • Name : request
  • Class: org.apache.cocoon.generation.RequestGenerator
  • Cacheable: no.
     
  <map:generate type="request"/>
  <!-- The src attribute is optional -->
     

The output has the following schema. All elements have the namespace http://xml.apache.org/cocoon/requestgenerator/2.0

     
<?xml version="1.0" encoding="UTF-8"?>

<!-- The root element is request. The target attribute is the requested uri
     and the source attribute is the optional source attribute of the sitemap
     entry for this pipeline. -->
<request target="/cocoon/request" source=""
         xmlns="http://xml.apache.org/cocoon/requestgenerator/2.0">

  <!-- First the headers: -->
  <requestHeaders>
    <header name="accept-language">de</header>
    <header name="connection">Keep-Alive</header>
    <header name="accept">image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*</header>
    <header name="host">thehost.serving.cocoon2</header>
    <header name="accept-encoding">gzip, deflate</header>
    <header name="user-agent">Browser User Agent</header>
    <header name="referer">http://thehost.serving.cocoon2/cocoon/welcome</header>
  </requestHeaders>

  <!-- All request parameters: -->
  <requestParameters>
    <!-- Create a parameter element for each parameter -->
    <parameter name="login">
      <!-- Create a value element for each value -->
      <value>test</value>
    </parameter>
  </requestParameters>

  <!-- All configuration parameters: -->
  <configurationParameters>
    <!-- Create a parameter element for each parameter specified in the pipeline
         for this generator-->
    <parameter name="test_sitemap_parameter">the value</parameter>
  </configurationParameters>

</request>


Copyright © 1999-2001 The Apache Software Foundation. All Rights Reserved.