Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8528065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:43:10+00:00 2026-06-11T08:43:10+00:00

i wrote a xlst code to transform xml to html which creates lots of

  • 0

i wrote a xlst code to transform xml to html which creates lots of tables in html.

there is a column by name ‘Type’ in the table. which contains words

1) Trace
2) Verification
3) Action

the above 3 word’s will repeat many times in the same column of the table.
my requirement is to display how many times each word appeared in the column

and i should show the count immediately when the html page get loaded


Here goes the general schema of the tables

/*Table Schema*/
<table>
<tr>
 <th>Time</th>
 <th>Position</th>
 <th>Type</th>
 <th>Message</th>
</tr>
<tr>
 <td>....</td>
 <td>....</td>
 <td>Action</td>
 <td>....</td>
</tr>
<tr>
 <td>....</td>
 <td>....</td>
 <td>Verification</td>
 <td>....</td>
</tr>
<tr>
 <td>....</td>
 <td>....</td>
 <td>Trace</td>
 <td>....</td>
</tr>
<tr>
 <td>....</td>
 <td>....</td>
 <td>Error</td>
 <td>....</td>
</tr>

The above is the general schema of the table and the words action, trace, error, verification occurs many times in a single table
There will be arround 5 tables of each type

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:43:11+00:00Added an answer on June 11, 2026 at 8:43 am

    Demo : http://jsfiddle.net/PhB7x/5/ Demo

    You can do this using jquery

    Consider the example html

      <table>
    <tr>
        <th>Trace</th>
        <th>Verification </th>
        <th>Action</th>
    </tr>
    <tr>
        <td>A</td>
        <td>B</td>
        <td>CC</td>
    </tr>
    <tr>
        <td>D</td>
        <td>E</td>
        <td>CC</td>
    </tr>
    </table>
    <table>
    <tr>
        <th>Some</th>
        <th>Thing</th>
        <th>Dont</th>
    </tr>
    <tr>
        <td>A</td>
        <td>B</td>
        <td>CC</td>
    </tr>
    <tr>
        <td>D</td>
        <td>E</td>
        <td>CC</td>
    </tr>
    </table>
    

    The js will be

       $(document).ready(function ()
    {
        getOccurance("CC");
        function getOccurance(word)
        {
            $("table").each(function (tindx, tobj)
            {
                var noOfOccurance = 0;
                $("tr td:gt(1)", $(tobj)).each(function (ind, obj)
                {
                    if (word == $.trim($(obj).text())) noOfOccurance++;
                });
    
                alert("Word " + word + " occurs " + noOfOccurance + " times in table  " + (tindx + 1));
            })
        }
    
    })
    

    ​

    ​
    

    Demo of getting Count in loading itself

    Demo of getting count from every tables

    Demo of getting count from each tables and showing result in html itself

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote little wrapper subroutine to produce HTML-tables with HTML::Table , same time i
I wrote this code which is working but it made me start thinking how
I wrote some code to generate a boost::mpl::vector to use as a lookup table
I wrote a simple XML file and a DTD file including an entity, but
I wrote a makefile which behaves oddly. You can find it here: http://pastebit.com/pastie/8215 Basically
I wrote this code to do the IEEE 754 floating point arithmetic on a
I wrote a simple opengl application in C which plots sin(x). This is my
I wrote code in C# for ASP.Net website , but when i select one
I wrote a small script which copies the billing address to the delivery address
I wrote this code app = Tk() app.title('Myapp') app.geometry('260x100+50+50') labelText =StringVar() labelText.set('Insert the version

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.