[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: service marks and other special symbols
> I have a perplexing issue that I just can't figure out. I > want to have my xsl document output the code for the service > mark symbol (℠) but it looks like the xsl parser > replaces the code with a ? or square symbol in the html > stream. Let's try to get the terminology right first: an XSLT processor takes a source tree as input and produces a result tree as output. The XML parser converts the source XML into a source tree, and the XSLT serializer converts the result tree into serialized XML or HTML. The HTML is then typically displayed on the screen by some software, such as an editor or a browser. The thing that's putting the ? or square symbol on your screen is this last component, the display software, which is about as far from the parser in this sequence of events as you could get. If the display software is failing to display the character correctly this could be because the character isn't present in the font, or it could be because it's misconfigured to think that the document is in a different encoding from its actual encoding. The serializer has almost certainly put the correct character in the output, but you're having difficulty seeing it there because of the limitations of your display software. It can be helpful in such cases to force the serializer to output the character as a symbolic character reference, and the simplest way to do this is to set <xsl:output encoding="us-ascii"/>. There's no need to use character maps or disable-output-escaping for this. A better solution, however, would be to work out what's actually going wrong downstream on the display side. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|