Re: [xsl] xsl:when is not allowed in this position in the stylesheet!

Subject: Re: [xsl] xsl:when is not allowed in this position in the stylesheet!
From: Jeff Kenton <jkenton@xxxxxxxxxxxxx>
Date: Tue, 06 May 2003 15:37:24 -0400
Frank Silva wrote:
Hi, I keep getting an error ("xsl:when is not allowed in this position in the stylesheet!")when trying to use the following xsl:

I'm sure you'll spot this yourself -- xsl:when and xsl:otherwise need to be within xsl:choose




<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">


<xsl:param name="baseActionURL">default</xsl:param>
<xsl:variable name="imagePath">media/org/jasig/portal/channels/CBusSchedule</xsl:variable>


<xsl:template match="RouteList">
<xsl:for-each select="Route">
<xsl:when test="Expanded='false'">
<input type="image" src="{$imagePath}/trans.gif" width="16" height="15" alt="Closed"/>
<img src="{$imagePath}/closedFolder.gif" width="16" height="15" alt="" />Route <xsl:value-of select="Name" /><br />
</xsl:when>
<xsl:otherwise>
<input type="image" src="{$imagePath}/trans.gif" width="16" height="15" alt="Open"/>
<img src="{$imagePath}/openFolder.gif" width="16" height="15" alt="" />Route <xsl:value-of select="Name" /><br />
<xsl:for-each select="Stop">
<input type="checkbox" name="route" value="OFF" />
<img src="{$imagePath}/itemMarker.gif" width="15" height="20" align="top" border="0" />
<xsl:value-of select="Name" /><br />
</xsl:for-each>
</xsl:otherwise>
</xsl:for-each>
</xsl:template>


</xsl:stylesheet>

Is there a problem with my xsl? Thanks in advance.

Frank

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list




--

--------------------------
Jeff Kenton
DataPower Technology, Inc.



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread