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: hyperlinks


My apologies for missing the obvious (dec 160 is hex a0). I shall be more
FAQtual next time.

I may have a hint about what the problem is. I got the a character with an
acute accent (á) when I tested   or   with Saxon 6.1 and msxsl
on DOS. I supposed this is because DOS uses the IBM code page 437 character
set (same as IBM code page 850). An a with acute (á) is decimal 160 in
437/850. An nbsp in 437/850 is decimal 255 so that given a stylesheet with:

<!DOCTYPE xsl:stylesheet [
 <!ENTITY nbsp "&#255;">
]>

and then applying:

RAPIDS<xsl:text>&nbsp;</xsl:text>MI<xsl:text>&nbsp;</xsl:text>49501

with output encoding of iso-8859-1 yields the result:

RAPIDS MI 49501

You can't tell, but those are NBSPs. Why it only works with iso-8859-1 and
not UTF-8 baffles me. The result makes me assume that what Michael Beddow
said is correct:

>Check the character encoding of your output html document (or the
>default encoding settings) of your browser. Looks like your browser
>may be using an encoding in which 0xA0 doesn't map to a non-breaking
>space. There are some around.

I tested this on IE 5.5 using UTF-8 which, with both &#160; and &#xa0;,
performed as advertised.

I believe when Ha Tran determines what character set is in use by his
browser or other environment, he will be able to clear up his problem.

Mike

-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of David
Carlisle
Sent: Thursday, February 01, 2001 10:07 AM
To: xsl-list@lists.mulberrytech.com
Subject: Re: [xsl] hyperlinks




   Do you want a non-breaking space in XML? In HTML browsers, &#160; was
equiv
   to nbsp, but in a XML char ref (Unicode) its 00A0. Try: <!ENTITY nbsp
   "&#xa0;"> or <!ENTITY nbsp "&#x00A0;">. Didn't test but should work.


As mentioned already this week (and in the faq for this list)
&#160; _is_ &#xa0; 'cause xao is 10 x 16 + 0 = 160.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

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



 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]