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

RE: Encoding attribute

Subject: RE: [xsl] Encoding attribute
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 30 Jan 2004 00:11:10 -0000
euro xml
> I don't understand very well what kind of encoding I must 
> utilice. I live in Spain and I read that I must utilice 
> ISO-8859-1 characters and I put always in XML files the <?xml 
> version="1.0" encoding="ISO-8859-1"?>  and in the XSL files 
> when I want to escape HTML I put always <?xml version="1.0" 
> encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

If you're entering your source XML documents and stylesheets using a
text editor, then you need to specify the encoding that your text editor
is configured to use, which is probably ISO-8859-1 by default (actually
it might be the Microsoft variant of that, but that's sufficiently close
that it doesn't usually matter).


> <xsl:output method="html"/>
> The problem is when I want to put some "especial" characters 
> like "€" , non-breaking espaces, etc... I put in the XSL 
> StyleSheet when I want to display "euro" character &euro; 
> &#8364; but whith &euro; he tells me "Entity Reference not 
> defined" and with &#8364; I see another character. Any 
> suggestion, please?
> 
You can't use entity references like &euro in XML unless you declare
them. If you use them, you must declare them in the DTD.

You can use numeric character references like &#8364 without declaring
them. If the result of your transformation is displayed incorrectly,
this is because the software that is displaying the output (for example
a browser or a text editor) thinks the file is in one encoding when it
is actually in another (alternatively, it might be using a font that
doesn't contain a glyph for that character). The answer is either to
change the encoding specified in xsl:output to match what your display
software expects, or to change the configuration of your display
software so that it handles the actual encoding of the file. The details
of how to do this are highly specific to your choice of software.

Michael Kay


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


Current Thread
  • [xsl] Encoding attribute
    • Fran - Thu, 29 Jan 2004 15:31:20 -0500 (EST)
      • Jim Fuller - Thu, 29 Jan 2004 16:01:20 -0500 (EST)
      • Michael Kay - Thu, 29 Jan 2004 19:03:37 -0500 (EST)
      • Michael Kay - Thu, 29 Jan 2004 19:11:08 -0500 (EST) <=
      • <Possible follow-ups>
      • David . Pawson - Fri, 30 Jan 2004 03:08:26 -0500 (EST)
        • Fran - Fri, 30 Jan 2004 07:58:09 -0500 (EST)
          • Fran - Fri, 30 Jan 2004 08:16:23 -0500 (EST)

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.