This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Any suggestions on Java problems? (with Saxon)
- To: docbook-apps <docbook-apps at lists dot oasis-open dot org>
- Subject: Re: DOCBOOK-APPS: Any suggestions on Java problems? (with Saxon)
- From: Michael Westbay <westbay at seaple dot icc dot ne dot jp>
- Date: Tue, 18 Sep 2001 20:31:29 +0900
- List-Id: <docbook-apps.lists.oasis-open.org>
- References: <20010917144903.C14839@e-smith.com><20010918033227.C5617@redhat.com>
Veillard-san wrote:
> Well I have to compose with different users viewpoints and needs. That
> part is a bit confusing, the best would be to have a tunable parameter
> in xsl:output but that would be HTML specific.
I output in iso-2022-jp, and none of those entities work well. My solution
was to override their use like this:
<xsl:template name="dingbat.characters">
<!-- now that I'm using the real serializer, all that dingbat malarky -->
<!-- isn't necessary anymore... -->
<xsl:param name="dingbat">bullet</xsl:param>
<xsl:choose>
<xsl:when test="$dingbat='bullet'">o</xsl:when>
<xsl:when test="$dingbat='copyright'">(C)</xsl:when>
<xsl:when test="$dingbat='trademark'">(TM)</xsl:when>
<xsl:when test="$dingbat='trade'">(TM)</xsl:when>
<xsl:when test="$dingbat='registered'">(R)</xsl:when>
<xsl:when test="$dingbat='service'">(SM)</xsl:when>
<xsl:when test="$dingbat='nbsp'">&nbsp;</xsl:when>
<xsl:when test="$dingbat='ldquo'">"</xsl:when>
<xsl:when test="$dingbat='rdquo'">"</xsl:when>
<xsl:when test="$dingbat='lsquo'">`</xsl:when>
<xsl:when test="$dingbat='rsquo'">'</xsl:when>
<xsl:when test="$dingbat='em-dash'">-</xsl:when>
<xsl:when test="$dingbat='mdash'">-</xsl:when>
<xsl:when test="$dingbat='en-dash'">-</xsl:when>
<xsl:when test="$dingbat='ndash'">-</xsl:when>
<xsl:otherwise>
<xsl:text>o</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Even when the browser did understand some of the entities, the character
encoding took presidence and caused most to escape to double byte characters.
(This is a big problem on sites like the LA Times which seem to use M$ tools
to write, outputting a lot of these entities but NOT specifying the encoding
to tell my browser not to use Japanese as the default.)
--
Michael Westbay
Work: Beacon-IT http://www.beacon-it.co.jp/
Home: http://www.seaple.icc.ne.jp/~westbay
Commentary: http://www.japanesebaseball.com/forum/
----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>