RE: [xsl] replace -x to -X

Subject: RE: [xsl] replace -x to -X
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 10 Jul 2006 21:35:37 +0100
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@xxxxxxxxx] 
> Sent: 10 July 2006 17:07
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> 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...???

Current Thread