Dumbing Down UEStudio for HTML 3.2

Dumbing Down UEStudio for HTML 3.2

3
NewbieNewbie
3

    May 18, 2009#1

    I've searched the forum and I cannot find anything related to my concern.

    I have both UEStudio and CSE HTML Validator. Currently, I am working on a project where I have to create html files for an application that uses swing java library code -- javax.swing.JEditorPane in particular. The swing java code is limited to HTML 3.2. I was able to dumb down the CS HTML Validator to 3.2. This works, if I use CSE HTML Validator by itself. The validator limits its validation to HTML 3.2 as I had configured it.

    However, if I invoke the validator from UEStudio, I get output messages that indicate that the validation process is treating my html files as if they contain HTML 4.1 tags.

    Also, is there a way to "dumb-down" HTML tidy to HTML 3.2? Or do I have to use an earlier version of HTML tidy?

    Thanks in advance.

    towers1209

    6,686585
    Grand MasterGrand Master
    6,686585

      May 19, 2009#2

      Do you have specified at top of your HTML file the document type:

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

      However, if you use a tag or attribute available only in HTML 4.01, HtmlTidy automatically changes the doctype to HTML 4.01 - see doctype setting for HtmlTidy.
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        May 19, 2009#3

        Funny you ask...

        I used to use:
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
        as required by HTML 3.2 guide that I am using ("Learing HTML 3.2 by Examples").

        But CSE HTML Validator, suggests the use of:
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
        (After taking a peak at the "official" 3.2 reference, the doctype tag suggestion is the same as above.)

        After having set the proper doctype tag (3.2 Final) on the html file and using only valid 3.2 tags, I edited the file in UES 9.1 and accessed CSE HTML validator from menu option Format|HTML Validator|Run CSE HTML Validator. Yet, UES still returns messages that are related to 4.01 or 4.1>

        Then, if I use:
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
        and ran HTML Tidy, sometimes the html tidy output file's doctype tag is changed to:
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
        (on files that make use of <A NAME=...> and <A HREF="#..."> tags)
        or
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
        (on files that do not contain any <A> tags)

        I find this inconsistency rather interesting.

        6,686585
        Grand MasterGrand Master
        6,686585

          May 21, 2009#4

          Yes, <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> is the correct doctype for HTML 3.2, my mistake. To my apologize I have never read the specification of HTML 3.2 nor have I ever used this doctype. Also I have never used CSE HTML Validator. I use always HTML Tidy.

          For following HTML file

          Code: Select all

          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
          <html>
          <head>
           <title>HTML 3.2 test</title>
          </head>
          <body>
          <h1><a name="top">HTML 3.2 test</a></h1>
          <p><a href="#top">Goto top of page</a></p>
          </body>
          </html>
          HTML Tidy installed with UltraEdit changes the first line in the "tidy" output always to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> although inside tidylib.dll the string -//W3C//DTD HTML 3.2 Final//EN also exists. I think there is no real difference if in the doctype there is the word Final or not. -//W3C//DTD HTML 3.2 Draft//EN is also a valid doctype, but I guess no application makes any difference anymore on interpreting HTML files with any HTML 3.2 doctype. Latest HTML Tidy from Dave Raggett (Htmltidy.dll) keeps <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> in the first line.

          Both versions of HTML Tidy do not report a warning or an error when using an element or attribute not valid for HTML 3.2. HTML Tidy always just changes the doctype in the "tidy" output. For example if I use in my example align="center" on <h1> the doctype in the "tidy" output is still HTML 3.2. But if I use style="text-align:center" both versions of HTML Tidy change the doctype to -//W3C//DTD HTML 4.01//EN. I suppose there is no possibility to force HTML Tidy to print a warning if an element or attribute is used in a HTML file declared as HTML 3.2 instead of automatically changing the doctype to HTML 4.01. All I can get is the message:

          line 1 column 1 - Warning: HTML DOCTYPE doesn't match content

          Interesting is that the online Markup Validation Service reports the style attribute as error in a HTML file with HTML 3.2 doctype.
          Best regards from an UC/UE/UES for Windows user from Austria

          3
          NewbieNewbie
          3

            May 21, 2009#5

            Thanks for the feedback and more information. It is quite helpful. You said:
            Mofi wrote:Latest HTML Tidy from Dave Raggett (Htmltidy.dll) keeps <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> in the first line.
            How can incorporate the latest libtidy.dll into UEStudio? UEStudio has tidylib.dll and I am not sure that they are equivalent files.

            Or will I be 'stuck' with using the latest exe version of htmltidy outside of UEStudio?

            BTW, the latest version that I downloaded is HTML Tidy for Windows (vers 25 mar 2009) by Dirk Paehl.

            I tried Dirk Paehl's version and it still convert <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">.

            You must be referring to version different from what I downloaded. :-(

            Not that it really matter at this point; now that I understand that as long as the html file contains 3.2 tags, it is really immaterial for me whether or not the HTMLTidy changes the doctype tag "...3.2 FINAL//EN" to "...3.2//EN". I think I can live with a slight imperfection. :) I can always re-type FINAL in. :wink:

            I really appreciate your responses.

            1

              May 21, 2009#6

              Hello,

              I would be happy to try to help you with your CSE HTML Validator issue. My current thought is that if you are getting different results in CSE HTML Validator's editor than in UEStudio is that UEStudio may be running CSE HTML Validator using a different account so it will use a different set of configuration parameters. Do you know if the same user account is being used for both?

              Albert Wiersch
              AI Internet Solutions
              http://www.htmlvalidator.com/

              6,686585
              Grand MasterGrand Master
              6,686585

                May 23, 2009#7

                Htmltidy.dll is the old version (Feb. 2004) of HTML Tidy created by original author Dave Raggett. This version was supported first by UltraEdit. Nowadays HTML Tidy is developed by the open source community and UltraEdit as well as UEStudio supports natively now the SourceForge versions of HTML Tidy. For the full story of HTML Tidy support see HTMl Tidy configuration txt file -- what is it for?
                Best regards from an UC/UE/UES for Windows user from Austria