Hi,
I have a xml with para and superscript. i need to parse it with XSL and add formatting with RTF tag and display it in rich text box (
VB.net, Winform).
When I do it I am not getting superscrip correctly processed. I need to remove unwanted space also from text. Am I doing some thing wrong? Can any one please help?
<xsl:stylesheet xmlns:..Transform" version="2.0">
<xsl:output media-type="text" indent="no" method="text" />
<xsl:template match="/">
<xsl:text>{\rtf1\... </xsl:text>
<xsl:text>\viewkind4\uc1\pard\qc\b\f0\fs28 </xsl:text>
<xsl:apply-templates select="sample/HeaderBox/subsection/para" />
<xsl:text> \par</xsl:text>
<xsl:for-each select="sample/subsection">
<xsl:apply-templates select="para" /><xsl:text> \par </xsl:text>
</xsl:for-each>
</xsl:template>
<xsl:template match="para">
<xsl:value-of select="normalize-space(.)"/>
<xsl:apply-templates select="Superscript" />
</xsl:template>
<xsl:template match="Superscript">
<xsl:text> \super\noextrasprl </xsl:text><xsl:value-of select="."/><xsl:text> \nosupersub </xsl:text>
</xsl:template>
</xsl:stylesheet>
XMl:
<sample>
<HeaderBox> <subsection> <para>Sample title</para> </subsection>
</HeaderBox>
<subsection>
<para> Sample Para <Superscript>10</Superscript> ended here. </para>
</subsection>
<subsection>
<para> second Sample Para ended here. <Superscript>1-2</Superscript> </para>
</subsection>
</sample>
But when I convert, instead of expected output " Sample \super 10 \nosuper ended here"
Output is coming like :" Sample 10 ended here \super 10 \nosuper ".
The superscript should parse along with that position. But its getting arsed seperately. Any friends, please help on this?