[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Problem with generating references.

Subject: Problem with generating references.
From: "Lakshmi narayana" <lchintala@xxxxxxxxxxxx>
Date: Tue, 5 Jul 2005 17:57:07 +0500
xml references id
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.