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

Re: variable declaration

Subject: Re: variable declaration
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Mon, 29 Apr 2002 11:01:44 -0400
use of variable declaration
[Michael Earls]

> 2) The use of the <xsl:attribute/> element allows us to contain more
> than a simple literal.  What if the value of the text field was the
> result of an applied template?  The shortcut would not work in this
> case.  Speaking of case, what if the value was the result of an
> <xsl:choose/> structure?  Same problem.
>

I usually prefer to use attribute value templates even in cases like this.
I like to make the desired value into a variable, then use that variable in
an attribute value template.  This practice makes clear what the intended
output is.  But (for me) it all depends on how complex the xslt fragment
would be - something fairly simple can still be reasonably readable and so I
might embed it as you say.  The more complicated, the more I want to create
a variable for it, then use the variable.  This can also make it easier to
debug the fragment on its own.

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.