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

RE: Problem with XT and encoding?

Subject: RE: Problem with XT and encoding?
From: Mark Kennedy <MarkK@xxxxxxxx>
Date: Wed, 30 May 2001 16:18:34 -0400
char 187
Paul, et. al.:

Thanks for the reply. I tried adding the encoding to the <xsl:output>
element and got the same result. In fact, the encoding attribute of the
resulting document was *still* utf-8, even when I specifically tried to set
the encoding to iso-8859-1. Odd.

On the advice of Janning Vygen I downloaded Saxon and found that fixed my
problem. It seemed to handle the encoding properly. I don't know if XT just
doesn't handle the encoding correctly or if there is another explanation,
but for now I'm just going to switch to Saxon as my XSLT engine.

BTW, I noticed that showed up on the digest version of the list didn't
contain the same characters that I sent (those darn encoding issues again
:-), so for those who didn't understand my previous note, here's a summary:

The XML file contained the "Right Angle Quote" character, which looks like
>> and which is character number 187 in the ISO-8859-1 char set. The XML
file was encoded as ISO-8859-1. When the XML was processed by XT the >>
character was replaced by an 'A' with a circumflex (character 194) followed
by the Right Angle Quote (character 187).

Thanks again to Paul and Janning for responding!

MK

> Date: Wed, 30 May 2001 08:32:06 -0700
> From: "Clapham, Paul" <pclapham@xxxxxxxxxxxxx>
> Subject: RE:  Problem with XT and encoding?
> 
> Yes, it is a simple encoding issue.  You have specified the encoding of
your
> input XML as ISO-8859-1, but you have not specified the encoding of your
> output XML, so it defaults to UTF-8.  This encoding requires 2 (or more
> bytes) for characters above Unicode 127.  Try this:

>  <xsl:output omit-xml-declaration="yes" encoding="ISO-8859-1"/>

> PC2

- -----Original Message-----
From: Mark Kennedy [mailto:MarkK@xxxxxxxx]
Sent: May 30, 2001 08:17
To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'
Subject:  Problem with XT and encoding?


Hello, all:

I'm having a problem with transformations using XT when using characters
that are outside of the standard ASCII 127, and I can't figure out why. In
the following examples, the ; is character 187 in ISO-8859-1 (Latin 1). That
character (and seemingly any character greater than the standard 127) gets
turned into two characters, i.e. the ; gets turned into B;

I imagine this is some simple encoding issue, but I'm flummoxed. The only
other XSLT engine that I have available for testing is the MSXML in IE5, and
I don't get this result with it, though I don't really think that means
much.

I'm running the Win32 binary of XT on and NT machine.

Any suggestions are appreciated!

Input XML File:
<?xml version='1.0' encoding='ISO-8859-1'?>
 <test>;</test>

XSLT File:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output omit-xml-declaration="yes"/>

 <xsl:template match="/">
  <xsl:copy-of select="test"/>
 </xsl:template>

</xsl:stylesheet>

Resulting XML File:
<test>B;</test>

______________________
Mark Kennedy
markk@xxxxxxxx 


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


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.