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

Re: TrAX XSLT emits &entities for iso-8859-8 character

Subject: Re: TrAX XSLT emits &entities for iso-8859-8 characters
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Fri, 17 Aug 2001 09:15:23 +0100
saxon character representation hex
Hi Eli,

> When my TrAX XSLT generates HTML, XSLT emits Hebrew letters as
> &#entities. This makes the HTML illegible, and a nuisance to debug.
> How can I tell TrAX to emit simple Hebrew characters? If there's no
> way, how can I tell my customer that her Web designers will hate the
> tool I've recommended to her? :- (

You may be able to find something in the TrAX API that gives you
control over when character entity references are used, though I can't
immediately find anything with a scan through the documentation.

The XSLT processor that you use may give you a bit more control than
the TrAX API, either through its particular API or within the
stylesheet. For example, Saxon has a saxon:character-representation
attribute on xsl:output that gives you control, so you could do
something like:

<xsl:output method="html"
            saxon:character-representation="native;hex"
            encoding="ISO-8859-8" />

(It might be that Saxon doesn't support that encoding, in which case
you should probably use UTF-8, as long as the editors that you're
using support it.)

The above xsl:output element tells Saxon to serialise characters that
can be represented in the ISO-8859-8 encoding natively, and those that
can't as hexadecimal character references.

If the processor you're using doesn't give you that kind of control,
you could try setting the output method to XML (XHTML) rather than
HTML; that way you get around the HTML serialisation outputting
characters as character entity references, as long as you use (and the
processor supports) an encoding in which the characters can be
represented. You do then have to worry a bit more about the way in
which the result of the stylesheet is serialised, because the HTML
output method does a few very helpful things for you, but usually this
isn't a problem.

I guess the final solution would be to write your own serialiser, or a
post-processor to work on the output, but you shouldn't have to go
that far, I think.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.