I am writing an XSLT to produce HTML for HTML Help Viewer 1.0. Some of the titles contain the < and > sequences. This causes loads of problems with the viewer as it converts them back to angle brackets. Having read on-line that having them as there Unicode versions will work (http://mshcmigrate.helpmvp.com/faq/notes10) I tried to use the replace function to do this and the result is the same as the input.
The code I am using is:
replace(replace(/*/name, '<', '<'), '>', '>')
The input:
DocumentationTest.GenericClass<T> Namespace
Outputs as:
DocumentationTest.GenericClass<T> Namespace
How can I perform a string replace to get this output?
DocumentationTest.GenericClass<T> Namespace
<and<are two different representations of the same character. You can use replace() (or more simply, translate()) to change one character to another, but you can’t use it to control how that character is represented in the serialized output – that’s entirely up to the serializer. You can influence it, however, using character maps – see xsl:character-map.