Problem with generating references.
Hi, I am facing the problem to create the references to the elements. See the following example XML file. <A1> <B1/> <B2> <C1></C1> <C2> <D1/> </C2> </B2> </A1> I want to write an XSL file which results in XML file. The transformation should be like this.. Note : For the nodes in the above xml file, no attribute is there to identify uniquely (No ids are there. But in the result tree, I want unique id for each element so that I can identify each element uniquely). 1. Divide the elements into groups. 2. While dividing, create the references to the elements in the current group which are going to be placed in another group. I want the output XML like this... <A-Group> <A1> <reference id="(id of B1)" /> <reference id="(id of B2)" /> </A1> </A-Group> <B-Group> <B1/> <B2> <reference id="(id of C1)" /> <reference id="(id of C2)" /> </B2> </B-Group> <C-Group> <C1/> <C2> <reference id="(id of D1)" /> </C2> </C-Group> <D-Group> <D1/> </D-Group> Can any one give me the XSL code for this.... Thanks Ch. Laxmi Narayana Babu OSI Technologies
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format