-
XSL: Easiest way to find if string a contains numbers
Hello,
I was wondering about what would be the easiest way to find a, b, c, in d?
Example of my stylesheet:
<xsl:choose>
<xsl:when test="contains($theWord, '1') or contains($theWord, '2')">
<xsl:text>There be a 1 on a 2 in your word!!</xsl:text>
</xsl:when>
<xsl therwise />
</xsl:choose>
Now what if I wanted to check wether $theWord contained a number would I
then be FORCED to write:
contains($theWord, '0') or contains($theWord, '1') ... or contains($theWord,
'9')
or is there a shorter (less typing) to do the same???
A Friendly Greeting
/Rasmus
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks