Subject: RE: [xsl] Re: <xsl:choose> or variable syntax incorrect? From: "Passin, Tom" <tpassin@xxxxxxxxxxxx> Date: Fri, 26 Sep 2003 16:15:32 -0400 |
[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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Re: <xsl:choose> or vari, Passin, Tom | Thread | [xsl] recursive help, Wagstaff, Jason |
Re: [xsl] [recursion pattern] sophi, Romeo Disca | Date | Re: [xsl] Parameters query, J.Pietschmann |
Month |