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

RE: modulus operator

Subject: RE: modulus operator
From: "Ben Robb" <Ben@xxxxxxxxxx>
Date: Tue, 1 Oct 2002 18:24:23 +0100
xslt modulus
Yes - its called "mod"

Rgs,

Ben

-----Original Message-----
From: Saverio Perugini [mailto:sperugin@xxxxxxxxxxxxxxxx] 
Sent: 01 October 2002 18:08
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject:  modulus operator


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


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 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.