[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: increment value
At 01:09 PM 1/22/2004, Anoop wrote:
Hi Ricardo, Just about every problem for which programmers think they need counters can be done more easily in XSLT with other techniques. For example, here I think there may be a use for xsl:number. But I don't believe this problem has been fully specified yet for the list, although there've been several helpful replies. Just because in some other system you'd use a variable as a counter, you shouldn't assume that's what's needed here. Those who are trying to help are not just being contrary: if the problem itself is one that has a better solution in XSLT than a counter (and judging from the experience of the list, that's true 99 times in 100), a responsible adviser is not going to jump in and tell you how to make the counter. You don't want to go to an auto mechanic with a dead battery and say "my batteries dead: you have to replace it" and then have him sell you a new battery without finding out why the old one is dead. You might be back again to get a new battery before long -- whereas maybe the first one was fine, and it's something else in the car that needs fixing. Likewise, in XSLT if you wanted you *could* implement a "counter" by passing a parameter in a recursive template call. But if that solution is complex and has ten times the footprint of a well-known, easier, better, solution, you want us to tell you the better solution. Cheers, Wendell -----Original Message----- From: Ricardo Saraiva [mailto:rss@xxxxxxxxxxxxxx] Sent: Thursday, January 22, 2004 12:47 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: increment value ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== 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
|