Subject:Apllying a template from within the same template to create a sister node Author:Mahesh Baral Date:21 May 2009 10:28 AM
Hi,
I want to create a separate new template-node, which depends upon one of the values in the input node. For example; Honda has 2 images hence I need a new <car> node in the output for the 2nd Honda image.
My XSL template
<xsl:template match='cars/car'>
<car>
<name><xsl:value-of select='name'/></name>
<link><xsl:value-of select=concat(name,'.jpg')</link>
<car>
</xsl:template>
Inside it I need to check for the 'numberOfImages' and if its more than 1, i need to create a separate <car> node in the output. Is this possible?????