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

Re: XSL output question

Subject: Re: XSL output question
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 8 Sep 1999 09:30:51 +0100 (BST)
xsl output entities
> I have an XML file that is encoding both with ISO-8859-1 and ISO-8859-2 
> characters using external entities declaration (ISOlat1.pen and ISOlat2.pen).

> 1/ What is the value of the 'encoding' attribute within the XML
> declaration ?
You can use none as then the default utf8 encoding is used (which is what
you are using here)


> 2/ How could we generate an HTML file encoding in UTF-8 using an XSL 
> stylesheet from this XML file ?
Most HTML browsers can't handle utf8, can they?



> Here is the declaration of the XML file :

<?xml version="1.0" standalone="yes"?>
<!DOCTYPE TEI.2 [
<!ENTITY % ISOlat1 SYSTEM "/local/led/share/dtd/pen/ISOlat1.pen">
%ISOlat1;
<!ENTITY % ISOlat2 SYSTEM "/local/led/share/dtd/pen/ISOlat2.pen">
%ISOlat2;
]>

So this XML file is utf8 encoded, but probably you are only using the
first ascii-compatible block of utf8.

The entity files do not affect the _encoding_ they just give entity
references to named characters, with definitions as unicode character
numbers.


iso latin1 does not change the encoding of the file, it just defines,
for example

&eacute;  

which it defines to be &#233; (or equivalently &#xE9;) You could
use this numeric character reference, or directly enter the unicode
character number 233 without needing to load the entity file.
The entity file only defines entity references .


The XSL engine doesn't really care whether you load these entity files
or not, whether you type &eacute; or  &#233; or é it always sees the
same character <Unicode-233> after the XMl parser has processed the
input document.

If you tell your xsl processor that you want to output HTML
put 

<xsl:stylesheet 
  xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">

<xsl:output method="html" />

at the top and then it should just `do the right thing'with HTML 
characters.

David


 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.