Re: [xsl] collapsing number ranges

Subject: Re: [xsl] collapsing number ranges
From: J-P S <jps@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 30 Aug 2004 13:29:52 +0100 (BST)
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

Current Thread