input is
Jithendarl
1234
jithendrl@gmail.com
can I get the output as below as below in xslt
Hi
you’ll find one possible solution, which may deserve some improvement
with respect to detaileds (e.g. handling of whitespace => omit some newlines).
Best regards
Uli
<xsl:stylesheet version=“1.0”
xmlns:xsl=“XSLT Namespace”
>
<xsl:template match=“/“>
<xsl:element name=”{name()}“>
xsl:comment
abc
<xsl:apply-templates select=”|text()” mode=“comment”/>
</xsl:comment>
</xsl:element>
</xsl:template>
<xsl:template match=“" mode=“comment”>
<<xsl:value-of select=“name()”/><xsl:apply-templates select="@” mode=“comment”/>><xsl:apply-templates select=“|text()" mode=“comment”/></<xsl:value-of select=“name()”/>>
</xsl:template>
<xsl:template match=“text()” mode=“comment”>
<xsl:value-of select=“.”/>
</xsl:template>
<xsl:template match="@” mode=“comment”>xsl:text </xsl:text><xsl:value-of select=“name()”/>=“<xsl:value-of select=”.“/>”</xsl:template>
</xsl:stylesheet>
can you please find the solution where I can restore the original original element in the xml file.
your code converts the above code into following.
Now can I get the original form of the element as below.
Jithendarl
1234
jithendrl@gmail.com