What is Identity template in XSLT ?

I had came across this question quite a lot times , that what is Identity template in xslt.

As the name suggests it is the template which is identical to the original XML .It copies everything from the original template.

 

It is defined as below:

<xsl:template match=@*|node()>

<xsl:copy>

<xsl:apply template select=@*|node()/>

</xsl:copy>

</xsl:template>

 

This is a basic template , you can customise it as and when required , in case you want to copy certain amount of data from a xml .

 

Follow for technical stuff.

Comment below in case of any doubts -:)

Leave a comment