This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: modulus operator
- From: Joerg Heinicke <joerg dot heinicke at gmx dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 01 Oct 2002 19:16:53 +0200
- Subject: Re: [xsl] modulus operator
- References: <Pine.OSF.4.33.0210011258510.17970-100000@csgrad.cs.vt.edu>
- Reply-to: xsl-list at lists dot mulberrytech dot com
<xsl:if test="counter mod 7 = 0">
Regards,
Joerg
Saverio Perugini wrote:
Hello,
Does XSLT have a modulus operator?
I am generating an HTML page containing a long list of links
from an XML document. I would like all the links to appear on
one screen in order to avoid scrolling. I'd
like about 7 links per line.
With an modulus operator, I can achieve this pretty easily as follows:
<xsl:for-each select="*">
<a><xsl:attribute name="href"/><xsl:value-of select="...."/></xsl:attribute><xsl:value-of select="...."/></a>
<xsl:if test="counter % 7 == 0">
<br/>
</xsl:if>
</xsl:for-each>
If XSLT does not have a modulus operator, is there a
way to produce the desired effect?
Thank You and Best Regards,
S. Perugini
--
System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de
VIRBUS hat jetzt als erster deutscher Softwarehersteller die
Zertifizierung für den 3D Secure-Authentifizierungsstandard "Verified by
Visa" erhalten.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list