0
我有工作正常,并没有缩进一个纯文本XSL模板时。XSL纯文本缩进包括另一个XSL文件
我又添加了XSL模板,该模板使用以下行:
<xsl:copy-of select="document('AboutThisMessagePlainText.xsl')"></xsl:copy-of>
当XSL呈现,在AboutThisMessagePlainText.xsl文件中的文本缩进。
我该如何预防?
我的全XSL是:
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="no" />
<xsl:template match="/Email">
<xsl:text>To Our Valued Customer:</xsl:text>
<xsl:text> </xsl:text>
<xsl:text> </xsl:text>
<xsl:text>Welcome, and thank you .....blah blah blah</xsl:text>
<xsl:text>Sincerely,</xsl:text>
<xsl:text> </xsl:text>
<xsl:text> </xsl:text>
<xsl:text>My Company</xsl:text>
<xsl:copy-of select="document('AboutThisMessagePlainText.xsl')"></xsl:copy-of>
</xsl:template>
</xsl:transform>
AboutThisMessagePlainText.xsl是:
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="no" />
<xsl:template match="/">
<xsl:text>About This Message</xsl:text>
<xsl:text>You received this email because you subscribed to our electronic notification service. If you no longer wish to receive electronic notifications, etc...</xsl:text>
</xsl:template>
</xsl:transform>
预期的输出结果是:
为我们尊贵的客户:
欢迎,并感谢你.....等等等等等等
真诚,
我公司有关此消息的,因为你 订阅我们的电子通知服务您收到这封电子邮件。如果你不再 希望收到电子通知,等...
然而,关于这个消息,您收到......缩进。
谢谢!
请告诉我们AboutThisMessagePlainText.xsl的样本,然后解释说,文件的输出应该如何看你的纯文本的结果。 – 2012-01-04 15:15:44
更新,谢谢! – ExceptionEx 2012-01-04 15:20:23