[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] character maps

Subject: Re: [xsl] character maps
From: Craig Sampson <Craig.Sampson@xxxxxxx>
Date: Thu, 16 May 2013 14:02:55 +0000

Thanks for the responses, both directly and through the list-serve. I got it
working this morning. It took a combination of David Carlisle's US-ASCII and
Ken Holman's advice to get the job done.

Just pasting the Greek characters in the xsl:output-character character
attribute didn't work. In fact it caused this error:

Invalid byte 1
  of 1-byte UTF-8 sequence.
Failed to compile stylesheet. 1 error detected.

I had to run my program with David's US-ASCII specification:

<xsl:output  encoding="US-ASCII" omit-xml-declaration="yes"/>

first to get the character number. I then inserted it into my

<xsl:output-character character="&#956;" string="&amp;#x03BC;"/> <!-- lc mu

which gave me the result I was looking for: <m:mi>&#x03BC;</m:mi>

Wolfgang Laun asked why I needed to do this.
I have to convert the UTF-8 characters to their NCR representations due to a
bug in Design Science's MathML product. We've been waiting months for them to
fix the problem. My HTML output containing equations (MathML) is processed by
Design Science's product which converts them into png graphics. I can then
include/reference the graphics in my HTML. Newer browsers have support for
MathML but I have to allow for customers that are still using older browsers
hence the png conversion. We've been using the Arbortext editor to support our
in house authors, which allows us to specify NCR output to avoid the bug, for
years now. But we've recently started developing for a MS Word based editor
that outputs DITA that we can supply to outside (independent) authors who are
unfamiliar with structured mark-up. The XSLT program converts the DITA to our
internal DTD's mark-up while separating the MathML into separate equation
files for graphic processing. The above problem relates to support for this
new data stream.

Thanks for the help,

Craig R. Sampson    SAS Institute Inc.  email: craig.sampson@xxxxxxx
  XML Technologies  SAS Campus Drive    phone: (919) 531-7417
                    Cary, NC.  27513    FAX:   (919) 677-4444
     Please consider the environment before printing this email

Current Thread