Ed,

We have a different problem, and I am not sure we are even doing it correctly, but I think the results from our solutions will solve your problem. To speed up
transformation time, we do not include DTD declarations. Now since we do
that we run into the problem that the XML parser won't parse our style sheets if we include some of the standard HTML entities. So what we do is add a small
custom DTD to the top of our style sheet before the <xsl:stylesheet> element

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

Now when we transform the stylesheet, the output is the binary representation of the entity. i.e. Depending on charset, 1 or 2 bytes and not an character version of the entity or some
character encoding (i.e. a hex or decimal string such as  #xxxxxx).

So using the example above &nbsp; will be serialized as the single binary character 0xA0.

HTH
John G


Ed Manners wrote:

Thanks for the quick reply but its not that I want to choose between either
decimal or hex, but I want to change its output behaviour so it outputs
numeric character references rather then character entity references.

Or is it that you are saying that because there is no design in switch for
hex versus decimal, then my request is not feasible at this time.



-----Original Message-----
From: Joseph Kesselman [mailto:[EMAIL PROTECTED]
Sent: 19 October 2005 15:08
Cc: [email protected]
Subject: Re: Support for Numeric entities refs in HTML output


Minor terminology point: these character escapes are known as "numeric
character references".

As of last time I checked (some time ago, admittedly), we didn't have a
designed-in switch for selecting decimal versus hex representation of
character references. It wouldn't be an entirely unreasonable feature to
add, if it can be done without performance impact.

But I'd suggest fixing the other tool first, or as well, to accept both
decimal and hex syntaxes. The next system it has to interoperate with may
not be alterable...

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk

--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.4/142 - Release Date: 18/10/2005

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.4/142 - Release Date: 18/10/2005


--
--------------------------------------
John Gentilin
Eye Catching Solutions Inc.
18314 Carlwyn Drive
Castro Valley CA 94546

   Contact Info
[EMAIL PROTECTED]
Ca Office 1-510-881-4821
NJ Office 1-732-422-4917

Reply via email to