[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath MOD 10 calculation
On 5/25/07, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
Running that gave me 7 - when the check digit should be 3 shouldn't it? You don't appear to be doing the mod 10 calculations correctly (according to the steps on wikipedia) - you do the summing, mod 10 it, take that from 10 and then mod 10 it again.
My code tests if a UPC is correct based on the checksum, if it is, nothing is returned, if it is not, "UPC is not legal" is returned. Cheers, Jesper Tverskov, http://www.xmlplease.com/xslt
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|