[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: replace lower to upper

Subject: Re: replace lower to upper
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Mon, 07 Sep 2009 18:47:55 +0200
Re:  replace lower to upper
Douglas Wade wrote:
I am using the replace function, I would like to get value of the
attribute to be all caps and changed. There still is a lowercase 'b'
in the results. How should I change things to get it right.


Source:


<graphic boardno="rq4-b-271101-520-0002">

Transform:
<xsl:value-of select="replace( .,'RQ4-(.)-','RQ4N-A$1-','i')"/>

Bad Results:
<graphic boardno="RQ4N-Ab-271101-520-0002"/>

Desired Results:
<graphic boardno="RQ4N-AB-271101-520-0002"/>

If you want all upper case letters can't you simply do


<xsl:value-of select="upper-case(replace( .,'RQ4-(.)-','RQ4N-A$1-','i'))"/>

? Or could there be lower case letters in the attribute value you don't want to change to upper case?

--

	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.