Subject: Re: [xsl] substring function not handling hyphens in variables correctly From: Chas Mick <cmick@xxxxxxxxx> Date: Thu, 13 Sep 2001 14:39:19 -0400 |
Wow, simpler is better! This works perfectly. Thank you very much, Tony. Chas Tony Graham wrote: > Chas Mick wrote at 13 Sep 2001 11:36:46 -0400: > > I have just upgraded from Xalan 1.0.0 to Xalan > > 1.3. The following snippets no longer function > > correctly: > > > > <xsl:value-of > > select="concat(substring($user,1,3),substring($user,5,6),substring($user,8,11))"/> > > Since you're really only worried about '-' characters, You could just > use: > > <xsl:value-of select="translate($user, '-', '')"/> > > Regards, > > Tony Graham > ------------------------------------------------------------------------ > XML Technology Center - Dublin mailto:tony.graham@xxxxxxxxxxxxxxx > Sun Microsystems Ireland Ltd Phone: +353 1 8199708 > Hamilton House, East Point Business Park, Dublin 3 x(70)19708 > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list -- Charles Mick SAIC Morgantown, WV (304)284-9000 charles.e.mick@xxxxxxxx [OR] cmick@xxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] substring function not ha, Tony Graham | Thread | Re: [xsl] substring function not ha, David_Marston |
Re: [xsl] Extracting a list of uniq, David Carlisle | Date | RE: [xsl] XSL Javascript prob, P Vikram |
Month |