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

How do I preserve a &#xnnnn; character reference betwe

Subject: How do I preserve a &#xnnnn; character reference between transformations?
From: Graham Hannington <Ghannington@xxxxxxx>
Date: Wed, 18 Dec 2002 22:10:05 -0000
xnnnn
I've read the Special Characters FAQ, and I'm still stumped.

I'm trying to insert a right-facing triangle into a PDF, using FOP.

First, I use one stylesheet to transfrom XHTML with class attributes into
XHTML without class attributes.
Second, I use another stylesheet (Xhtml2fo.xsl) to transform the previous
result into FO.
Third, I use FOP to convert the FOP into a PDF.

One thing I want to do in the first stylesheet is to transform this:

  <span class="symbol">|</span>

(yes, that's a vertical bar)

into this:

  &x#25B6;

(the UTF-8 right-facing triangle)

Both stylesheets specify:

  <?xml version='1.0' encoding="utf-8"?>

and

  <xsl:output method="xml" version="1.0" encoding="utf-8" indent="no"/>


I'm using MSXSL to perform the transforms.

I expect to be able to specify something like this:

  <xsl:template match="span[@class='symbol']">
    <xsl:choose>
      <xsl:when test="text()='|'">&#x25B6;</xsl:when>

    ...

    </xsl:choose>
  </xsl:template>

but, in the PDF, this produces a # (hash character) where the triangle
should be. And the output from the first stylesheet shows a single character
(I think a Greek "alpha" character) when I view it in Windows Notepad.

The second stylesheet successfully inserts &#x2022; (bullet) characters into
the FO, which appear correctly in the PDF.  How can I make the first
stylesheet insert &#x25B6; so that it also appears correctly in the eventual
PDF?

Graham Hannington

 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.