You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andreas Busch <An...@ilogics.de> on 2005/03/02 15:38:49 UTC
XSP and parameters
Sorry for this basic question:
I try to send a Parameter to a query with the following logic:
url: ..../media.xml?p=4
in sitemap:
<map:match pattern="media.xml">
<map:generate src="media.xsp" type="serverpages">
<map:parameter name="pg" value="{request-param:p}"/>
</map:generate>
and in XSP-file :
.....WHERE nr =<esql:parameter><xsp:value-of select="$pg"/>
</esql:parameter>
the parameter is almost empty !
Any help ?
Examples welcome !!
Andreas Busch
RE: XSP and parameters
Posted by Carlos Chávez <cc...@agssa.net>.
Carlos Chávez Escribio :-)
>
> Andreas Busch Escribio :-)
>> Thank's a lot for the example
>> but I can't get it work
>>
>> My test:
>>
>> Test.xsp
>> <xsp:page language="java" xmlns:esql="http://apache.org/cocoon/SQL/v2"
>> xmlns:xsp="http://apache.org/xsp"
>> xmlns:util="http://apache.org/xsp/util/2.0"
>> xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
>> xmlns:xsp-request="http://apache.org/xsp/request/2.0">
>> <page>
>> <images>
>> <xsp:request-get-parameter name="p"/>
>> </images>
>> </page>
>> </xsp:page>
>
> Hi Andreas,
>
> Try this:
>
> <xsp:expr><xsp:request-get-parameter name="p"/></xsp:expr>
Hi,
the correct tag is:
<xsp-request:get-parameter name="p"/>
Cheers,
Carlos Chávez.
>
> Cheers,
> Carlos Chávez.
>
>>
>>
>> Sitemap:
>> <map:match pattern="media.xml">
>> <map:generate src="test1.xsp" type="serverpages">
>> <map:parameter name="use-request-parameters" value="true" />
>> <!--map:parameter name="pg"
>> value="{request-param:p}"/-->
>> </map:generate>
>> <map:serialize type="xml" />
>> </map:match>
>>
>> Request is: ..../media/media.xml?p=2
>>
>> Result is
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <page xmlns:xsp="http://apache.org/xsp"
>> xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
>> xmlns:util="http://apache.org/xsp/util/2.0"
>> xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1"
>> xmlns:esql="http://apache.org/cocoon/SQL/v2"
>> xmlns:xsp-request="http://apache.org/xsp/request/2.0">
>> <images>
>>
>> </images>
>> </page>
>>
>> What im missing ????
>>
>>
>> Andreas Busch
>>
>>
>> -----Original Message-----
>> From: Pierre-Yves Landuré [mailto:py.landure@dorigo.fr]
>> Sent: Wednesday, March 02, 2005 4:11 PM
>> To: users@cocoon.apache.org
>> Subject: Re: XSP and parameters
>>
>> <xsp-request:get-parameter> can help you ;)
>>
>> example is :
>>
>>
>> <xsp:page
>> xmlns:xsp="http://apache.org/xsp"
>> xmlns:util="http://apache.org/xsp/util/2.0"
>> xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
>> xmlns:xsp-request="http://apache.org/xsp/request/2.0"
>> language="java">
>>
>> <xsp-request:get-parameter name="pg" /> </xsp:page> Andreas Busch
>> wrote:
>>
>>> Sorry for this basic question:
>>>
>>> I try to send a Parameter to a query with the following logic:
>>>
>>> url: ..../media.xml?p=4
>>>
>>> in sitemap:
>>>
>>> <map:match pattern="media.xml">
>>>
>>> <map:generate src="media.xsp" type="serverpages">
>>>
>>> <map:parameter name="pg" value="{request-param:p}"/>
>>>
>>> </map:generate>
>>>
>>> and in XSP-file :
>>>
>>> .....WHERE nr =<esql:parameter><xsp:value-of select="$pg"/>
>>> </esql:parameter>
>>>
>>> the parameter is almost empty !
>>>
>>> Any help ?
>>> Examples welcome !!
>>>
>>> Andreas Busch
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>
>
> --
> Carlos Chávez
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
--
Carlos Chávez
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: XSP and parameters
Posted by Carlos Chávez <cc...@agssa.net>.
Andreas Busch Escribio :-)
> Thank's a lot for the example
> but I can't get it work
>
> My test:
>
> Test.xsp
> <xsp:page language="java" xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:util="http://apache.org/xsp/util/2.0"
> xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0">
> <page>
> <images>
> <xsp:request-get-parameter name="p"/>
> </images>
> </page>
> </xsp:page>
Hi Andreas,
Try this:
<xsp:expr><xsp:request-get-parameter name="p"/></xsp:expr>
Cheers,
Carlos Chávez.
>
>
> Sitemap:
> <map:match pattern="media.xml">
> <map:generate src="test1.xsp" type="serverpages">
> <map:parameter name="use-request-parameters" value="true" />
> <!--map:parameter name="pg"
> value="{request-param:p}"/-->
> </map:generate>
> <map:serialize type="xml" />
> </map:match>
>
> Request is: ..../media/media.xml?p=2
>
> Result is
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <page xmlns:xsp="http://apache.org/xsp"
> xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
> xmlns:util="http://apache.org/xsp/util/2.0"
> xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0">
> <images>
>
> </images>
> </page>
>
> What im missing ????
>
>
> Andreas Busch
>
>
> -----Original Message-----
> From: Pierre-Yves Landuré [mailto:py.landure@dorigo.fr]
> Sent: Wednesday, March 02, 2005 4:11 PM
> To: users@cocoon.apache.org
> Subject: Re: XSP and parameters
>
> <xsp-request:get-parameter> can help you ;)
>
> example is :
>
>
> <xsp:page
> xmlns:xsp="http://apache.org/xsp"
> xmlns:util="http://apache.org/xsp/util/2.0"
> xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0"
> language="java">
>
> <xsp-request:get-parameter name="pg" /> </xsp:page> Andreas Busch
> wrote:
>
>> Sorry for this basic question:
>>
>> I try to send a Parameter to a query with the following logic:
>>
>> url: ..../media.xml?p=4
>>
>> in sitemap:
>>
>> <map:match pattern="media.xml">
>>
>> <map:generate src="media.xsp" type="serverpages">
>>
>> <map:parameter name="pg" value="{request-param:p}"/>
>>
>> </map:generate>
>>
>> and in XSP-file :
>>
>> .....WHERE nr =<esql:parameter><xsp:value-of select="$pg"/>
>> </esql:parameter>
>>
>> the parameter is almost empty !
>>
>> Any help ?
>> Examples welcome !!
>>
>> Andreas Busch
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
--
Carlos Chávez
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: XSP and parameters
Posted by Andreas Busch <An...@ilogics.de>.
Thank's a lot for the example
but I can't get it work
My test:
Test.xsp
<xsp:page language="java" xmlns:esql="http://apache.org/cocoon/SQL/v2"
xmlns:xsp="http://apache.org/xsp"
xmlns:util="http://apache.org/xsp/util/2.0"
xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
xmlns:xsp-request="http://apache.org/xsp/request/2.0">
<page>
<images>
<xsp:request-get-parameter name="p"/>
</images>
</page>
</xsp:page>
Sitemap:
<map:match pattern="media.xml">
<map:generate src="test1.xsp" type="serverpages">
<map:parameter name="use-request-parameters" value="true" />
<!--map:parameter name="pg"
value="{request-param:p}"/-->
</map:generate>
<map:serialize type="xml" />
</map:match>
Request is: ..../media/media.xml?p=2
Result is
<?xml version="1.0" encoding="ISO-8859-1"?>
<page xmlns:xsp="http://apache.org/xsp"
xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
xmlns:util="http://apache.org/xsp/util/2.0"
xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
xmlns:xsp-request="http://apache.org/xsp/request/2.0">
<images>
</images>
</page>
What im missing ????
Andreas Busch
-----Original Message-----
From: Pierre-Yves Landuré [mailto:py.landure@dorigo.fr]
Sent: Wednesday, March 02, 2005 4:11 PM
To: users@cocoon.apache.org
Subject: Re: XSP and parameters
<xsp-request:get-parameter> can help you ;)
example is :
<xsp:page
xmlns:xsp="http://apache.org/xsp"
xmlns:util="http://apache.org/xsp/util/2.0"
xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
language="java">
<xsp-request:get-parameter name="pg" /> </xsp:page> Andreas Busch wrote:
> Sorry for this basic question:
>
> I try to send a Parameter to a query with the following logic:
>
> url: ..../media.xml?p=4
>
> in sitemap:
>
> <map:match pattern="media.xml">
>
> <map:generate src="media.xsp" type="serverpages">
>
> <map:parameter name="pg" value="{request-param:p}"/>
>
> </map:generate>
>
> and in XSP-file :
>
> .....WHERE nr =<esql:parameter><xsp:value-of select="$pg"/>
> </esql:parameter>
>
> the parameter is almost empty !
>
> Any help ?
> Examples welcome !!
>
> Andreas Busch
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: XSP and parameters
Posted by Pierre-Yves Landuré <py...@dorigo.fr>.
<xsp-request:get-parameter> can help you ;)
example is :
<xsp:page
xmlns:xsp="http://apache.org/xsp"
xmlns:util="http://apache.org/xsp/util/2.0"
xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
language="java">
<xsp-request:get-parameter name="pg" />
</xsp:page>
Andreas Busch wrote:
> Sorry for this basic question:
>
> I try to send a Parameter to a query with the following logic:
>
> url: ..../media.xml?p=4
>
> in sitemap:
>
> <map:match pattern="media.xml">
>
> <map:generate src="media.xsp" type="serverpages">
>
> <map:parameter name="pg" value="{request-param:p}"/>
>
> </map:generate>
>
> and in XSP-file :
>
> .....WHERE nr =<esql:parameter><xsp:value-of select="$pg"/>
> </esql:parameter>
>
> the parameter is almost empty !
>
> Any help ?
> Examples welcome !!
>
> Andreas Busch
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org