Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 19th, 2005, 06:53 AM
Authorized User
 
Join Date: Jul 2005
Location: bangalore, karnataka, India.
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 .

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:08 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.