The
following text is sent to the below template. I am using Xalan C++ 1.1.0
testXSLT.exe.
A private pilot
flying a magnetic heading of 185° on a VFR cross country flight tracking
outbound on the 177° 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">'</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.)
thanks,
Matthew L.
Avizinis
Gleim Publications, Inc.
4201 NW 95th Blvd.
Gainesville, FL
32606
(352)-375-0772 ext. 101
www.gleim.com
