In XSLT 2.0:
<xsl:analyze-string select="$tmp_string" regex="^.|-.">
<xsl:matching-substring>
<xsl:value-of select-"upper-case(.)"/>
</xsl:matching-substring>
<xsl:non-matching-substring>
<xsl:value-of select-"lower-case(.)"/>
</xsl:non-matching-substring>
</xsl:analyze-string>
Not tested.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Renate [mailto:renaate(_at_)gmail(_dot_)com]
Sent: 10 July 2006 17:07
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] replace -x to -X
I have a string $tmp_string.
for ex., JIMMY-DIMMy
And I need to change the following:
first letter is in uppercase
other letters are in lowercase
first letters after "-" sign also is in uppercase
the result will be:
Jimmy-Dimmy
I know how to make Jimmy-dimmy, but how to make Jimmy-Dimmy...???
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--