View Single Post
  #1 (permalink)  
Old 02-02-2004, 03:21 PM
danielwst danielwst is offline
New kid on the block
 
Join Date: Jan 2004
Location: cyberjaya
Posts: 2
Rep Power: 0
danielwst is on a distinguished road
Send a message via ICQ to danielwst Send a message via Yahoo to danielwst
How to display XML document with several different element in table form by XSLT?

Hello ppl..
i need help from all of u...
if u know , pls help me ok...really need it...

I have a xml document which consist of several different elements.The XML document such as below(attachment):

<?php
echo <<<EOD

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="data1.xsl"?>
<RESTAURANT company ="CITARASA">
<TITLE>RASA ENAK RESTAURANT</TITLE>
<EMPLOYEE>
<EID>E0001</EID>
<ENAME>LIM KAR LENG</ENAME>
<EICNUM>820512085217</EICNUM>
<ESEX>MALE</ESEX>
<EADDRESS>NO5,JALAN BP1,TAMAN BUKIT PUCHONG,471000 PUCHONG</EADDRESS>
<EPHONE>0133532607</EPHONE>
<EPOSITION>WAITER</EPOSITION>
<EPASSWORD>WAI123456789</EPASSWORD>
</EMPLOYEE>
<CUSTOMER>
<CID>C0001</CID>
<CNAME>JEFFREY</CNAME>
<CICNUM>810605145523</CICNUM>
<CSEX>MALE</CSEX>
<CADDRESS>NO 28A,LORONG HAJI, JALAN RAJA LAUT, 50350 KUALA LUMPUR</CADDRESS>
<CPHONE>0163651688</CPHONE>
<CFAX>0356569865</CFAX>
<CEMAIL>ZEALICH@YAHOO.COM</CEMAIL>
<CPASSWORD>AAAAAA</CPASSWORD>
</CUSTOMER>
</RESTAURANT>

EOD;

?>


I want to display all the data in a table form by using XSL transformation.but i failed to do it. i use <xsl:include href ="employee.xsl"/> to do it, it just can display one table (employee table) and if i include the <xsl:include href ="customer.xsl"/> together with the employee.xsl , i will get a table with a mixed up data from employee and customer...

so my question is that how to do a XSL which can transform employee and customer data to 2 different table , one for employee and one for customer .

Hope all of u can help me.Thanks


Regards:
Daniel
Attached Images
To view attachments your post count must be 0 or greater. Your post count is 0 momentarily.

Last edited by danielwst; 02-02-2004 at 04:10 PM.
Reply With Quote