xslt - Is there a way to remove spaces after tags -


i've below part of xml.

    <para>there 3 types of investment vehicles available foreign investors, i.e. chinese-foreign equity joint venture, chinese-foreign cooperative joint venture , wholly foreign-owned enterprises.<footnote num="8">                     </footnote> </para> 

here when i'm trying apply template creating blank space , follows.

<xsl:template match="footnote">         <sup><a><xsl:attribute name="name"><xsl:text>f</xsl:text><xsl:value-of select="@num"/></xsl:attribute>                 <xsl:attribute name="href"><xsl:text>#ftn.</xsl:text><xsl:value-of select="@num"/></xsl:attribute>                 <xsl:attribute name="class"><xsl:text>tr_ftn</xsl:text></xsl:attribute>                 <xsl:value-of select="@num"/>             </a>         </sup> <xsl:apply-templates/> 

the output is

<sup> <a name="f8" href="#ftn.8" class="tr_ftn">8</a> </sup> 

but when try below template

    <xsl:template match="footnote">         <sup><xsl:text>hi</xsl:text><a><xsl:attribute name="name"><xsl:text>f</xsl:text><xsl:value-of select="@num"/></xsl:attribute>                 <xsl:attribute name="href"><xsl:text>#ftn.</xsl:text><xsl:value-of select="@num"/></xsl:attribute>                 <xsl:attribute name="class"><xsl:text>tr_ftn</xsl:text></xsl:attribute>                 <xsl:value-of select="@num"/>             </a>         </sup> <xsl:apply-templates/> 

the output is

<sup>hi<a name="f8" href="#ftn.8" class="tr_ftn">8</a> </sup> 

actual expected output is

<sup><a name="f8" href="#ftn.8" class="tr_ftn">8</a>     </sup> 

please let me know if there way 3rd output(i.e. no space , no displaying text) in template.

html output(here 8 superscripted) first case is

wholly foreign-owned enterprises. 8 see,

and second case is

wholly foreign-owned enterprises.hi8 see,

expected

wholly foreign-owned enterprises.8 see,

thanks

my guess have <xsl:output indent="yes"/> , can remove or use <xsl:output indent="no"/>.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -