[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: xsl:when is not allowed in this position in the st
Subject: Re: xsl:when is not allowed in this position in the stylesheet!
From: Stephen Cunliffe <scunliffe@xxxxxxxxxxxxxxxxxx>
Date: Tue, 06 May 2003 15:50:07 -0400
|
Yes,
You need a 'choose' around your 'when' and 'otherwise'... (see below)
On 06/05/03 3:13 PM, 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:
<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:choose>
<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:choose>
</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
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|