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

RE: Assigning values to variables

Subject: RE: Assigning values to variables
From: Mark Feblowitz <mfeblowitz@xxxxxxxxxxxxxxxx>
Date: Mon, 20 Aug 2001 11:24:44 -0400
xslt updating variable values
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


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.