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

Transforming Rows to columns

Subject: Transforming Rows to columns
From: bernard eugene <eugene_bernard@xxxxxxxxx>
Date: Tue, 10 Aug 2004 05:23:20 -0700 (PDT)
rows to columns
Hi all 

I having one problem ie to transform the row contents
to columns. any help appreciated.

xml :


<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="asset.xsl"?>
<asset>
<record>
<srn>
SFL                 
</srn>
<type>
Thick     
</type>
<serial>
IN12500360  
</serial>
<make>
HP Brio BA410
</make>
<model>
D4194A
</model>
<vendor>
Megatrends          
</vendor>
<processor>
Intel PIII
</processor>
<speed>
 1000
</speed>
<monsrl>
CN94703448          
</monsrl>
<montr>
D8894A              
</montr>
<monsz>
                    
</monsz>
<monven>
Megatrends
</monven>
<memory>
   128
</memory>
<hd>
20GB   
</hd>
<cd>
Yes
</cd>
<fdd>
Yes
</fdd>
<comp>
ABC Limited
</comp>
<loc>

</loc>
<dept>

</dept>
<fano>

</fano>
</record>


XSL :


  <?xml version="1.0" encoding="ISO-8859-1" ?> 
- <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/REC-html40">
- <xsl:template match="/">
- <html>
- <body>
  <h4>IT Asset Details</h4> 
- <table border="1" cellpadding="4" cellspacing="0">
- <tr bgcolor="#9acd32">
  <th>Systems Reference Number</th> 
  <th>Type</th> 
  <th>Machine Serial No</th> 
  <th>Make</th> 
  <th>Model</th> 
  <th>Processor</th> 
  <th>Speed</th> 
  <th>Monitor Serial Number</th> 
  <th>Make and Model</th> 
  <th>Monitor Size</th> 
  <th>Vendor</th> 
  <th>Memory</th> 
  </tr>
- <xsl:for-each select="asset/record">
- <tr>
- <td>
  <xsl:value-of select="srn" /> 
  </td>
- <td>
  <xsl:value-of select="type" /> 
  </td>
- <td>
  <xsl:value-of select="serial" /> 
  </td>
- <td>
  <xsl:value-of select="make" /> 
  </td>
- <td>
  <xsl:value-of select="model" /> 
  </td>
- <td>
  <xsl:value-of select="processor" /> 
  </td>
- <td align="right">
  <xsl:value-of select="speed" /> 
  </td>
- <td>
  <xsl:value-of select="monsrl" /> 
  </td>
- <td>
  <xsl:value-of select="montr" /> 
  </td>
- <td>
  <xsl:value-of select="monsz" /> 
  </td>
- <td>
  <xsl:value-of select="monven" /> 
  </td>
- <td>
  <xsl:value-of select="memory" /> 
  </td>
  </tr>
  </xsl:for-each>
  </table>
  </body>
  </html>
  </xsl:template>
  </xsl:stylesheet>


OUTPUT I REQUIRE IS IN COLUMNWISE ie Whatever output
comes using this xsl would appear in columns.

Thanks
Eugene




		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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.