[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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)
.net remove non alphanumeric characters
<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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.