You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Vaduvoiu Tiberiu <va...@yahoo.com> on 2007/06/25 10:45:46 UTC
Re: test parameter existance in jxtempate/dasl solved but still...
After I gave it a couple of tries, I managed to make it work using
<jx:if test="${cocoon.parameters.source > ''}">
but I still don't understand why the previous tries didn't work. (using != ). If anybody knows an easier way, pls tell me. 10x
----- Original Message ----
From: Vaduvoiu Tiberiu <va...@yahoo.com>
To: users@cocoon.apache.org
Sent: Monday, June 25, 2007 11:39:05 AM
Subject: test parameter existance in jxtempate/dasl
Hi, I am having a small problem displaing a search result on my page. my match in sitemap is like this:
<map:match pattern="*/documents/*">
<map:generate src="dasl-documents.xml" type="newjx">
<map:parameter name="repository" value="{global:repositoryRoot}{global:{1}Path}"/>
<map:parameter name="press" value="{2}"/>
<map:parameter name="source" value="{request-param:source}"/>
</map:generate>
......
and in my dasl in the <d:where>/<d:and> I have:
<jx:if test="${cocoon.parameters.source!=''}">
<d:eq>
<d:prop>
<h:presscategory/>
</d:prop>
<d:literal>${cocoon.parameters.source}</d:literal>
</d:eq>
</jx:if>
half works..meaning if my url is like mysite.com/folder/?source=sports I get all the xml files that have the h:presscategory equal to sports...but if my url is like mysite.com/folder/ then I get nothing. When in fact I should get all the results.
So I'm thinking that somehow, the test is not right. By comparing if the parameter is different than '' (is not a double quote, there are two simple ' quotes), it probably thinks the parameters already exists. I;ve also tried using if test="${cocoon.parameters.source}" but doesn't work.anybody can tell me where am I going wrong? 10x
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: test parameter existance in jxtempate/dasl solved but still...
Posted by Jeroen Reijn <j....@hippo.nl>.
Hi Vaduvoiu,
I'm not 100% sure, but could it be that the value is NULL instead of an
empty string? Try comparing it with NULL.
Kind regards,
Jeroen Reijn
Vaduvoiu Tiberiu wrote:
> After I gave it a couple of tries, I managed to make it work using
>
> <jx:if test="${cocoon.parameters.source > ''}">
>
> but I still don't understand why the previous tries didn't work. (using != ). If anybody knows an easier way, pls tell me. 10x
>
> ----- Original Message ----
> From: Vaduvoiu Tiberiu <va...@yahoo.com>
> To: users@cocoon.apache.org
> Sent: Monday, June 25, 2007 11:39:05 AM
> Subject: test parameter existance in jxtempate/dasl
>
>
> Hi, I am having a small problem displaing a search result on my page. my match in sitemap is like this:
>
> <map:match pattern="*/documents/*">
> <map:generate src="dasl-documents.xml" type="newjx">
> <map:parameter name="repository" value="{global:repositoryRoot}{global:{1}Path}"/>
> <map:parameter name="press" value="{2}"/>
> <map:parameter name="source" value="{request-param:source}"/>
> </map:generate>
> ......
>
> and in my dasl in the <d:where>/<d:and> I have:
>
> <jx:if test="${cocoon.parameters.source!=''}">
> <d:eq>
> <d:prop>
> <h:presscategory/>
> </d:prop>
> <d:literal>${cocoon.parameters.source}</d:literal>
> </d:eq>
> </jx:if>
>
> half works..meaning if my url is like mysite.com/folder/?source=sports I get all the xml files that have the h:presscategory equal to sports...but if my url is like mysite.com/folder/ then I get nothing. When in fact I should get all the results.
> So I'm thinking that somehow, the test is not right. By comparing if the parameter is different than '' (is not a double quote, there are two simple ' quotes), it probably thinks the parameters already exists. I;ve also tried using if test="${cocoon.parameters.source}" but doesn't work.anybody can tell me where am I going wrong? 10x
>
>
>
> ____________________________________________________________________________________
> Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
> http://sims.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
> ____________________________________________________________________________________
> Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
> http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
--
Met vriendelijke groet,
Kind regards,
Jeroen Reijn
Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel +31 (0)20 5224466
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org