Help on XSLT template logic!
Prasanna Kumar AG <[email protected]> Thu, 6 Feb 2003 07:52:44 -0500
| Newsgroups | gmane.comp.java.sun.xml.general |
|---|---|
| Message-ID | <CB8215AD270F3F4B82E6B04F567C0AC40653FE@eipmailsvr.erunway.atc.dns> |
Hi All,
I have the Following XML :
<COLUMNHEADER>
<TEXTELEMENT DISPLAYNAME="T1">
<TEXTELEMENT DISPLAYNAME="T11">
<TEXTELEMENT
DISPLAYNAME="T21"/>
<TEXTELEMENT
DISPLAYNAME="T22"/>
</TEXTELEMENT>
<TEXTELEMENT DISPLAYNAME="T12">
<TEXTELEMENT
DISPLAYNAME="T23"/>
</TEXTELEMENT>
</TEXTELEMENT>
<TEXTELEMENT DISPLAYNAME="T2">
<TEXTELEMENT DISPLAYNAME="T13">
<TEXTELEMENT
DISPLAYNAME="T24"/>
<TEXTELEMENT
DISPLAYNAME="T25"/>
</TEXTELEMENT>
<TEXTELEMENT DISPLAYNAME="T14">
<TEXTELEMENT
DISPLAYNAME="T26"/>
</TEXTELEMENT>
</TEXTELEMENT>
</COLUMNHEADER>
And I require the following HTML output:
<table>
<tr>
<td>T1</td>
<td>T2</td>
</tr>
<tr>
<td>T11</td>
<td>T12</td>
<td>T13</td>
<td>T14</td>
</tr>
<tr>
<td>T21</td>
<td>T22</td>
<td>T23</td>
<td>T24</td>
<td>T25</td>
<td>T26</td>
</tr>
My requirement is to loop through the elements recursively, from top level
to the leaf node level and render them,
how can I achieve this using xsl. what should be my template logic?
Thanks in Advance,
Prasanna Kumar
Prasanna Kumar
Virtusa India Pvt. Ltd.,
Phone : (+91)-40-3414200 ext 220
[email protected]
www.virtusa.com
-----------------------------------------------------
xml-interest: A list for discussing XML technologies in the Java Platform.
To post, mailto:[email protected]
Archives at: http://archives.java.sun.com/xml-interest.html
To unsubscribe, mailto:[email protected] the following message;
signoff xml-interest.