[xsl] Parsing nodes with different depths in XML simultaneously

Subject: [xsl] Parsing nodes with different depths in XML simultaneously
From: "Ravi Roy" <ravi.aroy@xxxxxxxxx>
Date: Wed, 13 Feb 2008 12:51:39 +0530
Hi,

I want parse nodes with different depths in XML, but I am not sure how
to achieve this, for example I have following test.xml :

<?xml version="1.0" encoding="UTF-8"?>
<root>
   <sub1>
       <sub2>
         <sub3>
               <sub4 name="xyz" />
               <sub5 name="abc" />
               <sub6 name="jkl" />
               <sub7 name="stu" />
          </sub3>
      </sub2>
     </sub1>
   <suite name="xyz.123" value="20" />
   <suite name="567.abc" value="10" />
   <suite name="345.jkl" value="50" />
   <suite name="stu.578" value="40" />
</root>

I am able to make the table like the following, but value in the table
would be based on the match in suite name, like if string sub4 name
matches the string in suite name then in the following table I want to
make the entry of 20 against sub4 :

  -------------------------------------
  | sub4 | sub5 |sub6 |sub7|
  |---------|---------|--------|-------|
  |         |         |        |       |
  |         |         |        |       |


Does someone know how to achieve this in XSL ?

Thanks.
Ravi.

Current Thread