The following code would translate the word JaMeS into
all uppercase -
<xsl:template match="/xml">
<xsl:value-of select="translate(jim/@name,
'abcdefghijklmnopqrstuvwxyz',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
</xsl:template>
While
<xsl:value-of select="translate(jim/@name,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
would translate into all lowercase.
Regards,
Mukul
--- dan sherman <h8_bsod(_at_)yahoo(_dot_)com> wrote:
I am having trouble understanding strings and
converting of cases. If I want to match something
exaclty in the xsl the case must match exactly. I
have
read the prevois posts on changing the case to match
but I am not getting it. How do I convert james to
all
lower or all caps to test in xsl. I have the code
and
below, but can not figure it out. Thanks.
<xsl:value-of select="translate($string,
'abcdefghijklmnopqrstuvwxyz',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
<xml>
<jim name=JaMeS">
</xml>
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--