473,396 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How count in Table cell in XSLT

Dear All,

I have one xml file. I want count cell and divide percentage in between cell (through XSL). Please any one help me.

XML File
-------------

Expand|Select|Wrap|Line Numbers
  1. <table border="0" cellspacing="0" cellpadding="1" width="90%">
  2.  <thead>
  3.  <tr>
  4.  <th valign="top" colspan="3">Table 1.1 802.11b Channels</b></th> 
  5. </tr> 
  6. <tr>
  7.  <th>Channel Number</th>
  8.  <th>Center Frequency (in GHz)</th>
  9.  <th>USA</th> 
  10. </tr> 
  11. </thead> 
  12. <tbody>
  13.  <tr>
  14.  <td>1</td>
  15.  <td>2.412</td>
  16.  <td>&#x2713;</td>
  17.  </tr> 
  18. <!-- more cell here --> 
  19. </tbody> 
  20. </table>
I want OutPut
-----------------

Expand|Select|Wrap|Line Numbers
  1. <table>
  2. <table.html frame="void" width="100%" rules="groups" align="left"> <colgroup>
  3.  <col width="50%"/>
  4.  <col width="30%"/>
  5.  <col width="20%"/> 
  6. </colgroup>
  7. <!-- Rest of the taging as it is -->
  8. <thead>
  9. <tr>
  10. <th valign="top" colspan="3">Table 1.1 802.11b Channels</b></th> 
  11. </tr> 
  12. <tr>
  13.  <th>Channel Number</th>
  14.  <th>Center Frequency (in GHz)</th>
  15.  <th>USA</th> 
  16. </tr> 
  17. </thead> 
  18. <tbody> 
  19. <tr>
  20.  <td>1</td>
  21.  <td>2.412</td>
  22.  <td>&#x2713;</td> 
  23. </tr> 
  24. </tbody> 
  25. </table>
Regards,

Byomkesh
Jul 10 '06 #1
2 1904
Arielle
76
Why is your table your XML file?
Jul 11 '06 #2
Yes. This is XML file and output transforming to another XML file. Please help me. Quick Reply

Thanks

Byomkesh
Jul 13 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ken | last post by:
The fact that you can not reassign a variable in XSL is an endless source of frustration, causing you to jump through all sorts of non-intuitive hoops. In this case, however, the lack of...
8
by: bearclaws | last post by:
I am looping through a list of categories and want to display the list horizontally (instead of vertically). I want to create a single row with 4 list items in each cell of the row. I thought...
7
by: Just Dummy | last post by:
Hi all, I am struggling with a problem for a long time. Problem statement: I have a table and the table can contain n number of rows. i.e., the table rows will be generataed out of a xml...
0
by: suzy | last post by:
hi, i am new to .net. Currently i am writing a page that needs to contain several controls. i am using a place holder to add controls to the page one-by-one. is this the best way? i have a...
7
by: slitvinov | last post by:
I am learning Relax NG. The problem is that I cannot figure out how to make a schema for a table. In my case I would like to make a table with any name of child elements (columns) but columns...
0
by: DAnne | last post by:
I'm trying to do a simple count function in xslt and it's turning out to be extremely painful. I have a report that brings back a set of responses for each question per section in an Audit. I...
1
by: Rahul | last post by:
Hi, I tried many option, but did not found solution. Same Validation Error showing. If I have convert one table, it can easily converted. But If I have paste another table in same file, then...
0
by: news | last post by:
I'm trying to preview some HTML formatted text to show the context that a particular search result was found in. (does that make sense?) The idea is to take that HTML and display it as a stream...
3
by: filippo nanni | last post by:
Hello, I have a series of xml tables that i should convert to html code - Here is an Example: <TABELLA data_mod="2008-10-30 12:20:59" id="2903" locale="it_IT" colonne="1" righe="2" ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.