You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Matthew L. Avizinis" <ml...@gleim.com> on 2001/07/07 01:03:23 UTC

Please bear with me one more time

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