I want print attribute and put some values to it.
Input :
<figure id="fig_1">
<dis>text</dis>
</figure>
my output:
<image ref="fig_1"
comment="text the
 "/>
Tried code :
<xsl:template match="dis[parent::figure]">
<xsl:variable name="fig_name" select="parent::fig/@id"/>
<image ref="{$fig_name}">
<xsl:attribute name="comment">
<xsl:value-of select="text()"/>
</xsl:attribute>
</tps:image>
</xsl:template>
I want to remove all 

. How can I do it.