I am working on a XSLT Template Building Blocks in SDL Tridion 2011 SP1 using the XSLT mediator.
I just wanted to know, how to get the Name of component, Version and its TCMID while rendering.
Can any one help how it can be done?
After clearly observing the output in the Template Builder, I got answer as
<xsl:element name="TCMID">
<xsl:value-of select="tcm:Component/@ID"/>
</xsl:element>
<xsl:element name="name">
<xsl:value-of select="tcm:Component/tcm:Data/tcm:Title"/>
</xsl:element>
<xsl:element name="Version">
<xsl:value-of select="tcm:Component/tcm:Info/tcm:VersionInfo/tcm:Version"/>
</xsl:element>