正在写一些XSLT脚本(1.0版本)句号,VS2010在XSLT如何找到如果文本包含在BizTalk映射到底
现在,在输入XML文件我有以下标签
<STUDENTS>
<STUDENT><DETAILS NAME="Tuna">These are student. details. of Student1.</DETAILS></STUDENT>
<STUDENT></STUDENT>
</STUDENTS>
现在,每一个上面,输出具有如下所示
<INFO NAME="Tuna">These are student. details. of Student1</INFO>
现在用下面的脚本。
<xsl:for-each select="//STUDENTS/STUDENT">
<INFO>
<xsl:attribute name="NAME">
<xsl:value-of select="normalize-space(substring-before(substring-after(.,'NAME="'),'"'))" />
</xsl:attribute>
<xsl:variable name="replace1" select="normalize-space(substring-before(substring-after(.,'>'),'</DETAILS>'))" />
<xsl:value-of select="translate($replace1,'.','')"/>
</INFO>
</xsl:for-each>
我的输出中看起来如下
<INFO NAME="Tuna">These are student details of "Student1" </INFO>
但我只想要删除 “”这在最后出现。我怎么做?任何建议都非常感谢。
在此先感谢。
[在XSLT串卸下的最后一个字符]的可能重复(http://stackoverflow.com/questions/1119449/removing -XSLT字符串中的最后字符) – Tomalak