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

RE: XSLT-Numerical character entity output

Subject: RE: XSLT-Numerical character entity output
From: Stuart Brown <sbrown@xxxxxxxxxxx>
Date: Wed, 26 May 2004 13:44:28 +0200
maths characters
Hi Steve

> I am trying to generate an xhtml+mathml document in which the more 
> esoteric maths characters are represented in the output by their decimal 
> numeric entities rather than the character.

All you need to do is specify the output encoding:

<xsl:output encoding="iso-8859-1">

The serialized output will be in that encoding, and any characters which
fall outside of it will be represented with a numerical character reference.
You have no control over whether it is decimal or hex, but I'm pretty sure
Saxon uses the decimals.

Bear in mind that XSLT processors are only *required* to support utf-8 and
utf-16 in output, however most support others.

Hope that helps,

Stuart

-----Original Message-----
From: Steve Lloyd [mailto:steve.lloyd@xxxxxxx] 
Sent: 26 May 2004 12:24
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  XSLT-Numerical character entity output


I am trying to generate an xhtml+mathml document in which the more 
esoteric maths characters are represented in the output by their decimal 
numeric entities rather than the character.
I thought I'd got the solution with the 'saxon:character-representation' 
attribute on <xsl:output>.

I use:
<xsl:output method="xml" indent="yes" encoding="utf-8" 
saxon:character-representation="decimal"/>

...but am still not getting entities on output of characters such as  #8477.

Any thoughts on where I'm going wrong?

-- 
Steve Lloyd, XML Developer-Editorial Production Dept. International
Baccalaureate Organisation
Tel: +44 29 2054 7869
FAX: +44 29 2054 7778

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.