Hi Luca:

I did something like this in my sitemap:

    <map:match pattern="request">
     <map:generate type="request"/>
     <map:transform src="stylesheets/request.xsl"/>
     <map:serialize/>
    </map:match>


My request.xsl looks like this:

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:request="http://xml.apache.org/cocoon/requestgenerator/2.0";>

   <xsl:template match="/">
    <html>
    <head>
     <title>Request Test</title>
     </head>
     <body bgcolor="#ffffff">
      <h1>Request Test</h1>
        <xsl:apply-templates/>
     </body>
    </html>
   </xsl:template>

   <xsl:template match="request:requestHeaders">
    <h3>Request Headers</h3>
    <ul>
     <xsl:apply-templates/>
    </ul>
    <br/>
   </xsl:template>

   <xsl:template match="request:requestParameters">
    <h3>Request Parameters</h3>
    <ul>
     <xsl:apply-templates/>
    </ul>
    <br/>
   </xsl:template>

   <xsl:template match="request:configurationParameters">
    <h3>Configuration Parameters</h3>
    <ul>
     <xsl:apply-templates/>
    </ul>
    <br/>
   </xsl:template>

   <xsl:template match="request:header">
    <li><xsl:value-of select="@name"/> = <xsl:apply-templates/></li>
   </xsl:template>

   <xsl:template match="request:parameter">
    <li><xsl:value-of select="@name"/> = <xsl:apply-templates/></li>
   </xsl:template>

</xsl:stylesheet>



Hope it helps.

Lajos
galatea.com

Luca Morandini wrote:

> Folks,
> 
>       has any of you been able to use Request Generator ?
> 
>       I tried hard to extract parameters (say, the host name) from a request
> generator's result via XSL... to no avail: has anyone had more luck (or
> expertise) ?
> 
> 
> Best regards,
> 
> ---------------------------------------------
>                Luca Morandini
>                GIS Consultant
>               [EMAIL PROTECTED]
>            +39 0744 598 51    Office
>            +39  335 681 02 12 Mobile
> http://utenti.tripod.it/lmorandini/index.html
> ---------------------------------------------
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 
> 



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to