Subject: RE: starts-with any number
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 18 Oct 1999 14:26:18 +0100
|
> If I want to know if a variable starts with a specific number
> (let's use 5), I can do this:
>
> <xsl:if test="starts-with($variable, '5')">
> ...do something...
> </xsl:if>
>
> But what is the correct syntax if I want to know if this
> variable starts with any number, 0 to 9?
>
<xsl:if test="starts-with(translate($variable, '0123456789', '9999999999'),
'9')">
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|