我已经在 XML 上创建了 XSLT,它在文本编辑器或浏览器中看起来很漂亮,但是当我将它发送到公司的恐龙点阵打印机时,它会打印成带有重音 a 的大 T,所以像“Ta ”。
我可以简单地在静态部分替换它,但我有几个模板:
<xsl:template name="lpad"><!-- recursive template to right justify and prepend-->
<!-- the value with whatever padChar is passed in -->
<xsl:param name="padChar"> </xsl:param>
<xsl:param name="padVar"/>
<xsl:param name="length"/>
<xsl:choose>
<xsl:when test="string-length($padVar) < $length">
<xsl:call-template name="lpad">
<xsl:with-param name="padChar" select="$padChar"/>
<xsl:with-param name="padVar" select="concat($padChar,$padVar)"/>
<xsl:with-param name="length" select="$length"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring($padVar,string-length($padVar) - $length + 1)"/>
</xsl:otherwise>
</xsl:choose>
因此,当我尝试这样称呼他们时,我遇到了麻烦:
<xsl:call-template name="rpad">
<xsl:with-param name="padChar"> </xsl:with-param>
<xsl:with-param name="padVar" select="SequenceValue"/><!-- <xsl:with-param name="length" select="9"/>
以前 padChar 参数是
 
并且引擎能够处理模板。
任何想法都非常感谢!
干杯!