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

Re: Hexadecimal Arithmetic

Subject: Re: Hexadecimal Arithmetic
From: David_Marston@xxxxxxxxx
Date: Thu, 31 Aug 2000 11:48:03 -0400
matrix arithmetic
Maulik Modi writes:
>Now I want to color code each table row depending on the value of
>the "level" attribute. That's done. Now I want to give each row a
>different gradient of the same color depending on the value of the
>"level". The value of the level ranges from 1-10. I wanted to take
>this and use it with hexadecimal arithmetic. Does anyone know how?

That's an intriguing problem. You can write an extension function,
which removes all the intrigue, or you can look at a range of XSLT
approaches. The range spans from pure computational to tables and
lookups, and to decide which is best, you need to provide more
information:

1. Is the color code just one linear scale (10 steps) or a matrix
   (10 x N) of gradients for different colors?
2. If a matrix, what is N above?
3. A gradient to where? Let's say level 10 is the color at full
   strength. Is level 1 whiter? blacker? redder? Or does it
   depend on the other dimension of the matrix, so it's
   different for each?
4. Will the gradient be linear, or does it look better to have
   specified steps?

If the numbers are small, I suspect that table lookups are the way
to go. In other words, you would pre-calculate the color values
and store them in an XSL keyspace.
.................David Marston


 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-2011 All Rights Reserved.