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

Re: String comparison

Subject: Re: String comparison
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 24 Sep 2010 10:41:23 +0100
Re:  String comparison
Input
====
<pages><first-page>10635<first-page><last-page>10637<last-page></pages>

Output
=====
<pages><first-page>10635<first-page>-<last-page>7<last-page></pages>



I played with this for a bit and couldn't come up with anything significantly better than your code, other that putting it in a loop or recursion to generalize it over any length of number. You don't say whether you want a 2.0 or 1.0 solution, but I couldn't see anything obvious in 2.0 that would make it significantly easier.


Michael Kay
Saxonica

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.