XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Nabil DurandSubject: Conditional Formatting to Table-Cell property
Author: Nabil Durand
Date: 18 Dec 2006 06:03 PM
Hi, I'm a complete noob to XSLT. My goal is to apply conditional formatting so when the date = today, the entire table-cell background will highlight green (#00FF00) and not just the font itself. So far, I can only get the Font to change color/become highlighted. Any help please?

---------------------------------
<td><span>
<xsl:attribute name="style">

<xsl:if test="number(translate(substring-before(@CC,'T'),'-','')) &lt;= number(translate(substring-before($Today,'T'),'-',''))">

color: #000000; border-style: solid; border-width: 1px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; background-color: #00FF00;

</xsl:if>
</xsl:attribute><xsl:value-of select="ddwrt:FormatDate(string(@CC),1033, 5)"/></span></td>
-----------------------------------------

Posttop
Ivan PedruzziSubject: Conditional Formatting to Table-Cell property
Author: Ivan Pedruzzi
Date: 18 Dec 2006 10:41 PM

Nabil,

Your code looks fine, trying posting a full test case (XSLT + XML)

Ivan Pedruzzi
Stylus Studio Team


Documentbooks(3).xml


Documentcellbackground.xsl

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.