aspose file tools*
The moose likes XML and Related Technologies and the fly likes How to check if a string as numbers in XSLT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to check if a string as numbers in XSLT" Watch "How to check if a string as numbers in XSLT" New topic
Author

How to check if a string as numbers in XSLT

vinodreddy kisanagaram
Greenhorn

Joined: Jan 08, 2008
Posts: 9
Hi ,

Can you please let me know the function name and usage to find if a given string has numbers in it... like

"app3le" has 3 in it..

I have found one function in w3schools website:

contains(string1,string2)

which returns true if string1 contains string2, otherwise it returns false

Example: contains('XML','XM')
Result: true

but using this function and looping it 10 times (i.e., from 0-9) is bit tedious.

Can you suggest some other way...

Thanks in advance


***<br />K Vinod Reddy
Pavel Cherkashin
Ranch Hand

Joined: Mar 04, 2005
Posts: 47
XSLT 2.0 support regular expression.
Regard these links:
the good publication

the chapter from zvon.org tutorial

the official xslt 2.0 specification (very long html document)-chapter 15 is about regexps

The zvon.org can be usable as a xslt reference (elements, functions etc)
[ February 28, 2008: Message edited by: Pavel Cherkashin ]

Pavel Cherkashin - <br />SCJP, SCWCD, SCDJWS, SCBCD, SCEA, ...<br />www.linkedin.com/in/pcherkas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to check if a string as numbers in XSLT