Table headers are renderized under tbody tag and causes poor integration with Google Docs, XPath and another systems

XMLWordPrintable

      Currently tables are rendered like this:

      
      //Wiki
      || foo || bar ||
      | 1 | a |
      | 2 | b| 
      
      //Rendered HTML (only relevant part)
      <table class='confluenceTable'><tbody> 
      <tr> 
      <th class='confluenceTh'> Foo </th> 
      <th class='confluenceTh'> Bar </th> 
      </tr> 
      <tr> 
      <td class='confluenceTd'> 1 </td> 
      <td class='confluenceTd'> a </td> 
      </tr> 
      <tr> 
      <td class='confluenceTd'> 2 </td> 
      <td class='confluenceTd'> b</td> 
      </tr> 
      </tbody></table> 
      
      

      This is incorrect, because headers are under <tbody> tag.

      The correct html renderization would be:

      
      //A better HTML renderization for tables - Note thead and (optional) tfoot tags
      <table class='confluenceTable'>
      
      <thead>
      <tr> 
      <th class='confluenceTh'> Foo </th> 
      <th class='confluenceTh'> Bar </th> 
      </tr> 
      </thead>
      
      <tfoot>
      </tfoot>
      
      <tbody> 
      <tr> 
      <td class='confluenceTd'> 1 </td> 
      <td class='confluenceTd'> a </td> 
      </tr> 
      <tr> 
      <td class='confluenceTd'> 2 </td> 
      <td class='confluenceTd'> b</td> 
      </tr> 
      </tbody>
      
      </table> 
      
      

      This will be improve anothers systems - like Google Docs (importHtml or importXml functions) or XPath expressions or JSON/JQuery objects - to interact better with Confluence pages.

            Assignee:
            Steve Haffenden (Inactive)
            Reporter:
            Marcelo Mrack
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: