Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4275630

stddoclet: generated HTML is invalid with frameset DTD and extra <DL>

    Details

    • Subcomponent:
    • Resolved In Build:
      mantis
    • CPU:
      generic
    • OS:
      generic

      Description

      Name: krT82822 Date: 09/26/99

      1- To reproduce, run javadoc and examine the output with
         an HTML validator, such as http://validator.w3.org/

      2- n/a

      3- See above. I looked at the page for java.net.URL, on
         the JDK 1.3 beta distribution, and noticed that

           * [Fixed in 1.4.2]
             Normal class pages use the frameset DTD, not transitional
             (only documents containing frames may use the
             frameset DTD -- only one file from javadoc)

           * [Fixed in 1.4.2]
             On index.html page, you use a Transitional DOCTYPE on framesets
             rather than the appropriate frameset DOCTYPE.

           * [Fixed in 1.4.2]
             Many other invalid elements as shown in "Comments" section,
             such as <SCRIPT> requires "type" argument:
              <SCRIPT type="text/javascript">

             The <SCRIPT> element is currently mistakenly *between*
             the <HEAD> and <BODY> elements. Try moving it to <HEAD> or <BODY>.
             The w3c validator currently creates a parse tree with a second
             <BODY> tag before the <SCRIPT>

             [Cannot reproduce]
           * Method details have an extra <DL>

           * [FIXED IN 1.4.0]
             In at least that particular page, some HTML
             syntax needs to be escaped ("&lt;" not "<")
             when it's used in examples. So that text
             turns into garbage ... see "URL(URL,String)".

      4- n/a
      5- n/a
      6- n/a

      (But I notice the older "ID=..." bugs are gone, good!)
      (Review ID: 95746)
      ======================================================================

      > Based on the 1.4.0 output:
      > http://java.sun.com/j2se/1.4/docs/api/index.html
      >
      > The javadoc tool that comes with J2SDK 1.4.0 produces invalid HTML output. The
      > invalid HTML is generally easy to fix: Use the frameset DTD instead of the
      > transitional DTD on frame documents, put JavaScript code in the head instead
      > of between the head and body, and so on.
      > ###@###.### (which bounces)

      ======================================================================

      MOVED THE FOLLOWING REPORT TO BUG:
      4663254 Generates non-HTML-compliant <A NAME> and <A HREF> anchors
      ###@###.### 2002-04-13

      Name: boT120536 Date: 01/15/2001


      Example from <URL:http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html&gt;:

      <A NAME="wait(long, int)"><!-- --></A><H3>
      wait</H3>

      The name attribute, though declared in the formal part of the DTD as
      CDATA, is described in the prose as having name token syntax. This
      means that the parenthesis, comma, and whitespace characters are not
      permitted where javadoc puts them.

      The two main problems with this stem from the whitespace in
      particular:

      1. It's impossible to write an URL containing such an invalid fragment-
          identifier in a plain-text context such as email. Either it's written
          naked, and is parsed as "...Object.html#wait(long" or it's enclosed
          with "<URL: ... >" brackets and the whitespace is ignored, giving
          "...Object.html#wait(long,int)".

      2. Browsers such as emacs-w3 that do their own whitespace stripping
          on passed URLs cannot follow links from other javadoc HTML, for
          the same reason.

      My reading of the spec doesn't allow the use of "%" URL-escaping in
      fragment identifiers, so perhaps a better scheme would be to use the
      type codes as in the VM - eg "wait.JI" - perhaps using "-" instead of
      ";" to delimit class names.

      Incidentally, the empty A element is probably a bad idea - the above
      would be better written as <H3><A NAME="wait.JI">wait</A></H3>
      (Review ID: 109616)

        Attachments

          Activity

            People

            • Assignee:
              dkramersunw Douglas Kramer (Inactive)
              Reporter:
              kryansunw Kevin Ryan (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: