Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 19th, 2005, 06:53 AM
Authorized User
 
Join Date: Jul 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default constructing a HTML table from xml data using xslt

Hi All,
       I have a xml file like below from that i need to extract values and construct the HTML table like below mentioned.
please help me out its very urgent.

input.xml:
---------

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="table1.xsl" type="text/xsl"?>


<database>
    <entries>
        <table name="alarm_entry1" description="Alarms Table">

         <header>
             <field name="AlarmType1" description="Alarm Type 1" />
             <field name="AlarmType2" description="Alarm Type 2" />
             <field name="AlarmType3" description="Alarm Type 3" />

         </header>
        </table>

        <table name="alarm_entry2" description="Alarms Table" >

         <header>
             <field name="AlarmType1" description="Alarm Type 1" />
             <field name="AlarmType2" description="Alarm Type 2" />
             <field name="AlarmType3" description="Alarm Type 3" />
             <field name="AlarmType4" description="Alarm Type 4" />

         </header>
        </table>

    </entries>
</database>


Output:



table name : alarm_entry1
-------------------------
field name | description
-------------------------
AlarmType1 | Alarm Type 1
AlarmType2 | Alarm Type 2
AlarmType3 | Alarm Type 3
AlarmType4 | Alarm Type 4
--------------------------


table name : alarm_entry2
-------------------------
field name | description
-------------------------
AlarmType1 | Alarm Type 1
AlarmType2 | Alarm Type 2
AlarmType3 | Alarm Type 3
AlarmType4 | Alarm Type 4
--------------------------

similarlly for all the tables and forms .






Similar Threads
Thread Thread Starter Forum Replies Last Post
how to populate a table with xml data in xslt miccipynewbie XSLT 6 May 28th, 2007 07:29 AM
hiding and showing the table in html through xslt nachiketha XSLT 6 March 16th, 2007 01:12 AM
Two HTML Tables and Two XSLT with Two XML? gman44 XSLT 1 March 1st, 2006 04:53 AM
Constructing Create Table Statement method Access VBA 1 April 27th, 2005 02:35 PM
putting xml data in a html <table> rev XSLT 4 September 10th, 2003 08:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.