xsl-list
[Top] [All Lists]

RE: Calculations involving measurements with units

2004-01-02 02:26:35
If you do not know beforehand the units, but need them from 
the string, then 
you can do a recursive solution taking one letter at a time, 
checking if it 
is a number. If it is not a number, you print out the units.

Another way to remove all characters except digits (and decimal points)
from a string is:

translate($x, translate($x, '0123456789.', ''), '')

Michael Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list