XML : XSLT: Get the index of parent

I have an XSLT file

  <xsl: for-each select = "Parent1/Parent2">      <xsl: value-of select = "Child_1">      <xsl: value-of select = "Child_2">  </xsl: for-each>    

Here in this case both the child element Child_1 and Child_2 will be added to final xml file.

I need to print Child_2 only when the index of Parent2 is say,4

How can I achieve that

No comments:

Post a Comment