Re: collapsing number ranges
If that's not what you're after, show us the XML of some more examples and try to put the algorithm that you want into English or pseudo-code.
It is basically. I'll see if I can figure out how to move it into a function (as the other posters did) that I can call from different places, and at some point I need to get it closer to the below (much more complex, it seems) example.
A real world algorithm from the Chicago Manual of Style, in English:
FIRST NUMBER SECOND NUMBER EXAMPLES 1-99 use all digits 3-10, 71-72, 96-117 100 or multiples use all digits 100-104, of 100 1100-1113
101-109 use changed part only 101-8, 201-209, etc. 1103-4 110 through 199 use two or more digits 321-28, 210-299, etc. as needed 498-532, 1087-89 But, if three digits change 1496-1504 in a four-digit number, 2787-2816 use all four
Ugh ... what a PITA!
I don't expect anyone to actually figure this out for me suffice to say!
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