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

Re: eacutes driving me nuts

Subject: Re: eacutes driving me nuts
From: Niclas Hedhman <niclas@xxxxxxxxxxx>
Date: Thu, 10 Jun 2004 12:50:54 +0800
nuts ascii
On Thursday 10 June 2004 11:57, Deirdre Saoirse Moen wrote:
> do I need to do something in the XML phase
> (i.e. the input) or the XSL phase (i.e. the transform)? Or both? So
> far, I've tried only the former and needed migraine medication from the
> head-thumping.

The proper tack would be to ensure that the ASCII -> XML is done in an 
encoding-aware manner. 
I.e, When you read the ASCII, you need to know its encoding, probably 
ISO8859-1.
You don't need (and possibly is better without) the &eacute; entity 
declaration.
So it is a matter of 'how' things becomes XML. If you are converting with 
Java, you would be reading the ASCII something like;

FileInputStream fis = new FileInputStream( file );
InputStreamReader in = new InputStreamReader( fis, "ISO8859-1" );
BufferedReader reader = new BufferedReader( in );
String line;
while( ( line = reader.readLine() ) != null )
{
    :
}

If you are using less sophisticated methods, you 'might' get away with setting 
the encoding for the XML document correctly ( the <?xml version="1.0" 
encoding="ISO8859-1"?> ), but it would still not produce the character 
sequence "&eacute;", but the character directly.


Cheers
Niclas
-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+


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.