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

Re: xsl:for or xsl:repeat

Subject: Re: xsl:for or xsl:repeat
From: "Jon Gorman" <jonathan.gorman@xxxxxxxxx>
Date: Wed, 24 May 2006 11:02:46 -0500
repeat xsl n
On 5/24/06, Mark Williams <mark@xxxxxxxxxxxxxxxxx> wrote:
Thanks guys.

I would have thought there'd be some really noddy way to do this.
Sometimes xsl is so damned frustrating and so incomprehensible to your
bog standard programmer. Ah well.

I've decided that as there is only ever a max possible no of clients of
4, I'll just do it by if statements.


I'm guessing from your message your'e using XSLT 1 since you're not trying the XSLT 2.0 way. I'd encourage you (unless some performance reasons indicate otherwise) to take a look at my sample again. It's a little convoluted, but it's really isn't that bad. You just essentially are doing the recursive function:

n is the number of signatures

template: print a sig block, if n - 1 != 0 call the template again with n - 1

n won't ever reach 0.  You could move the if block around and do it so
there's a base case, I was just a bit lazy.


As long as you don't start with a negative number, the function will terminate.


I just get bad feelings about systems that are arbitrarly restricted.
Seems so....limiting ;).  Like web forms that don't let me get my full
title in because the assume everyone's title can fit in 10 characters
or something.  One of the perks of a document system like this is that
we can move away from arbitrary restrictions.  But sometimes it's
necessary.

Jon Gorman

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.