To be simple

I have a value in an xml file which must be use as a paraemeter for a
transformation or a reference value for a selector?
What is the recommended method to extract the value?



On 3/24/06, Jean-Claude Moissinac <[EMAIL PROTECTED]> wrote:
> 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:generate>
>             <map:serialize type="xml"/>
>       </map:match>
>
> I get something like
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <h:request xmlns:h="http://apache.org/cocoon/request/2.0";
> target="/filtres/req.svg" sitemap="req.svg" source="">
> <h:requestHeaders>
> <h:header name="host">localhost:8282</h:header>
> <h:header name="user-agent">GPAC 0.4.1-DEV</h:header><h:header
> name="accept">*/*</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
> XMLFileModule.
>
> 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
> empty.
>
> 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
> FRANCE
>
> E-mail: [EMAIL PROTECTED]
> Tel: (+33) 1.45.81.80.88
> Fax: (+33) 1.45.81.71.58
>
> http://shadok.enst.fr/jcm
>


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

E-mail: [EMAIL PROTECTED]
Tel: (+33) 1.45.81.80.88
Fax: (+33) 1.45.81.71.58

http://shadok.enst.fr/jcm

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

Reply via email to