[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Transforming ™ to ™
Thanks Michael ... the output encoding="us-ascii" does the trick :-)
Sanjay
On 7/18/06, Michael Kay <
mike@s...> wrote:
Welcome aboard, and if you can understand Len Bullard,
you're doing better than most of us.
> I have
an xml which I transforming to an html. I want the trademark symbol in the
output html. More specifically, I need ™ in the final html.
> Now,
I see that if I put & in the xml, I get & in the output html.
However, if I put ™ or if I define a entity, the output in html is ?.
So this html gets displayed differently on different browsers.
> Only if your browser or server is misconfigured.
™ means the Unicode character x2122 and it should display the same
way whether you use a named entity reference, a numeric character
reference, or the literal Unicode character itself.
I need
™ or ™ in the final html so that the browsers read it
correctly.
I tried creating entity defination as <!ENTITY trade
"&#x2122;"> but that gives the same output. Also, I cannot use
<xsl:text disable-output-escaping="yes"> kind of hack.
How do you
people put special characters like these in xml?
If you
can't fix the underlying configuration problems that cause the character to
be displayed incorrectly, try using <xsl:output
encoding="us-ascii"/>.
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
RSS 2.0 |
|
Atom 0.3 |
|
|
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|