This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Any suggestions on Java problems? (with Saxon)


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'">&amp;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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]