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

Re: Replacing strings in XSL

Subject: Re: Replacing strings in XSL
From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx>
Date: Sat, 19 Mar 2005 01:11:40 -0800 (PST)
replacing blank values xsl
When I see my below post in my browser (IE 6), I
cannot see the 3rd argument of translate function to
what I wrote. It appears as a blank(its a expected
browser function), and not the character reference I
wrote (160; preceded by &#). I guess you would also
see it as space .. I thought of pointing this to you.

You may look at "HTML source" of this post to see
exactly what I wrote!

I would also recommend this link..
http://www.dpawson.co.uk/xsl/sect2/nbsp.html
to read more about nbsp.

Regards,
Mukul

--- Mukul Gandhi <mukul_gandhi@xxxxxxxxx> wrote:
> This can be achieved with the translate function..
> 
> For e.g. if the XML is -
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
>   <MANUFACTURER>LG Electronics Inc</MANUFACTURER>
> </root>
> 
> and XSL is -
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   
>   <xsl:output method="html" indent="yes" />
>   
>   <xsl:template match="/root">  
>     <p><xsl:value-of
> select="translate(MANUFACTURER,'
> ', 'B ')" /></p>
>   </xsl:template>
>   
> </xsl:stylesheet>
> 
> The output of transform is -
> <p>LG&nbsp;Electronics&nbsp;Inc</p>
> 
> Hope this is what you needed.
> 
> Regards,
> Mukul



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more. 
http://info.mail.yahoo.com/mail_250

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-2013 All Rights Reserved.