Re: WG: [xslt] decimal char problem - possible Solution



Daniel Veillard writes:
> On Thu, Sep 13, 2001 at 04:37:39PM +0200, Oliver Feige wrote:
> > >   Which looks perfectly correct and should be supported by Netscape.
> > > So you're doing a deviation from this, probably missing the xsl:output
> > > information in your stylesheet.
> > >   I don't want to guess, I asked for the informations, I don't have them
> > > yet, so far I think you did an error somewhere.
> > > 
> > 
> > I know what you mean. I did the test, and its work. But when we like to
> > edit the result with HotMetal Pro and so on, we get in trouble. We
> > switched from xalan/xerces to libxml/libxslt. And Xalan Xerces do as
> > output decimal encoding.
> > 
> > Is there an possibility to switch from hexadecimal to decimal?
> 
>                         WTF !!!
> 
>   I told you "I don't want to guess" !!!
> Depending on your stylesheet this will requires *different ways* to fix it.
> the code path in the output DEPENDS on xsl:output values if any.
> 
>   Could people *PLEASE* don't make me loose time stupidly. I asked
> for the information to reproduce the problem. I don't have them, I NEEED
> them to be able to make any sensible answer.
> 
The problem shows up, when you require an encoding like ISO-8859-1.
In utf-8 output there is no need to introduce a character reference,
so libxml doesn't.

So let's say one has some xml
----
<bla>&#8216;</bla>
----
and some xslt (doing nothing but define iso-latin1 html-output)
----
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="no" encoding="ISO-8859-1" method="html"/>
</xsl:stylesheet>
----

you get
----
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
&#x2018;
----

If you leave out the encoding definition in the stylesheet you get
(without the header and piped to od -c):
\n 342 200 230  \n
which I expect to be the utf8 representation of u8216 (unchecked though).

So for people, who want to have iso-latin1 HTML (e.g. to avoid problems
with opera (or does it handle unicode now?) or for whatever reason they
have) and avoid hexadecimal character references (e.g. due to netscape
issues), there is a problem. 

greetings
	Morus
-- 
Th. Morus WALTER (morus.walter@xipolis.net)
Manager Content & Data Development
xipolis.net GmbH & Co. KG
Schellingstraße 35 · 80799 München
Tel. 089/286954-24 · Fax. 089/286954-30
www.xipolis-base.de · www.mr-check.de · www.xipolis.net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]