[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: when and xsl:choose

Subject: RE: when and xsl:choose
From: "Spychalski, Frank" <frank.spychalski@xxxxxxx>
Date: Tue, 18 Jul 2000 23:21:28 +0200
xsl when and
Hi

test="..." instead of match="..."

<xsl:choose>
   <xsl:when test="@initcost='0'">
	<img src="c:\windows\desktop\Stylesheet Files\bar-0-48.gif"
width="48" height="150"/>
   </xsl:when>
...

should do it...

bye
Frank
-
Work is the curse of the drinking class. (Oscar Wilde)
Frank Spychalski                   frank@xxxxxxxxxxxxx


->-----Original Message-----
->From: Foster, Justin (IT_Architecture) [mailto:JFoster@xxxxxxxxxxx]
->Sent: Tuesday, July 18, 2000 12:13 PM
->To: 'xsl-list@xxxxxxxxxxxxxxxx'
->Subject: xsl:when and xsl:choose
->
->
->OK,
->
->Accoding to my documentation, something like this should work 
->(unless of
->course I am misinterpreting the documentation, which is highly likely.
->(Introduction to XML)
->
-><xsl:template match="/">
->  <xsl:apply-templates/>
-></xsl:template>
->
-><xsl:template match="ELEMENT">
->
-><xsl:choose>
->   <xsl:when match="[@initcost='0']">
->	<img src="c:\windows\desktop\Stylesheet Files\bar-0-48.gif"
->width="48" height="150"/>
->   </xsl:when>
->
->   <xsl:when match="[@initcost='1']">
->	<img src="c:\windows\desktop\Stylesheet Files\bar-green1.gif"
->width="48" height="150"/>
->   </xsl:when>
->
->   <xsl:when match="[@initcost='2']">
->	<img src="c:\windows\desktop\Stylesheet Files\bar-green2.gif"
->width="48" height="150"/>
->   </xsl:when>
->
->   <xsl:when match="[@initcost='3']">
->	<img src="c:\windows\desktop\Stylesheet Files\bar-green3.gif"
->width="48" height="150"/>
->   </xsl:when>
->
->   <xsl:otherwise>
->	<img src="c:\windows\desktop\Stylesheet Files\bar-0-48.gif"
->width="48" height="150"/>
->   </xsl:otherwise>
->
-></xsl:choose>
->
-></xsl:template>
->
->When I use this stylesheet, it always loads only the first 
->image without
->even considering what the XML attribute values are.  Here's 
->an XML snippet
->that I'm referencing:
->
-><ELEMENT initcost="1" />
->
->Why is this?
->
->
->
->Justin Foster 
->IT Architecture
->253-596-3260 office
->253-223-3108 mobile
->
->
-> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
->


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.