[xsl] Best way of testing Hexadecimal value [xslt 1.0]

Subject: [xsl] Best way of testing Hexadecimal value [xslt 1.0]
From: pankaj.c@xxxxxxxxxxxxxxxxxx
Date: Thu, 26 Aug 2010 15:00:43 +0530
Hello all,

I just did the following test for one of the requirement in my stylesheet. 
Though I am able to get the correct result but somehow I am not convinced 
with the approach. There must be better/correct way of doing this.

source 
=====
<label>#x2022</label><!--  HEXADECIMAL FOR BULLET  ACTUALLY WITH 
'AMPERSAND' AND ; ADDED TO IT --> 

Test
====
  <xsl:template match="label">
 <xsl:copy>
        <xsl:choose>
        <xsl:when test=".='.'"><!-- ='.' IS LITERAL BULLET SYMBOL  -->
        <!--  Do Something here  -->
        </xsl:when>
        <xsl:when test=".!='.'"><!-- ='.' IS LITERAL BULLET SYMBOL  -->
        <!--  Do Something different here  -->
        </xsl:when>
    </xsl:choose> 
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

<xsl:when test=".= 'BULLET SIGN'"> doesn't seems to be nice to me. Is 
there any better way to test hexadecimal values. 
Apart from this is there a way of testing whether string is a digit or 
character <label>1.</label> <label>a.</label>. 

Not tested:

I believe  <xsl:when test=".='BULLET SIGN'"> will check for the literal 
string instead of something like [A-Za-z0-9]. I am using XSLT 1.0.

Any thoughts will be appreciated.

TIA,
Pankaj

Current Thread