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

Re: character maps

Subject: Re: character maps
From: Craig Sampson <Craig.Sampson@xxxxxxx>
Date: Thu, 16 May 2013 14:02:55 +0000
Re:  character maps
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:

Error
  com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
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
output-character:

<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

--------------------------------------------------------------------
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

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.