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

RE: Re: <xsl:choose> or variable syntax incorrect?

Subject: RE: Re: <xsl:choose> or variable syntax incorrect?
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Fri, 26 Sep 2003 16:15:32 -0400
xsl defining variable choose
[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

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.