RE: [xsl] Output character references for all but one character

Subject: RE: [xsl] Output character references for all but one character
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Tue, 22 Jun 2004 11:28:41 +0100
>>     This xml:
>>     
>>     <node value="£">Hello&#160;World</node>
>>     
>>     Once transformed, looks the same:
>>     
>>     <node value="£">Hello&#160;World</node>
>>     
>>     That is, the non-breaking-space appears as a character 
>>     reference, and the pound sign appears as the actual character.
>>     
>>     I've tried various combinations of output encodings, d-o-e 
>>     and character maps, but I haven't be able to do it so far.  
>>     How would character maps replace d-o-e on attributes here?  
>> 
>http://www.dpawson.co.uk/xsl/rev2/exampler.html#ch-map
>
>Actually uses nbsp Andrew :-)
>
>HTH DaveP

Aha! Thanks Dave, you must have come across this problem before to think of that solution from the question I posted...?  I would never have thought about using double-escaping, but I guess this is the perfect use for it - I've mapped a few other characters that needed it as well:

<xsl:output-character character="&#183;" string="&amp;#183;"/>

Thanks once again, you've made my day :)

Current Thread