Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-1649

css_xhtml template produces invalid xhtml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.1
    • 2.0.8
    • Plugin - Tags
    • None

    Description

      XHTML produced using css_xhtml template is not valid XHTML. I have found two basic issues, and one suggested modification:

      1. Form method should be "post" not "POST".
      2. The attribute "name" is deprecated in favor of using "id". This issue seems to be more difficult to deal with given that there seem to be many places depending on name. The following elements should NOT use name attribute: a, applet, form, frame, iframe, img, and map. However, it should also be noted that many Javascripts, including some Ajax toolkits, rely heavily on the DOM method getElementById rather than getting them by name, making it more important to encourage the use of id over name.
      3. This one is more the for the sake of using xml/object binding tools, wsdl generators and such: When creating empty tags, the /> should have a space between it and the content like so:
      Less good <br/>
      More good <br />

      I have not looked much deeper than a simple form with two selects, so I cannot say if I may be missing others. I use the W3C XHTML validator often in testing, which makes it fairly easy to detect problems with xhtml validity.

      thanks

      Attachments

        Activity

          People

            mrdon Donald J. Brown
            gaccawi Gina Accawi
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: