Lucene - Core
  1. Lucene - Core
  2. LUCENE-4302

Javadoc for facet User Guide does not display because of SAXParseException (Eclipse, Maven)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: 4.0, 3.6.2, 6.0
    • Component/s: general/javadocs
    • Labels:
    • Environment:

      Windows 7-64bit/Eclipse Juno (4.2)/Maven m2e plugin/firefox latest

    • Lucene Fields:
      New

      Description

      I have opened javadoc for Facet API while using Eclipse, which downloaded the javadocs using Maven m2e plugin. When I click on facet User Guide on the overview page I get the following exception in FireFox:

      http://127.0.0.1:49231/help/nftopic/jar:file:/C:/Users/karl/.m2/repository/org/apache/lucene/lucene-facet/4.0.0-ALPHA/
      lucene-facet-4.0.0-ALPHA-javadoc.jar!/org/apache/lucene/facet/doc-files/userguide.html

      An error occured while processing the requested document:

      org.xml.sax.SAXParseException; lineNumber: 121; columnNumber: 16; The element type "br" must be terminated by the matching end-tag "</br>".

      at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)

      at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)

      The link, or requested document is:

      http://127.0.0.1:49231/help/nftopic/jar:file:/C:/Users/karl/.m2/repository/org/apache/lucene/lucene-facet/4.0.0-ALPHA/
      lucene-facet-4.0.0-ALPHA-javadoc.jar!/org/apache/lucene/facet/doc-files/userguide.html

      1. LUCENE-4302.patch
        0.7 kB
        Uwe Schindler

        Activity

        Hide
        Uwe Schindler added a comment -

        The facet userguide is HTML and not XML, so a non-closing <br> element is fine. This is a bug in eclipse, it should use a HTML parser like nekohtml.

        Show
        Uwe Schindler added a comment - The facet userguide is HTML and not XML, so a non-closing <br> element is fine. This is a bug in eclipse, it should use a HTML parser like nekohtml.
        Hide
        Shai Erera added a comment -

        I agree. We cannot guarantee that the userguide will be XML compliant.

        Karl, I opened the userguide in Firefox without any problem, not through eclipse though.

        Show
        Shai Erera added a comment - I agree. We cannot guarantee that the userguide will be XML compliant. Karl, I opened the userguide in Firefox without any problem, not through eclipse though.
        Hide
        Karl Nicholas added a comment - - edited

        Well, I was certainly able to get to the userguide one way or another. I'll try posting this bug/comments into eclipse bugzilla, but this is starting to sound like a "not my problem" kind of issue and it seems silly to have the error when a couple of slash's could fix it. I'm happy to update the file, but I'm not sure I know how to go about getting myself setup for that or even if I'm welcome to do so.

        Show
        Karl Nicholas added a comment - - edited Well, I was certainly able to get to the userguide one way or another. I'll try posting this bug/comments into eclipse bugzilla, but this is starting to sound like a "not my problem" kind of issue and it seems silly to have the error when a couple of slash's could fix it. I'm happy to update the file, but I'm not sure I know how to go about getting myself setup for that or even if I'm welcome to do so.
        Hide
        Shai Erera added a comment -

        even if I'm welcome to do so

        People are always welcome to contribute code changes / bug fixes. In fact, if you scan the HTML and make it more XML compliant, I don't mind helping you get it committed.

        this is starting to sound like a "not my problem"

        That's not true (nor a fair statement). This is an HTML document and it needs to be HTML compliant. Web browsers display it properly and therefore we think that this is not a bug in the file.

        Also, even if we fix the current issues (is it just that single <br> tag? I doubt it ...), I'm not sure that future changes to the file will keep it XML-compliant, since I (we) usually 'test' these files by viewing them in a web browser, and not eclipse.

        Show
        Shai Erera added a comment - even if I'm welcome to do so People are always welcome to contribute code changes / bug fixes. In fact, if you scan the HTML and make it more XML compliant, I don't mind helping you get it committed. this is starting to sound like a "not my problem" That's not true (nor a fair statement). This is an HTML document and it needs to be HTML compliant. Web browsers display it properly and therefore we think that this is not a bug in the file. Also, even if we fix the current issues (is it just that single <br> tag? I doubt it ...), I'm not sure that future changes to the file will keep it XML-compliant, since I (we) usually 'test' these files by viewing them in a web browser, and not eclipse.
        Hide
        Gilad Barkai added a comment -

        I'm with Shai on this - According to w3schools this is actually not a problem.
        Please see: http://www.w3schools.com/tags/tag_br.asp

        In HTML <br> has no closing tag.

        Show
        Gilad Barkai added a comment - I'm with Shai on this - According to w3schools this is actually not a problem. Please see: http://www.w3schools.com/tags/tag_br.asp In HTML <br> has no closing tag.
        Hide
        Karl Nicholas added a comment - - edited

        OK, I've fixed it without editing all the HTML. The problem is that the DOCTYPE as specified by the DTD in the file says it is supposed to be xhtml, but all the rest of the javadocs say that they are supposed to be "loose." So, I put changed the dtd at the top of the userguide file and now it works just fine.

        Set the first line of userguide.html to:

        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

        So, I'm happy to try and figure out how to edit the source.

        Show
        Karl Nicholas added a comment - - edited OK, I've fixed it without editing all the HTML. The problem is that the DOCTYPE as specified by the DTD in the file says it is supposed to be xhtml, but all the rest of the javadocs say that they are supposed to be "loose." So, I put changed the dtd at the top of the userguide file and now it works just fine. Set the first line of userguide.html to: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> So, I'm happy to try and figure out how to edit the source.
        Hide
        Uwe Schindler added a comment -

        I have a patch. I checked all doc-files folders in source tree for invalid documents, facet guide is the only one.

        Thanks for reporting!

        Show
        Uwe Schindler added a comment - I have a patch. I checked all doc-files folders in source tree for invalid documents, facet guide is the only one. Thanks for reporting!
        Hide
        Uwe Schindler added a comment -

        Patch for Lucene trunk. I will commit this soon.

        Show
        Uwe Schindler added a comment - Patch for Lucene trunk. I will commit this soon.
        Hide
        Uwe Schindler added a comment -

        Committed trunk rev 1372633, 4.x rev 1372635, 3.6 rev 1372641

        Thanks Karl!

        Show
        Uwe Schindler added a comment - Committed trunk rev 1372633, 4.x rev 1372635, 3.6 rev 1372641 Thanks Karl!
        Hide
        Karl Nicholas added a comment -

        No problem. Happy to help.

        Show
        Karl Nicholas added a comment - No problem. Happy to help.
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Karl Nicholas
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development