You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tim Bachta <tb...@kopent.com> on 2003/06/11 04:07:55 UTC

conditions in xsl

Is it possible to do if statements in an xsl page.  What I am trying to
do is set the first value I get back as selected then set the rest as
unselected.  Example since it is hard to explain.

I currently have this:

<xsl:template match="report">

<xsl:variable name="report-name"><xsl:value-of
select="report-name"/></xsl:variable>

<div id="sw{normalize-space(report-name)}" class="dlgSwitchSelected"
><img src="images\icons\occurrenceOverview.gif" /><xsl:value-of
select="normalize-space(report-name)"/></div>

</xsl:template>

 

this gives me back this:

 

<div class="dlgSwitchSelected" id="swOverdue Task Report">

<img src="images\icons\occurrenceOverview.gif">Overdue Task Report</div>

<div class="dlgSwitchSelected" id="swTask Status Report">

<img src="images\icons\occurrenceOverview.gif">Task Status Report</div>

<div class="dlgSwitchSelected" id="swUn-Assigned Task Report">

<img src="images\icons\occurrenceOverview.gif">Un-Assigned Task
Report</div>

 

 

What I want is to get this back:

<div class="dlgSwitchSelected" id="swOverdue Task Report">

<img src="images\icons\occurrenceOverview.gif">Overdue Task Report</div>

<div class="dlgSwitch" id="swTask Status Report">

<img src="images\icons\occurrenceOverview.gif">Task Status Report</div>

<div class="dlgSwitch" id="swUn-Assigned Task Report">

<img src="images\icons\occurrenceOverview.gif">Un-Assigned Task
Report</div>

 

where the only one that has the selected class is the first one.  Any
help would be great.  Thank you very much.

 

Tim Bachta

 

 


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