Dave,
  What was happening was that I was sending an ASCII extended character to
the template and it was spitting out two characters, just as you suggest in
#2 below.  Using both #1 and #2 has removed the problem.  I, as a human, was
assuming text output so it didn't occur to me that I had to specify the
encoding to the machine.  You very perceptively saw solution even though my
first post to this group was not particularly concise.

Thanks for the suggestions,
   Matthew L. Avizinis <mailto:[EMAIL PROTECTED]>
Gleim Publications, Inc.
   4201 NW 95th Blvd.
 Gainesville, FL 32606
(352)-375-0772 ext. 101
      www.gleim.com <http://www.gleim.com>



| Hi Matthew,
| > A couple of things to try:
| >
| >     1. Specify text as the method attribute on an xsl:output
| element, and
| don't use the -text option.
| >
| >     2. Specify an encoding that is appropriate for your target system,
| again using xsl:output.  Without an encoding, the
| >     processor will use UTF-8, which is probably correct, but
| may not look
| correct, depending on your system and the tools
| >     you're using.  The degree sign (U+00B0) will be encoded as two bytes
| in UTF-8 (C2 B0), which is probably why you're
| >     seeing the two characters � and �.
| >
| >     For example, ISO-8859-1(Latin-1) might be appropriate, or
| perhaps one
| of Windows' encodings, like Windows-1252, or
| >     even ASCII, if you don't might getting the degree sign as a numeric
| character reference.
| >
| >     <xsl:output method="text" encoding="ISO-8859-1"/>
| >
| > Dave
|
|
|
|
|
|                     "Matthew L.
|
|                     Avizinis"            To:
| <[EMAIL PROTECTED]>
|                     <[EMAIL PROTECTED]        cc:     (bcc: David N
| Bertoni/CAM/Lotus)
|                     m>                   Subject:     Please bear
| with me one more time
|
|
|                     07/06/2001
|
|                     04:03 PM
|
|                     Please
|
|                     respond to
|
|                     xalan-dev
|
|
|
|
|
|
|
|
| I posted what I think to be a Xalan2 defect recently, but I at
| that time it
| was not obvious to me how to subscribe to this mailing list so I do not
| know if anyone has responded to my query.  I find also that the archives
| are not currently available.  Consequently I have no way of know
| if any has
| responded previous to now.  So, if anyone has answered my question please
| repost the answer so I can read it now that I receive messages from this
| list.
| thanks much,
|   Matthew L. Avizinis
| Gleim Publications, Inc.
|    4201 NW 95th Blvd.
|  Gainesville, FL 32606
| (352)-375-0772 ext. 101
|      www.gleim.com
|
| A copy of the question:
|
| The following text is sent to the below template. I am using Xalan C++
| 1.1.0 testXSLT.exe with the -text option.
|
| A private pilot flying a magnetic heading of 185&deg; on a VFR cross
| country flight tracking outbound on the 177&deg; radial of a VOR above
| 3,000 ft. AGL should maintain an odd, not even, thousand ft. MSL altitude
| plus 500 ft., e.g., 5,500 ft. MSL (14 CFR Sec. 91.155).
|
| TEMPLATE:
|
|
| <xsl:template name="TextOut">
|
|
| <xsl:param name="text"/>
|
|
| <xsl:variable name="apos">&apos;</xsl:variable>
|
|
| <xsl:variable name="ntext" select="$text"/>
|
|
| <xsl:choose>
|
|
| <xsl:when test="contains($text,$apos)">
|
|
| <xsl:variable name="first" select="substring-before($ntext,$apos)"/>
|
|
| <xsl:variable name="rest-of-it" select="substring-after($ntext,$apos)"/>
|
|
| <xsl:value-of select="concat($first,'\',$apos)"/>
|
|
| <xsl:if test="$rest-of-it">
|
|
| <xsl:call-template name="TextOut"><xsl:with-param name="text" select="
| $rest-of-it"/></xsl:call-template>
|
|
| </xsl:if>
|
|
| </xsl:when>
|
|
| <xsl:otherwise>
|
|
| <xsl:value-of select="$text"/>
|
|
| </xsl:otherwise>
|
|
| </xsl:choose>
|
|
| </xsl:template>
|
|
|
|
|
| pertinent OUTPUT:  .... °  ....
|
|
| I think it should not be emitting this character twice.  Else am I doing
| something incorrectly? (This program has otherwise functioned
| exceptionally
| well.)
|
|
|
|
|
|

Reply via email to