I've the below sample xml tree.
Code:
-root
-para
-page
-footnum
-para
-footnum
-para
-footnum
-para
-page
-footnum
I want to apply templates on the first footnum whose preceding is page. From inside the footnum template. here below para there will be even more nodesbut here i want to apply-template only to the first footnum followed by page,, whether it is in same para or different.
The code i tried is as below.
Code:
<xsl:if test="preceding::page[1]">
<xsl:apply-templates select="preceding::page[1]"/>
</xsl:if>
here it is applying templates for all the footnums. please let me know where am i going wrong.
Thanks