Help on generating HTML table please!!
Hi everyone,
I am a beginner of XSLT and have a project on generating HTML table.Basically, I want to generate the HTML based on the other table specification in XML. The work will be very much akin to dataTable tag in JavaServer Faces.
For example:
I have XML specfication:
<table>
<column>
<text>Username</text>
<text>Password</text>
</column>
<column>
<inputTextField name="userName"/>
<inputPasswordField name="password"/>
</column>
</table>
and I want to generate the table as follow:
Username "<input type="text" name="userName"/>"
Password "<input type="password" name="password"/>"
The input should be rendered as normal text box and password field in browser.
The <text>,<inputTextField> and <inputPasswordField> can be handled by some "template match" in the stylesheet. The trickiest part is how to put the <tr> and <td> in the correct way to get the expected result.
I hope you can help me.
Thank you so much.
|