I've had similar problem with white spaces and my cheap work around is to not
have spaces in my template. So I'd make:
<PRE>
<B>
<xsl:text>some text node </xsl:text>
</B>
<xsl:call-template name="insert-anchor">
<xsl:with-param name="anchor" select="someNode"/>
</xsl:call-template>
</PRE>
into this:
<PRE><B><xsl:text>some text node </xsl:text></B>
<xsl:call-template name="insert-anchor"><xsl:with-param name="anchor"
select="someNode"/></xsl:call-template>
</PRE>
and depending on your select="someNode" statements you can use
select="normalize-space(someNode)"
to trim whitespace if need be.
There should be a better way to do this, so hopefully someone on the list will
know another way.
-joe