This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: AW: Encoded question


At 15:17 7-11-2000 +0000, Kay Michael wrote:
> > > > 1) What do I have to do to render ™ as ™ (not as "~Y")?
> > >
> > > I don't think that these characters are allowed characters.
>
>This is an allowed character in XML (and therefore XSLT) even though it has
>no defined meaning in Unicode.

Almost: it has a well-defined meaning of being a system-assigned control 
character.  It is not, ever, a trademark sign.

>You can output the character by writing ™ in your stylesheet.
>
>You can influence how the character is output by selecting the output
>encoding, e.g.
>xsl:output encoding="iso-8859-1"; however, you can't force the processor to
>use a decimal character reference rather than some equivalent
>representation.

Yes, but you can't ever output a trademark sign from this.

All numeric character entity references in an XML document (including XSLT 
transformation sheets) are references to Unicode characters, regardless of 
the input encoding (and certainly regardless of the transformation sheet's 
requested output encoding).

If you want a trademark sign, use ™ as someone else already 
suggested.  A good XSLT engine, when outputting as HTML, will represent 
this as ™, which most browsers now support.

>I suspect that the ~Y appeared because the processor produced correct UTF-8
>output and you looked at it with something that doesn't understand UTF-8.

I don't think so; character 153 (U+0099) in UTF-8 would be \xC2 \x99, which 
would have displayed (in a non-UTF-8-aware Windows editor) as A-circumflex 
and a trademark sign.  Another possibility is that the display program 
correctly recognized the character as a control character, and displayed it 
in using its own control-code patois.

-Chris
--
Christopher R. Maden, Senior XML Analyst, Lexica LLC
222 Kearny St., Ste. 202, San Francisco, CA 94108-4510
+1.415.901.3631 tel./+1.415.477.3619 fax
<URL:http://www.lexica.net/> <URL:http://www.oreilly.com/%7Ecrism/>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]