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

Re: collapsing number ranges

Subject: Re: collapsing number ranges
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Sun, 29 Aug 2004 09:11:19 -0400
how to use idiv
On Aug 29, 2004, at 5:55 AM, Jeni Tennison wrote:

  <xsl:choose>
    <xsl:when test="$begin idiv 100 eq $end idiv 100">
      <xsl:value-of select="$end mod 100" />
    </xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="$end" />
    </xsl:otherwise>
  </xsl:choose>

$begin idiv 100 gives you all but the last two digits of $begin. $end
mod 100 gives you the last two digits of $end.

Nice!


Any pointers on where to find out more about how to use idiv, mod, etc.? I'd like to get a better sense of the basics: the logic that explains how the above works (e.g. what's going on with the "div 100" that gives me the last two digits, what does mod do, etc.). The xpath 2.0 spec isn't all that helpful for me.

Bruce

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.