Re: [xsl] String comparison

Subject: Re: [xsl] String comparison
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 24 Sep 2010 10:41:23 +0100
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