cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Claude Moissinac" <>
Subject Getting a parameter from the header or from a dynamic XML document
Date Fri, 24 Mar 2006 16:54:18 GMT
I'm trying to get an information from the HTTP header

I have tried with the Request Generator, something like
      <map:match pattern="request.xml">
        <map:generate type="request">
		    <map:parameter name="generate-attributes" value="true"/>
	    <map:serialize type="xml"/>

I get something like
<?xml version="1.0" encoding="ISO-8859-1"?>
<h:request xmlns:h=""
target="/filtres/req.svg" sitemap="req.svg" source="">
<h:header name="host">localhost:8282</h:header>
<h:header name="user-agent">GPAC 0.4.1-DEV</h:header><h:header
<h:header name="terminal">Nokia3650</h:header><h:header
And  extract the value I need from request.xml. But as I need only one
value from the header, I'm searching another solution. And more, as I
want to give this value as a parameter for an XSL transformation or to
use this value for a selector, extractiong the value from an XML file
is not easy.

I've tried to use request.xml as the source of a XMLFileModule, but it
seems to be not possible to address such a dynamic xml file from the

I heve tried with the Request Module
        <map:transform src="text2svg.xsl">
          <map:parameter name="terminal"    value="{request:terminal}"/>
So, I try to use the 'terminal' value present in my request as a
parameter of my transformation. But {request:terminal} seems to be

So, I'm searching a good way to extract a value from the header or to
use a value extracted from a dynamically created xml document as a
parameter for a pipeline.

Thank's in adavance

Jean-Claude Moissinac
Department of Computer Science and Networks
ENST Paris

Tel: (+33)
Fax: (+33)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message