xsl-list
[Top] [All Lists]

RE: [xsl] xsl:for or xsl:repeat

2006-05-24 08:46:01
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.

Thanks anyway. 


Mark Williams

________________________________

GWSmartmove

24 St Andrews Crescent, Cardiff, CF10 3DD 

E: enquiries(_at_)gwsmartmove(_dot_)co(_dot_)uk 
T: 02920375901 
F: 02920375909 

www.gwsmartmove.co.uk 

The contents of this email and any attachments are the property of
Gimblett Williams Solicitors Limited and are intended for the
confidential use of the named recipient(s) only. If they have been
received by you in error please maintain confidentiality, notify us,
destroy copies and delete them from your computer. It is the
responsibility of the recipient to scan this email for viruses. 


-----Original Message-----
From: Jon Gorman [mailto:jonathan(_dot_)gorman(_at_)gmail(_dot_)com] 
Sent: 24 May 2006 16:29
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] xsl:for or xsl:repeat

On 5/24/06, Mark Williams <mark(_at_)gwsmartmove(_dot_)co(_dot_)uk> wrote:
Hi Jon,

What I am trying to do is very simple.


You've hit a case where it's not a grouping problem or the like.
There's probably a simpler way to do it, but worse case scenario you can
do a recursive template:

<xsl:call-template name="printSigBlock"> <xsl:with-param
name="countOfSigs" select="noofclients" /> </xsl:call-template>

<xsl:template name="printSigBlock">
<xsl:with-param name="countOfSigs" />
<fo:block font-family="Helvetica" font-size="12pt"
 white-space-collapse="false" space-after="0.05pt"><fo:leader
leader-pattern="space"/></fo:block></fo:block><fo:block
 font-family="Helvetica" font-size="12pt" white-space-collapse="false"
 space-after="0.05pt"><fo:leader
 leader-pattern="space"/></fo:block><fo:block font-family="Helvetica"
 font-size="12pt"
 space-after="0.05pt">Signature_____________________<fo:leader
 leader-length="16pt"/><fo:leader
 leader-length="36pt"/>Date________________ </fo:block></xsl:for****>
<xsl:if test="$countOfSigs -1 > 0"> <xsl:call-template
name="printSigBlock" select="$countOfSigs -1" /> </xsl:template>

That's the best I can come up with off the top of my head.  There might
be a better way to do it in XSLT 2.0.  There also might be some other
workarounds.

Jon Gorman

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--