xsl-list
[Top] [All Lists]

Re: collapsing number ranges

2004-08-30 05:29:52
On Mon, 30 Aug 2004, Bruce D'Arcus wrote:

) I was just reminded that page numbers aren't always integers.  Example:
)   pp. iii-vi.
)
) I guess that settles it then; better to use substrings in this case.

If they're not integers then surely they don't want to pass through the
substring mill at all, as they'll e.g. turn "xv-xviii" into "xv-iii"
depending on your algorithm. You probably want to test they're numbers
before they go anywhere near the algorithm, by doing something like

        string(number($start)) != 'NaN'

J-P
-- 
I was doing all right, I was a big hit with the emperor;
He said, you and me son, we're both big cats:
We're just a little short on stamina


<Prev in Thread] Current Thread [Next in Thread>