|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Re: <xsl:choose> or variable syntax incorrect?
[Brook Ellingwood] > Incidentally, I like Tom's approach of just assigning the color to a > variable better than mine. Using a variable makes it ultra clear what you are intending to do. If anything does not work as expected, there is just the one place to look, and that place is not mixed up with anything else. So it is a good way to develop your transformation. Also, you do not have to keep repeating the same code with variations (like having a <td bgcolor='xxx'> in two places), so there is less chance for error, and maintenance is easer. After it is working right, you sometimes may want to refactor to put the expressions inline instead of in a variable, depending. By that time, you will know with certainty that you are using the correct expressions in the correct context, so the refactoring will be easier. One of the first things I do to debug when I get stuck is to create a variable for the bit that is causing me trouble, and then to output it into an extra element so I can see just what is going on. It's very helpful! Cheers, Tom P 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
|

Cart








