Re: Removing non-alphanumeric characters from attribute

Subject: Re: Removing non-alphanumeric characters from attribute
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Thu, 24 Jun 2004 22:45:22 -0700 (PDT)
<perry.ielati@xxxxxxxxxxxx> wrote in message
news:1088127482.40db81fa38afd@xxxxxxxxxxxxxxxxxxxx
> Hi all,
> 
> I was wondering if there is any way possible of stripping any
non-alphanumeric 
> characters from an attribute. ie keep anything that is A-Z/0-9 and strip
all 
> other characters like ",*-+. etc etc?
> 
> Thanks
> -Pez

Use:

  translate(@x, translate(@x, $vAlphaNum, ''), '')

where @x is the attribute of the current node that you are processing and
the value of the xsl:variable named vAlphaNum is a string containing
exactly all alphanumeric characters.


Cheers,

Dimitre Novatchev.
FXSL developer, XML Insider,

http://fxsl.sourceforge.net/ -- the home of FXSL

=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

Current Thread