Am writing some xslt script (version 1.0) in BizTalk mapper, VS2010
Now in input xml file I have the following tags
<STUDENTS>
<STUDENT><DETAILS NAME="Tuna">These are student. details. of Student1.</DETAILS></STUDENT>
<STUDENT></STUDENT>
</STUDENTS>
Now for each above, output has to look as follows
<INFO NAME="Tuna">These are student. details. of Student1</INFO>
Am using the following script.
<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>
My ouput looks like follows
<INFO NAME="Tuna">These are student details of "Student1" </INFO>
But I want remove only "." which appears at end. How do I do that? Any suggestions are really appreciated.
Thanks in advance.