[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Assigning values to variables
It looks like a pretty common thing to do: remember the most recent value (date, time, whatever) in a "global" variable, updating it when necessary. Two obvious approaches (one standard, one not) would be: 1. pass the most recent date in a parameter to a recursive template (recursively) 2. use an XSLT-processor-specific variable value assignment extension (if your processor has one). (Can you guess which is the "bad" one?) Neither is ideal for the task at hand. You might instead want to use an XPATH query to tell you the most recent date. And, since the recent date is likely with respect to some local context, you'll probably want to eliminate the global variable and use a local variable with the XPATH expression tied to the desired context. ---------------------------------------------------------------------------- ---- Mark Feblowitz [t] 617.715.7231 Frictionless Commerce Incorporated [f] 617.495.0188 XML Architect [e] mfeblowitz@xxxxxxxxxxxxxxxx 400 Technology Square, 9th Floor Cambridge, MA 02139 www.frictionless.com -----Original Message----- From: Goetz Bock [mailto:bock@xxxxxxxxxxx] Sent: Monday, August 20, 2001 10:40 AM To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' Subject: Re: Assigning values to variables On Mon, Aug 20 '01 at 10:15, Haque, Suraiya wrote: > Sorry, I had deleted the line where I was trying to do the assignment. > [ ... ] As we told you, it does not work this way. If you tell us what you're up to, we might be able to help you further (It looks like you want to do some sort of recursion ... possibly) -- Goetz Bock IT Consultant Dipl.-Inf. Univ. 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
|