xsl-list
[Top] [All Lists]

Re: [xsl] May be fun for you ....

2011-05-16 17:48:31
You write "Haven't posted here in a while" so I will forgive your blatant 
disregard of the XSL-List requirement for informative subject lines. This time. 

In your future postings to XSL-List please provide an informative title or 
subject line. Good subject lines - those that describe the subject matter of 
your message - not only increase the chances that you will receive answers to 
questions or responses to comments, they also make your message and any replies 
to it accessible in the list archives.

In this case "Puzzle with special characters" would have been better than "May 
be fun for you ...." (which is totally uninformative), and "Confusion between 
encoding and version" may have been better yet. 

-- Tommie Usdin
   XSL-List Owner



On May 16, 2011, at 3:56 PM, daniel whitney wrote:

Haven't posted here in a while, but here's something that had me
baffled. A co-worker came to me and said that she was converting XML
to text and couldn't understand why her special characters were coming
out with a strange character in front of them. I did a transform using
Saxon 6.5.3 and sure enough the output was like this:

Â¥3,000,000<tab>Â¥3,000,000
£30,000<tab>£23,250

That's an easy one, I thought, she's outputting UTF. I quickly checked
the encoding, saw iso-8859-1 - that wasn't the problem.  Checked the
rest of the XSL files, they appeared fine. Checked the XML file,
seemed fine as well. Pulled both the XSL and XML into a hex editor,
see if there was some funny hidden character. Nothing. Was turning
into a real head scratcher. Desperate times called for desperate
measure - so thinking outside of the box, and daring the unthinkable,
I changed the output method from "text" to "xml". Of course the same
problem. At this point I was running out of options. I showed the
co-worker the transformed XML file, explaining to her that everything
looked fine, when I got my first clue: the XML declaration showed:
<?xml version="iso-8859-1" encoding="utf-8"?>. Very strange ... Going
back to the XSL file I saw the problem. The <xsl:output element looked
like this: <xsl:output method="text" indent="yes"
version="iso-8859-1"/>. Of course in my zeal to find the quick answer
and prove my XML expertise, I saw the iso-8859-1 attribute value but
didn't bother checking the attribute itself.

I'm sure there's some witty moral to this story ... anyone. For my
part ... details - Details - DETAILS.

Dan

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


====================================================================== 
B. Tommie Usdin                        
mailto:btusdin(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com    
17 West Jefferson Street                           Phone: 301/315-9631 
Suite 207                                    Direct Line: 301/315-9634 
Rockville, MD  20850                                 Fax: 301/315-8285 
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML             
  
======================================================================


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>