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

Re: Character substitution

Subject: Re: Character substitution
From: Sven Waibel <sven.waibel@xxxxxxxx>
Date: Mon, 10 Jan 2005 11:21:22 +0100
xml character substitution
Yes that's not really the problem, the problem is that my text() returns nothing, so nothing can be replaced.

David Carlisle wrote:

>>how is the euro character represented in your document ?
> 
> 
> It never matters how the source document is encoded, all such matters
> are resolved by the XML parser before XSLT starts.
> 
> 
>>is it an entity (e.g. I think its numeric entity is &128;) if so u might 
>>have to;
> 
> 
> Numeric character references are not entity references (they refer to
> characters not entities) the number for Euro is 8364 not 128.
> 
> 
>>- try using numeric entity for replacement
> 
> 
> You can use any XML syntax for that character in your stylesheet, a
> numeric character reference, or if it is in the encoding  used by the
> stylesheet you may use character data directly.
> 
> 
>>- make sure your xml encoding is iso-8859-1 (or UTF-8)
> 
> 
> iso-8859-1  doesn't have a euro, utf8 does. So if you use iso-8859-1 
> then you can't enter the euro directly, you'd have to use a character
> reference. 
> 
> You can use the character reference & # 8 3 6 4 ; in any encoding (so
> long as the encoding includes the digits and the characters & # ;)you
> can take a look at an xsl template that has
> 
> 
>>been tested over time at 
>>  exslt.org
>>http://www.exslt.org/str/functions/replace/index.html
> 
> 
> Since the request was just to change one character by another, the
> general replace template isn't needed you can just use the translate()
> function.
> 
> David
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________

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.