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

RE: <xsl:param> or <xsl:variable> question

Subject: RE: <xsl:param> or <xsl:variable> question
From: Abhijit Junnare <mavlaabhi@xxxxxxxxx>
Date: Tue, 26 Aug 2003 08:45:40 -0700 (PDT)
xsl if param
I think I got it working. I am using <xsl:variable> at
the top and setting its value as per the attribute
using <xsl:if> like

  <xsl:variable name="RuleColor">
  <xsl:if test="../@Style='ON'">#000000</xsl:if>
  <xsl:if test="../@Style='OFF'">#FFFFFF</xsl:if>
  </xsl:variable>

Thanks for your help though.

Abhi

--- "Kienle, Steven C [IT/0200]"
<steven.c.kienle@xxxxxxxxxxxxx> wrote:
> 
> This sounds like a simple xsl:if with an
> xsl:attribute solution:
> 
>     <font>
>         <xsl:if text="@style = 'on'">
>             <xsl:attribute
> name="color">red</xsl:attribute>
>         </xsl:if>
> 
>         <!-- produce text here -->
> 
>     </font>
> 
> The xsl:attribute element allows you to add an
> attribute to the parent
> element.
> 
> I may have misunderstood you need, but I think this
> is what you'll want.
> 
> 	Steve
> 
> -----Original Message-----
> From: Abhijit Junnare [mailto:mavlaabhi@xxxxxxxxx]
> Sent: Tuesday, August 26, 2003 11:09 AM
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  <xsl:param> or <xsl:variable>
> question
> 
> 
> Hi,
> I want to set the font-color according depending on
> the value of attribute of the element. For example I
> woule like to set the font-color to red if the
> element
> has an attribute 
> style="on"
> or font-color to black if element has an attribute 
> style="off"
> 
> I have been trying to define a parameter using
> xsl:param and then using it but cant get it right.
> Is
> there a way to set the value of parameter using some
> <xsl:if> or <xsl:when> constructs.
> Your help is really appreciated.
> Thanks in advance.
> Abhi
> 
> 
> This communication is intended solely for the use of
> the addressee and may
> contain information that is legally privileged,
> confidential or exempt from
> disclosure.  If you are not the intended recipient,
> please note that any 
> dissemination, distribution, or copying of this
> communication is strictly 
> prohibited.  Anyone who receives this message in
> error should notify the 
> sender immediately and delete it from his or her
> computer.
> 
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

 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.