Subject: Re: [xsl] Character substitution From: Sven Waibel <sven.waibel@xxxxxxxx> Date: Mon, 10 Jan 2005 11:21:22 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Character substitution, David Carlisle | Thread | Re: [xsl] Character substitution, David Carlisle |
Re: [xsl] Character substitution, David Carlisle | Date | Re: [xsl] Character substitution, David Carlisle |
Month |