cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Huttar" <lars_hut...@sil.org>
Subject RE: Conditional processing in XSLT
Date Mon, 13 Oct 2003 17:27:58 GMT
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