Making HTML 4.1 Also Comply with XHTML 1.1

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ben Sharvy

    Making HTML 4.1 Also Comply with XHTML 1.1

    Is there a list of the changes you need to make to HTML 4.1 cose to
    make it dual compliant, with XHTML 1.1 also?
  • Headless

    #2
    Re: Making HTML 4.1 Also Comply with XHTML 1.1

    Ben Sharvy wrote:
    [color=blue]
    >Is there a list of the changes you need to make to HTML 4.1 cose to
    >make it dual compliant, with XHTML 1.1 also?[/color]

    Not possible.


    Headless

    --
    Email and usenet filter list: http://www.headless.dna.ie/usenet.htm

    Comment

    • Jukka K. Korpela

      #3
      Re: Making HTML 4.1 Also Comply with XHTML 1.1

      Headless <me@privacy.net > wrote:
      [color=blue][color=green]
      >>Is there a list of the changes you need to make to HTML 4.1 cose to
      >>make it dual compliant, with XHTML 1.1 also?[/color]
      >
      > Not possible.[/color]

      Apparently not, since there is no HTML 4.1. :-)

      Assuming the OP really meant 4.01, despite writing twice 4.1,
      the answer is indeed the same, though for a different reason.

      But is there some _other_ reason than the different requirements on the
      <!DOCTYPE> declaration that prevent "dual compliance" to the two
      specifications? This is of course pretty theoretic, and I wonder why the
      question was asked. (Browsers play by their own rules, and virtually all
      browsers claimed to comply with HTML 4.01 actually fail compliance in
      several ways, and compliance to XHTML 1.1 is hardly even a good joke.)

      --
      Yucca, http://www.cs.tut.fi/~jkorpela/
      Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

      Comment

      • Ben Sharvy

        #4
        Re: Making HTML 4.1 Also Comply with XHTML 1.1

        "Jukka K. Korpela" <jkorpela@cs.tu t.fi> wrote in message news:<Xns93E788 D84AFAjkorpelac stutfi@193.229. 0.31>...
        [color=blue]
        > But is there some _other_ reason than the different requirements on the
        > <!DOCTYPE> declaration that prevent "dual compliance" to the two
        > specifications?[/color]

        The <!DOCTYPE> declaration is neither HTML nor XHTML, so it is
        irrelevant to the question.

        Put another way, is there a markup that allows the *option* of
        (validly) declaring it to be either HTML or XHTML.

        Comment

        • Jukka K. Korpela

          #5
          Re: Making HTML 4.1 Also Comply with XHTML 1.1

          bsharvy@mac.com (Ben Sharvy) wrote:
          [color=blue][color=green]
          >> But is there some _other_ reason than the different requirements on
          >> the <!DOCTYPE> declaration that prevent "dual compliance" to the two
          >> specifications?[/color]
          >
          > The <!DOCTYPE> declaration is neither HTML nor XHTML, so it is
          > irrelevant to the question.[/color]

          Both HTML and XHTML specifications make a <!DOCTYPE> declaration a
          mandatory part of an HTML or XHTML document. In fact this follows from the
          metalanguage (SGML and XML) rules. Ref.:

          "For the sake of brevity, most of the examples in this specification do
          not begin with the document type declaration that is mandatory at the
          beginning of each HTML document."


          "A Strictly Conforming XHTML Document - - must meet all of the following
          criteria: - -
          4. There must be a DOCTYPE declaration in the document prior to the root
          element."

          (And the only conformance it defines is being "Strictly Conforming"!)

          The <!DOCTYPE> declaration is clearly defined as being _part_ of a
          document. Note the wording "at the beginning", not "before" in the first
          quotation, and "in the document" in the latter.

          --
          Yucca, http://www.cs.tut.fi/~jkorpela/
          Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

          Comment

          • Owen Jacobson

            #6
            Re: Making HTML 4.1 Also Comply with XHTML 1.1

            Jukka K. Korpela wrote:
            [color=blue]
            > rather a lot snipped[/color]

            I think he's got the point now. I think what he's asking is whether
            it's possible/convenient to author a document that, with a one-line
            change to the DOCTYPE, can be either XHTML 1.0 or HTML 4.01.

            My own take is fairly simple: yes, it's possible, and it's not even
            that hard as long as you stick to semantic/logical markup rather than
            trying to use TABLE for visual layout.

            Owen

            Comment

            • Darin McGrew

              #7
              Re: Making HTML 4.1 Also Comply with XHTML 1.1

              Owen Jacobson <ojacobson.usen et@mx-deus.net> wrote:[color=blue]
              > I think he's got the point now. I think what he's asking is whether
              > it's possible/convenient to author a document that, with a one-line
              > change to the DOCTYPE, can be either XHTML 1.0 or HTML 4.01.
              >
              > My own take is fairly simple: yes, it's possible, and it's not even
              > that hard as long as you stick to semantic/logical markup rather than
              > trying to use TABLE for visual layout.[/color]

              You must also avoid empty elements (e.g., LINK, IMG) that cannot be
              represented in a way that is valid for both HTML and XHTML.
              --
              Darin McGrew, darin@TheRallye Club.org, http://www.TheRallyeClub.org/
              A gimmick car rallye is not a race, but a fun puzzle testing your
              ability to follow instructions. Upcoming gimmick car rallye in
              Silicon Valley: Harry Potter & the Order of the Precedence (Sat, Sept 6)

              Comment

              • Matthias Gutfeldt

                #8
                Re: Making HTML 4.1 Also Comply with XHTML 1.1

                Owen Jacobson wrote:[color=blue]
                > Jukka K. Korpela wrote:
                >
                >[color=green]
                >>rather a lot snipped[/color]
                >
                >
                > I think he's got the point now. I think what he's asking is whether
                > it's possible/convenient to author a document that, with a one-line
                > change to the DOCTYPE, can be either XHTML 1.0 or HTML 4.01.
                >
                > My own take is fairly simple: yes, it's possible, and it's not even
                > that hard as long as you stick to semantic/logical markup rather than
                > trying to use TABLE for visual layout.[/color]

                No, tables for layout have nothing to do with it.


                Matthias

                Comment

                • Chris Morris

                  #9
                  Re: Making HTML 4.1 Also Comply with XHTML 1.1

                  "Owen Jacobson" <ojacobson.usen et@mx-deus.net> writes:[color=blue]
                  > Jukka K. Korpela wrote:[color=green]
                  > > rather a lot snipped[/color]
                  >
                  > I think he's got the point now. I think what he's asking is whether
                  > it's possible/convenient to author a document that, with a one-line
                  > change to the DOCTYPE, can be either XHTML 1.0 or HTML 4.01.
                  >
                  > My own take is fairly simple: yes, it's possible,[/color]

                  Provided you use _no_ empty elements or are happy to rely on browsers
                  not following the relevant SGML rules on <element />.
                  [color=blue]
                  > and it's not even that hard as long as you stick to semantic/logical
                  > markup rather than trying to use TABLE for visual layout.[/color]

                  That would be a Strict / Transitional issue rather than an XHTML/HTML
                  issue, as far as I know. And yes, if the document is valid Strict it
                  can be served as valid Transitional [1], should you ever want to.

                  [1] With a doctype change, obviously.

                  --
                  Chris

                  Comment

                  • Owen Jacobson

                    #10
                    Re: Making HTML 4.1 Also Comply with XHTML 1.1

                    Darin McGrew wrote:
                    [color=blue]
                    > You must also avoid empty elements (e.g., LINK, IMG) that cannot be
                    > represented in a way that is valid for both HTML and XHTML.[/color]

                    Oof. I missed that completely. Yeah, that's a big issue. For my own
                    information, is the following valid in XHTML 1.0? In HTML 4.01?

                    <link rel="stylesheet " href="pagestyle " type="text/css"></link>

                    The DTDs aren't entirely clear to me on that point.

                    Comment

                    • Darin McGrew

                      #11
                      Re: Making HTML 4.1 Also Comply with XHTML 1.1

                      I wrote:[color=blue][color=green]
                      >> You must also avoid empty elements (e.g., LINK, IMG) that cannot be
                      >> represented in a way that is valid for both HTML and XHTML.[/color][/color]

                      Owen Jacobson <ojacobson.usen et@mx-deus.net> wrote:[color=blue]
                      > Oof. I missed that completely. Yeah, that's a big issue. For my own
                      > information, is the following valid in XHTML 1.0? In HTML 4.01?
                      >
                      > <link rel="stylesheet " href="pagestyle " type="text/css"></link>[/color]

                      In HTML, the closing </link> is invalid. You're trying to close a LINK
                      element that isn't open.

                      In XHTML, your example is valid, and is equivalent to

                      <link rel="stylesheet " href="pagestyle " type="text/css" />

                      (which is what Appendix C recommends).
                      --
                      Darin McGrew, mcgrew@stanford alumni.org, http://www.rahul.net/mcgrew/
                      Web Design Group, darin@htmlhelp. com, http://www.HTMLHelp.com/

                      "I used to do lots of dumb things, but I turned my life around 360 degrees!"

                      Comment

                      • Stan Brown

                        #12
                        Re: Making HTML 4.1 Also Comply with XHTML 1.1

                        In article <bj2r0e$8eb$1@b lue.rahul.net> in
                        comp.infosystem s.www.authoring.html, Darin McGrew
                        <mcgrew@stanfor dalumni.org> wrote:[color=blue]
                        >Owen Jacobson <ojacobson.usen et@mx-deus.net> wrote:[color=green]
                        >> Oof. I missed that completely. Yeah, that's a big issue. For my own
                        >> information, is the following valid in XHTML 1.0? In HTML 4.01?
                        >>
                        >> <link rel="stylesheet " href="pagestyle " type="text/css"></link>[/color]
                        >
                        >In HTML, the closing </link> is invalid. You're trying to close a LINK
                        >element that isn't open.
                        >
                        >In XHTML, your example is valid, and is equivalent to
                        > <link rel="stylesheet " href="pagestyle " type="text/css" />
                        >(which is what Appendix C recommends).[/color]

                        Now I'm confused. (This seems to be happening a lot lately.) I
                        understand that </link> is no valid HTML. But I thought the whole
                        point of Appendix C was to write markup that was valid HTML and
                        valid XHTML. The very first sentence of Appendix C is "This appendix
                        summarizes design guidelines for authors who wish their XHTML
                        documents to render on existing HTML user agents." True, that
                        doesn't say that the XHTML is valid HTML, but I thought that was
                        implied.

                        Are you saying that[color=blue]
                        > <link rel="stylesheet " href="pagestyle " type="text/css" />[/color]
                        is _not_ valid HTML?

                        --
                        Stan Brown, Oak Road Systems, Cortland County, New York, USA

                        HTML 4.01 spec: http://www.w3.org/TR/html401/
                        validator: http://validator.w3.org/
                        CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
                        2.1 changes: http://www.w3.org/TR/CSS21/changes.html
                        validator: http://jigsaw.w3.org/css-validator/

                        Comment

                        • Tina Holmboe

                          #13
                          Re: Making HTML 4.1 Also Comply with XHTML 1.1

                          Stan Brown <the_stan_brown @fastmail.fm> exclaimed in <MPG.19bf10f324 26946698b2cf@ne ws.odyssey.net> :
                          [color=blue]
                          > understand that </link> is no valid HTML. But I thought the whole
                          > point of Appendix C was to write markup that was valid HTML and
                          > valid XHTML. The very first sentence of Appendix C is "This appendix
                          > summarizes design guidelines for authors who wish their XHTML
                          > documents to render on existing HTML user agents." True, that
                          > doesn't say that the XHTML is valid HTML, but I thought that was
                          > implied.[/color]

                          The keyword is "render". The implication is rather "Let's write XHTML
                          in such a way that tag-soup eating browsers will simply view this as
                          another addition to the menu and render away".

                          Usual caveats apply.

                          --
                          - Tina Holmboe Greytower Technologies
                          tina@greytower. net http://www.greytower.net/
                          [+46] 0708 557 905

                          Comment

                          • Jukka K. Korpela

                            #14
                            Re: Making HTML 4.1 Also Comply with XHTML 1.1

                            Stan Brown <the_stan_brown @fastmail.fm> wrote:
                            [color=blue]
                            > But I thought the whole
                            > point of Appendix C was to write markup that was valid HTML and
                            > valid XHTML.[/color]

                            It might give that impression, perhaps intentionally.
                            [color=blue]
                            > The very first sentence of Appendix C is "This appendix
                            > summarizes design guidelines for authors who wish their XHTML
                            > documents to render on existing HTML user agents." True, that
                            > doesn't say that the XHTML is valid HTML, but I thought that was
                            > implied.[/color]

                            And maybe we were supposed to think that way. I know this is somewhat
                            negative thinking. But the XHTML specification really seems to avoid the
                            issue that XHTML and HTML are not compatible _at the level of
                            specifications_ , even if (almost all) browsers can be fooled to eat XHTML
                            when they actually digest HTML.
                            [color=blue]
                            > Are you saying that[color=green]
                            >> <link rel="stylesheet " href="pagestyle " type="text/css" />[/color]
                            > is _not_ valid HTML?[/color]

                            In a document with an HTML doctype, it makes the document invalid
                            except in a special case. The reason is that the construct is, by HTML
                            rules, equivalent to
                            <link rel="stylesheet " href="pagestyle " type="text/css">>
                            and data characters are not allowed inside a <head> element, so the data
                            character ">" would imply </head> and <body>. So if the rest is the
                            document body without a <body> tag, the document is valid (though its
                            content is probably not what the author meant, and this in turn is negated
                            by the fact that browsers don't actually play by HTML rules here).

                            --
                            Yucca, http://www.cs.tut.fi/~jkorpela/
                            Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

                            Comment

                            Working...