[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xsl and toc.hhc (was xml -> htmlhelp and character

Subject: RE: xsl and toc.hhc (was xml -> htmlhelp and character 8220)
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 12 Nov 2004 23:31:38 -0000
xml into hhc
Recent versions of Saxon have some equally horrible hacks. Specifically
(again only for the less common encodings), it now uses the JDK 1.4
canEncode() method, but does some random sampling to check the answer,
because it is known that some encodings say they can encode characters that
they can't. Yuk.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Elliotte Harold [mailto:elharo@xxxxxxxxxxxxxxx] 
> Sent: 12 November 2004 23:18
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  xsl and toc.hhc (was xml -> htmlhelp and 
> character 8220)
> 
> Michael Kay wrote:
> 
> > As the passage above explains, the encoding most (a) be one 
> that the JRE
> > supports, and (b) be one that Saxon knows about. This is because the
> > translation of unencodable characters into character 
> references is done by
> > Saxon, not by the JRE, and until recently there was no way 
> of asking Java
> > which encodings were available and which characters they supported.
> 
> Well, there's no good way but it can be done. XOM hacks this for the 
> less common character sets by trying to output the given 
> character into 
> a ByteArrayOutputStream and seeing whether it gets that 
> character or a 
> replacement character. It's an ugly hack, but I was 
> pleasantly surprised 
> at how well it performed. (For the more common character sets 
> XOM uses 
> algorithms or lookup-tables.)
> 
> -- 
> Elliotte Rusty Harold  elharo@xxxxxxxxxxxxxxx
> XML in a Nutshell 3rd Edition Just Published!
> http://www.cafeconleche.org/books/xian3/
> http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/
> ref=nosim

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.