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

RE: how to make the XP parser recognize xml encoding

Subject: RE: how to make the XP parser recognize xml encoding
From: "Ron Ten-Hove" <rtenhove@xxxxxxxxx>
Date: Tue, 27 Jun 2000 15:17:43 -0700
xslprocessor unicode
> -----Original Message-----
> This is an interesting problem.  I appreciate if anyone can offer me some
> help on the following.  Here's my source xml:
> 
> <?xml version="1.0" encoding="iso-8859-1"?>
> ...
> 
> The xml file contains non-ascii characters and it must use the eocoding
> specified in the document itself.  I'm using James Clark's XT engine
> (com.jclark.xsl.sax.XSLProcessor) and XP parser 
> (com.jclark.xml.sax.Driver).
> I construct a FileReader for the above xml file, then use it to 
> construct an
> InputSource that feeds into the xsl processor.  But somehow the 
> XP parser is
> not recognizing the encoding embedded in the XML decl.  I actually put
> garbage there (e.g., encoding="xxx") and the results come out the same.
> 

You should use the same technique used by com.jclark.xsl.sax.Driver.main();
it supplies the processor with InputSource objects that are constructed
using URL strings that indicate the files to be processed.  I'm not sure
*how* you are managing to invoke the processor with FileReader objects,
but I'd guess that the XML parser is assuming that InputStreamReaders
provide conversion to Unicode.

-Ron


 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.