[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Table type output in text fromat in a xml file

Subject: Re: Table type output in text fromat in a xml file
From: Alice Wei <ajwei@xxxxxxxxxxx>
Date: Wed, 26 Dec 2007 19:46:23 -0500
Re:  Table type output in text fromat in a  xml file
Hi, Rasha:

If you just want to output it as a HTML table, you can create a table that shapes like what you described.

<table>
 <tr>
   <td>Name</td>
   <td>Result</td>
   <td>Comment</td>
 </tr>
 <xsl:for-each select="test/textcase">
 <tr>
    <td><xsl:value-of select="./@name"/></td>
   <td><xsl:value-of select="./@result"/></td>
   <td><xsl:value-of select="./@comment"/></td>
 </tr>
 </xsl:for-each>
</table>

Give it a shot. Good luck!

Alice Wei
MIS 2008
School of Library and Information Science
Indiana University Bloomington
ajwei@xxxxxxxxxxx
812-856-2659

Quoting rasha dwidar <rasha_dwidar@xxxxxxxxx>:

Hi All,

I have xml file as mentioned below. I want to use xsl to display it
in text format. I want to present xml data in table in text format.
Is that possible?

XML file

<test>
<testcase name=" test001" result="failed"  comment= "test failed"/>
<testcase name= "test001" result="failed" comment= "test failed" />
<testcase name= "test001" result="passed"  comment="test passed"/>
</test>

I want to display it in text format like that.

 Name    Result     Comment
 test001   failed      test failed
 test002   failed      test failed
 test003   passed   test passed


I appreciate your help


Rasha





____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs





Alice Wei MIS 2008 School of Library and Information Science Indiana University Bloomington ajwei@xxxxxxxxxxx 812-856-2659

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.