Subject:Looping in XSLT Author:Surekha Palaparthy Date:16 Aug 2005 04:59 AM
I need to transform an XML file into another XML .I have two questions regarding making XSLT file for this.
Q1)There are elements in the XML file which specify the count through which the loop should be processed.I dont know as to how to go ahead with the looping inside an XSLT.Can anyone please help me out in this.The count is equal to the value of "CountVal" element in the sample XML file given.
The loop should be in such a way that i can get the respective XSL(CountVal)Val element's value .Similar is the case with CountRet.Also notice that since i have the count of CountRet as 3,the output XML file has XSLRet val as "-",though there is a XSLT4Val in the original XMl file .
Q2)As you motice ,there are two other elements VALIndex and RETIndex in the original XMl file which hold an array of values.
I find this to be toooo tricky..Not up with a solution....Please help me as early as possible..Waiting for the input from your side.
Subject:Looping in XSLT Author:Surekha Palaparthy Date:17 Aug 2005 09:40 AM
Thanks a lot for your help!!
This is indeed a great help for a beginner .
I started implementing the way as suggested by you.
I am attaching the OriginalXml and xsl files.
As you notice ,the xml output file generated is a bit different from what i expect.I want only the first four tables to be pritned,instead it repeats itself.Can you suggest as to why its happening so
Please Copy paste into a notepad .These are working fine at my side
Original xml file