xsl-list
[Top] [All Lists]

[xsl] Parsing nodes with different depths in XML simultaneously

2008-02-13 00:22:15
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.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>