xsl-list
[Top] [All Lists]

RE: [xsl] replace -x to -X

2006-07-10 13:35:52
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>