I've an issue in apply templates , consider my xml will be like this , enter code here
<card>
<pre/>
<main>
<step1/>
<step1/>
<panels>
<panel/>
<panel/>
</panels>
<step1/>
<main>
</card>
Inside main all the step1 will be started with 1. and increment in further step.Now when the panel comes , it should take each panel as a step and it'll start as 3. , 4. next step1 will be 5.
problem is when if i apply templates for step1 in the mainfunc , it's applying for all the step1. so the step1 after the panel also will come in the first place . I want to apply temaplates for the step1 to 3rd step1. then apply panel and then apply the last step1.step1 counts are not always same , they differ.
currently ive something like this ,
<xsl:template match="mainfunc">
<xsl:apply-templates select="step1"/>
<xsl:if test="contains($wcType,'P')">
<xsl:apply-templates select="panels"/>
</xsl:if>
.....
how to modify to apply the templates in sequence order , also numbering the panel as 3.