cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josep Riudavets Aguilo <jriudave...@uoc.edu>
Subject RT: RE: Conditional processing in XSLT
Date Tue, 14 Oct 2003 15:31:06 GMT
Thanks a lot Lars ... it works perfectly !!!

And sorry ... I'm not suscribed to XSL list, but now, I'm going to
do it ... 


--> Missatge original de Lars Huttar  per a users@cocoon.apache.org
enviat el 13/10/2003 19:27:58

Hi,
I think this is more a question for the XSL-list, but anyway...

You want something like
  <xsl:when test="mail = 'somevalue'">
to compare the text content of the mail element to 'somevalue',
or
  <xsl:when test="mail">
to test whether the mail element exists.
(This assumes that the context node is <data>.)

Lars


> -----Original Message-----
> From: Josep Riudavets Aguilo [mailto:jriudavetsa@uoc.edu]
> Sent: Monday, October 13, 2003 11:08 AM
> To: users@cocoon.apache.org
> Subject: Conditional processing in XSLT
> 
> 
> Hi all...  I'm trying to use <xsl:choose> tag into a XSL 
> page. The condition wiil be set depending onthe content of a 
> string named "mail". This string has to be captured from the 
> XSP related to this XSL.  XSP produces these results: <data> 
> <name>...</name> <city>...</city> <mail>...</mail>
</data>  
> So, into the XSL I have written next lines:  <xsl:choose> 
> <xsl:when test="???????">     ---some code--- </xsl:when> 
> <xsl:otherwise>     ---more code--- </xsl:otherwise> 
> </xsl:choose>  Depending the content of "mail", a different 
> code has to be executed (HTML result will be different 
> depending on mail content).  I don't know how to capture the 
> <mail> tag from the xsp page. Out of the <xsl:when> than, I 
> use <xsl:value-of select="mail"/> ... but, how can I capture 
> this value into the <xsl:when> tag???  Thanks a lot   I don't 
> know how to caputre  
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message