Validation: XHTML Transitional vs. HTLM 4.01 Strict

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim Ley

    #31
    Re: Validation: XHTML Transitional vs. HTLM 4.01 Strict

    On Sun, 25 Jul 2004 20:52:00 +0100, Spartanicus <me@privacy.net >
    wrote:
    [color=blue]
    >jim@jibbering. com (Jim Ley) wrote:
    >[color=green][color=darkred]
    >>>With an XHTML document the browser
    >>>_could_ warn the user that it is malformed and that it might not exactly
    >>>represent the author's intentions, and then display it anyway.[/color]
    >>
    >>No it couldn't... well by original my interpretation it could, but
    >>others have convinced me this is wrong.[/color]
    >
    >Yes it could, the requirement for a standard compliant XHTML renderer is
    >to throw a parsing error, the spec says nothing about displaying the
    >result or not.[/color]

    Yeah, that was my interpretation, however it also requires that normal
    processing stops, it doesn't just require an error.
    [color=blue]
    >Opera handles this as it should be handled, it (incrementally) displays
    >the code that's rolling in, and displays the parsing error on top when
    >it encounters malformed code.[/color]

    Could you cite the part of spec which says this.
    [color=blue]
    >Mozilla's method has a more important drawback: it's not able to display
    >anything before the html has completed loading.[/color]

    Yep, it's a joke.

    Jim.
    --
    comp.lang.javas cript FAQ - http://jibbering.com/faq/

    Comment

    • Spartanicus

      #32
      Re: Validation: XHTML Transitional vs. HTLM 4.01 Strict

      Michael Rozdoba <mroz@nowhere.i nvalid> wrote:
      [color=blue]
      >One of my reasons for using XHTML was that it allowed me to check I'd
      >done the above via validation. Is there any way I can write HTML 4.01
      >within these constraints & use a validator to tell me I've not made any
      >errors, rather than merely tell me I've complied with the requirements
      >of HTML 4.01?[/color]

      I validate against a custom HTML 4.01 Strict DTD that requires closing
      of non empty elements. I then omit the url from the doctype, this allows
      me to point my local validator (ARV) to the local custom DTD.

      --
      Spartanicus

      Comment

      • Spartanicus

        #33
        Re: Validation: XHTML Transitional vs. HTLM 4.01 Strict

        jim@jibbering.c om (Jim Ley) wrote:
        [color=blue][color=green]
        >>Yes it could, the requirement for a standard compliant XHTML renderer is
        >>to throw a parsing error, the spec says nothing about displaying the
        >>result or not.[/color]
        >
        >Yeah, that was my interpretation, however it also requires that normal
        >processing stops, it doesn't just require an error.[/color]

        Reference?
        [color=blue][color=green]
        >>Opera handles this as it should be handled, it (incrementally) displays
        >>the code that's rolling in, and displays the parsing error on top when
        >>it encounters malformed code.[/color]
        >
        >Could you cite the part of spec which says this.[/color]

        Nothing to do with the spec, I'm simply stating that unlike Mozilla
        Opera has implemented the "must throw a parsing error" requirement in a
        way that doesn't prevent the incremental display of data rolling in.

        --
        Spartanicus

        Comment

        • Jim Ley

          #34
          Re: Validation: XHTML Transitional vs. HTLM 4.01 Strict

          On Sun, 25 Jul 2004 21:18:31 +0100, Spartanicus <me@privacy.net >
          wrote:
          [color=blue]
          >jim@jibbering. com (Jim Ley) wrote:
          >[color=green][color=darkred]
          >>>Yes it could, the requirement for a standard compliant XHTML renderer is
          >>>to throw a parsing error, the spec says nothing about displaying the
          >>>result or not.[/color]
          >>
          >>Yeah, that was my interpretation, however it also requires that normal
          >>processing stops, it doesn't just require an error.[/color]
          >
          >Reference?[/color]


          Once a fatal error is detected, however, the processor MUST NOT
          continue normal processing (i.e., it MUST NOT continue to pass
          character data and information about the document's logical structure
          to the application in the normal way).]

          Jim.
          --
          comp.lang.javas cript FAQ - http://jibbering.com/faq/

          Comment

          • Brian

            #35
            Re: Validation: XHTML Transitional vs. HTLM 4.01 Strict

            Claire Tucker wrote:
            [color=blue]
            > For (albeit a little outdated) example, Netscape 2, 3 and 4 had an
            > issue where if you omitted any of the table closing tags, even on
            > TD which the DTD defines as closing implicitly, the browser
            > wouldn't render the table at all.[/color]

            This is a bug in rendering.
            [color=blue]
            > To a user of, say, Internet Explorer 3, the document would have
            > appeared to work.
            >
            > Buggy browsers always have and always will be a problem. I don't
            > see how a broken XML parser is any different to a broken HTML
            > parser in this respect.[/color]

            A broken XML browser may have the problem of not displaying a
            correctly written element, just like N2-4. It may have the additional
            problem of misinterpreting a WF document as not WF, and refuse to
            display it at all. Even though N2-4 screwed up a table with missing
            </td> tags, it did at least display the rest of the document.

            --
            Brian (remove ".invalid" to email me)

            Comment

            • Michael Rozdoba

              #36
              Re: Validation: XHTML Transitional vs. HTLM 4.01 Strict

              Brian wrote:[color=blue]
              > Michael Rozdoba wrote:
              >[color=green]
              >> Since following several threads here & reading Appendix C, I've
              >> come around to going with HTML 4.01 Strict.
              >>
              >> However I like the idea of imposing upon myself the restrictions
              >> that XHTML defines, which I would be free to do with HTML 4.01,
              >> such as closing all tags & keeping the HTML free of presentational
              >> markup.[/color]
              >
              >
              > This is wrong. You've conflated strict-v.-transitional with
              > HTML-v.-XHTML. HTML strict does not offer any presentational markup
              > that XHTML strict does not.[/color]

              I had thought certain presentational markup was permitted by HTML 4.01
              Strict, but not by XHTML Strict... Looking at
              http://www.w3.org/TR/html4/sgml/dtd.html suggests I've got that totally
              wrong. Thanks for pointing this out :)

              Good - that was one of the reasons I wasn't happy about validating
              against it.
              [color=blue]
              > The only difference is closing tags that are optional in HTML but
              > required in XHTML. (There are other differences that are not relevant
              > to your query.)
              >[color=green]
              >> One of my reasons for using XHTML was that it allowed me to check
              >> I'd done the above via validation. Is there any way I can write
              >> HTML 4.01 within these constraints & use a validator to tell me
              >> I've not made any errors, rather than merely tell me I've complied
              >> with the requirements of HTML 4.01?[/color]
              >
              >
              > You could write your own dtd, referencing the w3c's strict dtd but
              > adding additional requirements e.g. for closing </p> and </li> tags.[/color]

              That did occur to me, but atm I'd have trouble reading a DTD, let alone
              writing one.
              [color=blue]
              > [This thread has nothing to do with css, so I've set followups to
              > ciwah.][/color]

              Cheers :)

              --
              Michael
              m r o z a t u k g a t e w a y d o t n e t

              Comment

              • Claire Tucker

                #37
                Re: Validation: XHTML Transitional vs. HTLM 4.01 Strict

                On Sun, 25 Jul 2004 19:41:08 GMT, jim@jibbering.c om (Jim Ley) wrote:[color=blue]
                >[color=green]
                >> In addition, XML is deliberately a lot easier than HTML
                >>to parse, so the likelyhood of obscure XML parser bugs is slim at
                >>best, especially given the wide variety of generic XML parsers already
                >>"out there" that have been in use for several years.[/color]
                >
                >There were lots of good SGML ones about when Netscape 3 was being
                >written, didn't stop them screwing it up.
                >[/color]

                Netscape didn't treat HTML as an SGML application. They deliberately
                wrote their own, really sloppy parser which just about worked by luck
                as long as the moon was in the right phase.

                If they'd used a real SGML parser they'd probably have done a lot
                better, but SGML wasn't designed to be parsed without a DTD, so it
                would have been a lot harder to make it happen. This is, of course,
                the main reason why well-formed but non-validated XML documents are
                allowed. One of the many reasons why it's easier to write an XML
                parser which is applicable to any task rather than a specific task.

                Anyone writing an XHTML browser without using a proper XML parser is
                going to just get laughed at. People in general are a lot more
                familiar with these things than they were back when Netscape were
                churning out their rubbish; observe how many people are yelling at
                Microsoft to support standards compared to how many people complained
                that IMG was badly designed in Mosaic, or that Netscape's table parser
                didn't allow unclosed table cells. (and I'm not just talking about
                technical newsgroups such as this: people are ranting about standards
                all over the place.)

                Comment

                • Claire Tucker

                  #38
                  Re: Validation: XHTML Transitional vs. HTLM 4.01 Strict

                  On Sun, 25 Jul 2004 20:57:40 GMT, jim@jibbering.c om (Jim Ley) wrote:[color=blue]
                  >
                  >Once a fatal error is detected, however, the processor MUST NOT
                  >continue normal processing (i.e., it MUST NOT continue to pass
                  >character data and information about the document's logical structure
                  >to the application in the normal way).]
                  >[/color]

                  That is indeed how Opera operates. The difference here is that while
                  Mozilla builds the complete data structure in memory before rendering,
                  Opera's parser sucks tokens directly from the incoming data and makes
                  renders the result as it goes along. When its XML parser encounters
                  something wrong, it adds an error message to the end of the rendered
                  document and stops. In older versions of Opera this was the rather
                  unhelpful "XML Parsing Failed!", but I understand newer versions at
                  least give a line and column reference and perhaps even some idea of
                  what the error was.

                  Opera's behavior is better in that it progressively renders and thus
                  gives the illusion of being faster. I'm not so sure that rendering
                  half a document and an error message has any real benefit over
                  rendering just an error message, though.

                  Best regards,
                  -Claire

                  Comment

                  • Michael Rozdoba

                    #39
                    Re: Validation: XHTML Transitional vs. HTLM 4.01 Strict

                    Nick Kew wrote:

                    [snip]
                    [color=blue]
                    > http://valet.webthing.com/page/parsemode.html[/color]

                    Ah, so 'fussy' will do what I'm after, it seems. Thanks :)

                    --
                    Michael
                    m r o z a t u k g a t e w a y d o t n e t

                    Comment

                    • Michael Rozdoba

                      #40
                      Re: Validation: XHTML Transitional vs. HTLM 4.01 Strict

                      Spartanicus wrote:

                      [snip]
                      [color=blue]
                      > I validate against a custom HTML 4.01 Strict DTD that requires closing
                      > of non empty elements.[/color]

                      That sounds ideal, as Brian suggested; however I'm more likely to make a
                      greater mess if I start editing DTDs myself atm.
                      [color=blue]
                      > I then omit the url from the doctype, this allows
                      > me to point my local validator (ARV) to the local custom DTD.[/color]

                      <Googles ARV>

                      Sounds promising. Shame it's not cross platform.

                      Thanks to everyone who replied. I feel much happier keeping with HTML
                      4.01 Strict now.

                      --
                      Michael
                      m r o z a t u k g a t e w a y d o t n e t

                      Comment

                      • Pierre Goiffon

                        #41
                        Re: Validation: XHTML Transitional vs. HTLM 4.01 Strict

                        "Claire Tucker" <fake@invalid.i nvalid> a écrit dans le message de
                        news:3n18g0dm8h j9vj70h2d3ilvts li77kqq9h@4ax.c om[color=blue]
                        > (XHTML documents generated by automated systems are a bit more
                        > troublesome[/color]

                        That was just what I was going to answer. When you've got a lot of modules
                        working together to generate a web page, the probability to generate invalid
                        code is just far more important than with a static page. If your error
                        trapping isn't absolutly perfect, one module problem could lead to an
                        unusable web page.

                        Comment

                        • Shmuel (Seymour J.) Metz

                          #42
                          Re: Validation: XHTML Transitional vs. HTLM 4.01 Strict

                          In <4103edad.17068 8757@news.indiv idual.net>, on 07/25/2004
                          at 06:17 PM, jim@jibbering.c om (Jim Ley) said:
                          [color=blue]
                          >It would indeed be unwise to rely on it, which is why authors should
                          >ensure their mark-up is invalid.[/color]

                          ITYM why authors should ensure their mark-up is *VALID*.

                          --
                          Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

                          Unsolicited bulk E-mail subject to legal action. I reserve the
                          right to publicly post or ridicule any abusive E-mail. Reply to
                          domain Patriot dot net user shmuel+news to contact me. Do not
                          reply to spamtrap@librar y.lspace.org

                          Comment

                          Working...