Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1044

When using a doctype, elements are rendered with default attribute values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 5.1.0.5
    • None
    • tapestry-core
    • None

    Description

      It's easiest to see this with an example:
      --------------------
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
      <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
      <body>
      <table>
      <tbody>
      <tr>
      <th>x</th>
      </tr>
      </tbody>
      </table>
      </body>
      </html>
      --------------------

      Will render the table row as:
      <tr><th rowspan="1" colspan="1">x</th></tr>

      Notice the rowspan and colspan attributes have appeared.

      If you remove the <!DOCTYPE> then the <th> renders without the rowspan/colspan.

      I believe these default values are coming from the DTD. It's not a problem for the functionality of the page, but it does add to the size of HTML generated (particularly as this affects table cells, of which there are often many in a page).

      Attachments

        Activity

          People

            Unassigned Unassigned
            paulfield Paul Field
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: