cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zack Angelo <z...@nostromocorp.com>
Subject Re: sitemap parameters into XSP
Date Wed, 08 May 2002 20:51:51 GMT
Ah, thanks. I just seem to be having a lot of trouble today. One more 
question. How do I specify the sitemap parameter as an attribute in the 
CInclude tag? I've tried

<xsp:element name="cinclude;include">
	<xsp:attribute...

and it generates the XML fine, but it doesn't include.  I know CInclude 
is working because I have a static statement earlier in the document. 
TIA.

-Zack

On Wednesday, May 8, 2002, at 03:06 PM, Lai, Harry wrote:

> Hi Zack,
>
> If I remember right, the cocoon:// protocol is not supported in the 
> XInclude
> transformer.  It is, however, supported in the CInclude transformer.  
> Others
> on this list would know more about this, but I believe the other major
> differences between the two are:
>
> 1) CInclude does not support XPath expressions for extracting portions 
> of
> the document to include.
> 2) CInclude has better performance.
>
> Hope that helps!
>
> Harry
>
>
> -----Original Message-----
> From: zack@nostromocorp.com [mailto:zack@nostromocorp.com]
> Sent: Wednesday, May 08, 2002 2:55 PM
> To: cocoon-users@xml.apache.org
> Subject: Re: sitemap parameters into XSP
>
>
> Okay, great. Now is there anyway I can refer to another pipeline in an
> XInclude href? cocoon:// doesn't seem to be working :\
>
> - Zack Angelo
>    Nostromo Corporation
>
> On Wednesday, May 8, 2002, at 12:37 AM, Bert Van Kets wrote:
>
>> I don't think you will find this in the samples.  Here's the code:
>>
>> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp"
>> xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp-
>> request="http://apache.org/xsp/request/2.0">
>>   <data>
>>     <xsp:logic>
>>     String myParam = "";
>>
>>     <!-- get the parameter from sitemap -->
>>     try{
>>       myParam = parameters.getParameter("formName");
>>     }
>>     catch (Exception e)
>>     {}
>>     </xsp:logic>
>> </data>
>> </xsp:page>
>>
>> Make sure you request the parameter BELOW the first tag (here <data>).
>> Bert
>>
>> At 09:19 8/05/2002 +0400, you wrote:
>>> Zack Angelo wrote:
>>>
>>>> I remember seeing this in the docs/samples, but I can't seem to
>>>> unearth
>>>> it again. How do I pass parameters from the sitemap into an XSP 
>>>> script
>>>> (i.e. for an include operation). TIA.
>>>>
>>>> -Zack
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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: <cocoon-users-unsubscribe@xml.apache.org>
>>>> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>>> See this:
>>> Regards.
>>> Yury. ;)
>>> ------------------------------
>>>
>>> We need a way to push parameters from the sitemap to XSP via a
>>> generator (of type serverpages).
>>>
>>> We can catch session and request parameters using
>>> session.getParameter() or request.getParameter(). With
>>> parameters.getParameter() we had no success, however. Nothing happens
>>> using the following configuration.
>>>
>>> Any suggestions most appreciated!
>>>
>>>
>>> Our sitemap looks like this:
>>>
>>> <map:match pattern="application/*">
>>>  <map:generate type="serverpages" src="record.xsp">
>>>    <map:parameter name="user_name" value="admin"/>
>>>  </map:generate>
>>> </map:match>
>>>
>>>
>>> Our XSP file looks like:
>>>
>>> <xsp:logic>
>>> try {
>>> String myParam = parameters.getParameter("user_name");
>>> }
>>> catch (Exception e)
>>> { }
>>> </xsp:logic>
>>>
>>>
>>> We also tried this:
>>>
>>> <parameters:get-parameter name="user_name"/>
>>>
>>> Regards
>>>    Peter
>>>
>>>> Cool, thanks!
>>>> By the way, why do I need an <xsp:expr> here since I'm already in an
>>>> <xsp:logic> node here? To do some escaping on the returned string?
>>>>
>>>>                        Pascal.
>>>>
>>>>> -----Original Message-----
>>>>> From: Jan Normann Nielsen [mailto:cocoon@dubbekarl.dk]
>>>>> Sent: Saturday, February 23, 2002 11:45 AM
>>>>> To: cocoon-users@xml.apache.org
>>>>> Subject: SV: [XSP] Sitemap parameter passed to XSP page
>>>>>
>>>>>
>>>>> Hi Pascal
>>>>>
>>>>> You can access the parameters variable from your XSP page, just like
>>>>> you
>>>>> would do in an Action. Example:
>>>>>
>>>>> <xsp:logic>
>>>>> String myParam =
>>>>> <xsp:expr>parameters.getParameter("my-param")</xsp:expr>
>>>>> </xsp:logic>
>>>>>
>>>>> to access the "my-param" sitemap parameter.
>>>>>
>>>>> Best regards,
>>>>> Jan Nielsen
>>>>>
>>>>>> -----Oprindelig meddelelse-----
>>>>>> Fra: Pascal Davoust [mailto:davoustp@yahoo.com]
>>>>>> Sendt: 23. februar 2002 00:13
>>>>>> Til: Cocoon Users
>>>>>> Emne: [XSP] Sitemap parameter passed to XSP page
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm trying to get a parameter passed from the sitemap to the XSP
>>>>> page I'm
>>>>>> writing.
>>>>>> The purpose is to have the following kind of stuff in the sitemap:
>>>>>>
>>>>>> <map:match pattern="record/*">
>>>>>> <map:generate type="serverpages" src="record.xsp">
>>>>>> <map:parameter name="record/id" value="{../1}"/>
>>>>>> </map:generate>
>>>>>> </map:match>
>>>>>>
>>>>>> (the <map:parameter> is my own guess about how to pass the
param
>>> to >>the
>>>>>> generator... :o)
>>>>>>
>>>>>> And use the "record/id" parameter in my XSP (how?).
>>>>>> I guess it's real common stuff, but can't find any example or
>>>>> hint...
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Pascal.
>>>
>>> --
>>> +-------------------------------+-------------------------------------+
>>> |              >>>
>>> mailto:Peter.CA.Baer@Siemens.com   <<<             |
>>> +---------------------------------------------------------------------+
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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: <cocoon-users-unsubscribe@xml.apache.org>
>>> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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: <cocoon-users-unsubscribe@xml.apache.org>
>>> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>>
>>
>> ---------------------------------------------------------------------
>> 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: <cocoon-users-unsubscribe@xml.apache.org>
>> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> 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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
> ---------------------------------------------------------------------
> 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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>



---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message