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

Re: translate function

Subject: Re: translate function
From: abbouh <abbouh@xxxxxxxxxxxxxxxxx>
Date: Tue, 01 Jul 2003 11:17:50 +0000
xsl translate function
you can test it on this xml file:
.....
<caption>R&eacute;partition&nbsp;des&nbsp;alimentations&nbsp;dans&nbsp;la&nbsp;baie&nbsp;SK&nbsp;(vue&nbsp;avant)</caption>

......

try to get the caption and translate each &nbsp; to '-'
with the instruction:
<xsl:value-of select="translate($caption_title,' ','-')"/>
or
<xsl:value-of select="translate($caption_title,' @#160;','--'"/> as you
say.

the result is:
Répartition des alimentations dans la baie SK (vue avant)
but you should get :
Répartition-des-alimentations-dans-la-baie-SK-(vue-avant)



David Carlisle a écrit :

> > no the problem isn't resolved yet.
> what was wrong with the solution I posted?
> If you want to translate character 160 to a - just add that pair to
> your translate function.
>
> Note that 160 is not a space it is not even one of the "white space"
> characters recognised by XML, which are just tab space newline and cr.
>
> David
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.