XHTML or HTML 4.01?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Bokma

    XHTML or HTML 4.01?

    Hi,

    I converted most (not all) of my pages at http://johnbokma.com/ to
    XHTML. I thought this was just a small change from 4.01.

    However someone stated quite vaguely that my pages are *not* XHTML since
    when a UA requests a page and states that it can handle XML the server
    still responds with a Content-type: text/html

    I see that http://www.w3.org/TR/xhtml1/ does the same (Firebird)

    So is this wrong or not?

    "XHTML Documents which follow the guidelines set forth in Appendix C,
    "HTML Compatibility Guidelines" may be labeled with the Internet Media
    Type "text/html""

    Seems to suggest that nothing *is* wrong...

    Related questions:

    I have read somewhere (lost link) that this is rendered sometimes in
    some UA's:

    <?xml version="1.0" encoding="UTF-8"?>

    Should I configure Apache to do this (if possible) and is this posible
    with virtual hosting?

    What is a recommended encodig for mixed English/Dutch text?


    If I use Dutch on a mainly English page should I use

    <span lang="nl" xml:lang="nl">N ederlands</span> Dutch ?

    (assuming that nl means Dutch) or do I misunderstand the use of lang?

    Many thanks in advance,
    Regards,

    John

    --
    email: mail(at)johnbok ma.com (or reply) home: http://johnbokma.com/
    Web site hints: http://johnbokma.com/websitedesign/ ~ ICQ 218175426

  • Andreas Prilop

    #2
    Re: XHTML or HTML 4.01?

    John Bokma <postmaster@cas tleamber.com> wrote:
    [color=blue]
    > I converted most (not all) of my pages at http://johnbokma.com/ to
    > XHTML.[/color]

    Wieso? Weshalb? Und vor allem: warum? Because "it's cool"?
    [color=blue]
    > I have read somewhere (lost link) that this is rendered sometimes in
    > some UA's:
    > <?xml version="1.0" encoding="UTF-8"?>
    > Should I configure Apache to do this (if possible) and is this posible
    > with virtual hosting?[/color]

    See http://ppewww.ph.gla.ac.uk/~flavell/...ist.html#xhtml
    [color=blue]
    > What is a recommended encodig for mixed English/Dutch text?[/color]

    ISO-8859-1
    [color=blue]
    > If I use Dutch on a mainly English page should I use
    > <span lang="nl" xml:lang="nl">N ederlands</span> Dutch ?
    > (assuming that nl means Dutch)[/color]

    Yes.
    [color=blue]
    > or do I misunderstand the use of lang?[/color]

    No.

    --
    Meanwhile at the Google Ranch ...
    "I can't read this bloody site; it's all Falsh and JavaScrap."
    "Forget it and move on! Still 2 718 281 828 pages to crawl."

    Comment

    • John Bokma

      #3
      Re: XHTML or HTML 4.01?

      Andreas Prilop wrote:
      [color=blue]
      > John Bokma <postmaster@cas tleamber.com> wrote:
      >
      >[color=green]
      >>I converted most (not all) of my pages at http://johnbokma.com/ to
      >>XHTML.[/color]
      >
      >
      > Wieso? Weshalb? Und vor allem: warum? Because "it's cool"?[/color]

      Nope. I rarely do something because "it's cool".

      However, please explain why I should *not* convert to XHTML.
      [color=blue][color=green]
      >>Should I configure Apache to do this (if possible) and is this posible
      >>with virtual hosting?[/color]
      >
      > See http://ppewww.ph.gla.ac.uk/~flavell/...ist.html#xhtml[/color]

      Thanks, will read it.

      [snip other answers]

      Thanks!

      Regards,
      John

      --
      email: mail(at)johnbok ma.com (or reply) home: http://johnbokma.com/
      Web site hints: http://johnbokma.com/websitedesign/ ~ ICQ 218175426

      Comment

      • Andreas Prilop

        #4
        Re: XHTML or HTML 4.01?

        John Bokma <postmaster@cas tleamber.com> wrote:
        [color=blue]
        > However, please explain why I should *not* convert to XHTML.[/color]

        XHTML 1.0 is equivalent to HTML 4.01. You don't gain anything from
        presenting web pages in XHTML 1.0. If you don't have any _real_
        needs to use XHTML, it is pointless to convert _existing_ _valid_
        HTML-4 documents to XHTML 1.0.

        --

        Comment

        • John Bokma

          #5
          Re: XHTML or HTML 4.01?

          Alan J. Flavell wrote:
          [color=blue]
          > On Tue, Jul 29, John Bokma inscribed on the eternal scroll:
          >
          >[color=green]
          >>However someone stated quite vaguely that my pages are *not* XHTML since[/color]
          >
          > They don't conform to XHTML/1.1 recommendations , is probably what the
          > message was trying to tell you.[/color]

          Ah, well I state version="1.0" so that sounds a bit weird..
          [color=blue][color=green]
          >>So is this wrong or not?
          >>
          >>"XHTML Documents which follow the guidelines set forth in Appendix C,
          >>"HTML Compatibility Guidelines" may be labeled with the Internet Media
          >>Type "text/html""[/color]
          >
          > Then they are XHTML/1.0 compatibility mode in that case.[/color]

          <?xml version="1.0" encoding="UTF-8"?>, so yes, I think so.
          [color=blue][color=green]
          >>Seems to suggest that nothing *is* wrong...[/color][/color]
          [color=blue]
          > Depends what DOCTYPE you are claiming.[/color]

          XHTML 1.0 Strict (see http://johnbokma.com/ for full DOCTYPE)
          [color=blue][color=green]
          >>I have read somewhere (lost link) that this is rendered sometimes in
          >>some UA's:
          >>
          >><?xml version="1.0" encoding="UTF-8"?>[/color]
          >
          > True.[/color]

          Anyone has a link with the UA's that do this?
          [color=blue][color=green]
          >>Should I configure Apache to do this (if possible)[/color]
          >
          > Configure Apache to do what, exactly? Do you mean delivering
          > text/html to agents which don't indicate that XHTML is acceptable?
          > Or are you asking about some other feature of HTTP, maybe the
          > "charset" attribute?[/color]

          The latter, sorry of my unclear question.
          [color=blue][color=green]
          >>What is a recommended encodig for mixed English/Dutch text?[/color]
          >
          > Strictly speaking, encoding and language are supposed to be
          > independent of each other in (X)HTML. In practice, different
          > choices may be preferable, depending on various considerations.
          >
          > If you want to go for XHTML, then it might be advisable to leave off
          > the <?xml thingy and allow XML to take its default of utf-8. Then[/color]

          The entire <?xml...> thingy or just the encoding part?
          [color=blue]
          > it can be more compatible with non-XML browsers. But if you want
          > non-XML compatibility _and_ follow W3C recommendations then you can't
          > go past XHTML/1.0, and it's not entirely clear why one would choose
          > XHTML/1.0 in preference to HTML/4.01, since the current crop of
          > browsers can do HTML/4.01 at least as well, if not better, than
          > XHTML/1.0.[/color]

          Ok, I thougt to have some advantages due to the strictness and well
          formedness of XHTML vs HTML/4.01. I will look into the XHTML > 1.0
          documentation for problems I can run into with the current set up.
          [color=blue][color=green]
          >>If I use Dutch on a mainly English page should I use
          >>
          >><span lang="nl" xml:lang="nl">N ederlands</span> Dutch ?[/color]
          >
          > Put the language attribute(s) on whatever element is appropriate to
          > the context. If there is no such element, then indeed the <span...>
          > element can serve your purpose. Is my advice.[/color]

          Ok, than I understand this one correctly. Thanks.

          Regards,
          John


          --
          email: mail(at)johnbok ma.com (or reply) home: http://johnbokma.com/
          Web site hints: http://johnbokma.com/websitedesign/ ~ ICQ 218175426

          Comment

          • Darin McGrew

            #6
            Re: XHTML or HTML 4.01?

            Andreas Prilop wrote:[color=blue][color=green]
            >> XHTML 1.0 is equivalent to HTML 4.01. You don't gain anything from[/color][/color]

            John Bokma <postmaster@cas tleamber.com> wrote:[color=blue]
            > I thought my gain was that there is a much stricter syntax. I consider
            > it as perl with the -w option and use strict; but I might be wrong here.[/color]

            If you start with valid HTML, then it's easy to automate adding the useful
            syntax strictness (closing tags, attribute quotes, etc.) that XHTML is
            supposed to provide.

            But current browsers don't support XHTML unless you pretend that it's
            really HTML (by following Appendix C and sending it as text/html). And even
            then, XHTML only works because browsers don't parse HTML properly. See
            http://hixie.ch/advocacy/xhtml for more info on this.
            --
            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: The Italian Rob (Saturday, August 2)

            Comment

            • John Bokma

              #7
              Re: XHTML or HTML 4.01?

              Darin McGrew wrote:
              [color=blue]
              > Andreas Prilop wrote:
              >[color=green][color=darkred]
              >>>XHTML 1.0 is equivalent to HTML 4.01. You don't gain anything from[/color][/color]
              >
              >
              > John Bokma <postmaster@cas tleamber.com> wrote:
              >[color=green]
              >>I thought my gain was that there is a much stricter syntax. I consider
              >>it as perl with the -w option and use strict; but I might be wrong here.[/color]
              >
              >
              > If you start with valid HTML, then it's easy to automate adding the useful
              > syntax strictness (closing tags, attribute quotes, etc.) that XHTML is
              > supposed to provide.
              >
              > But current browsers don't support XHTML unless you pretend that it's
              > really HTML (by following Appendix C and sending it as text/html). And even
              > then, XHTML only works because browsers don't parse HTML properly. See
              > http://hixie.ch/advocacy/xhtml for more info on this.[/color]

              Thanks Darin, very clear. I consider going back to HTML/4.01. My XHTML
              documents are correct but I don't want to:

              "send back XHTML as application/xhtml+xml to UAs that support it, and as
              text/html to legacy UAs."

              since then I probably have to convince my host admin to change things
              *if* possible with Apache.

              And I don't expect IE to be a proper XML UA in the near (if ever) future...

              Regards,
              John


              --
              email: mail(at)johnbok ma.com (or reply) home: http://johnbokma.com/
              Web site hints: http://johnbokma.com/websitedesign/ ~ ICQ 218175426

              Comment

              • John Bokma

                #8
                Re: XHTML or HTML 4.01?

                Kris wrote:
                [color=blue]
                > In article <1059516430.828 014@halkan.kabe lfoon.nl>,
                > John Bokma <postmaster@cas tleamber.com> wrote:
                >
                >[color=green][color=darkred]
                >>>>I have read somewhere (lost link) that this is rendered sometimes in
                >>>>some UA's:
                >>>>
                >>>><?xml version="1.0" encoding="UTF-8"?>
                >>>
                >>>
                >>>True.[/color]
                >>
                >>Anyone has a link with the UA's that do this?[/color]
                >
                >
                > Worse, IE4.x/Mac shows a blank page when encountering this. A fair
                > reason to leave it out.[/color]

                Thanks Kris, enough reason for me to fall back to HTML/4.01 since I want
                to support 4.x browsers as much as possible, and a blank page is bad.

                John

                --
                email: mail(at)johnbok ma.com (or reply) home: http://johnbokma.com/
                Web site hints: http://johnbokma.com/websitedesign/ ~ ICQ 218175426

                Comment

                • Alan J. Flavell

                  #9
                  Re: XHTML or HTML 4.01?

                  On Wed, Jul 30, John Bokma inscribed on the eternal scroll:
                  [color=blue][color=green]
                  > > Then they are XHTML/1.0 compatibility mode in that case.[/color]
                  >
                  > <?xml version="1.0" encoding="UTF-8"?>, so yes, I think so.[/color]

                  I think at this point you're confusing XML version 1.0 (which is what
                  the above says) and XHTML version 1.0 (which was what we were talking
                  about before).
                  [color=blue]
                  > XHTML 1.0 Strict (see http://johnbokma.com/ for full DOCTYPE)[/color]

                  OK then.
                  [color=blue][color=green][color=darkred]
                  > >>Should I configure Apache to do this (if possible)[/color][/color][/color]
                  ....[color=blue][color=green]
                  > > Or are you asking about some other feature of HTTP, maybe the
                  > > "charset" attribute?[/color]
                  >
                  > The latter, sorry of my unclear question.[/color]

                  My answer would be "yes", you should configure the server to put the
                  appropriate charset attribute onto the real HTTP Content-type header.

                  Note that this satisfies the relevant requirements of the Appendix C
                  compatibility appendix. You don't then have to mess with the <?xml...
                  thingy *and* <meta http=equiv... , as appendix C wants you to do in
                  the absence of an HTTP-protocol 'charset' attribute.
                  [color=blue][color=green]
                  > > If you want to go for XHTML, then it might be advisable to leave off
                  > > the <?xml thingy and allow XML to take its default of utf-8.[/color][/color]

                  I may have been over-cautious there. If you can set the real HTTP
                  header, then you can use the more traditional iso-8859-1 if you wish.
                  But note the other considerations explored in my checklist (Andreas
                  gave the URL already).
                  [color=blue]
                  > The entire <?xml...> thingy or just the encoding part?[/color]

                  The rule is that if the XML version is 1.0 (which it is), and the
                  coding can be determined by certain other rules (which you can check
                  for yourself when you're serious enough) then you may omit the whole
                  thing. The whole point was to avoid certain non-XHTML browsers from
                  displaying it as data, so I was showing how you may omit it entirely.
                  [color=blue][color=green]
                  > > it can be more compatible with non-XML browsers. But if you want
                  > > non-XML compatibility _and_ follow W3C recommendations then you can't
                  > > go past XHTML/1.0, and it's not entirely clear why one would choose
                  > > XHTML/1.0 in preference to HTML/4.01, since the current crop of
                  > > browsers can do HTML/4.01 at least as well, if not better, than
                  > > XHTML/1.0.[/color]
                  >
                  > Ok, I thougt to have some advantages due to the strictness and well
                  > formedness of XHTML vs HTML/4.01.[/color]

                  That might be useful for _you_ in your various publishing processes,
                  but at the present state of play, once you send it out of your server
                  as text/html, it's going to get processed as tag-soup anyway, so I
                  don't see any benefit -in that sense- in sending XHTML out to the web.

                  Btw there's nothing stopping you from writing HTML more rigorously
                  than the rules of HTML actually require, if you wish. There's
                  software that will fill in the "optional" tags if you like (such as
                  HTMLtidy), or that will take XML-based markups and emit disciplined
                  HTML. There's lots of different ways, and without knowing more about
                  your internal process it's hard to say what's best for you internally.
                  All that I was trying to say - on this point - was that it seems a
                  waste of talent and effort to take existing content and re-work it
                  into XHTML - without a very clear motive as to why, because the web
                  out there won't care in the least, in fact the result rates to be
                  somewhat less compatible than what you started with.

                  For new material and XML-based authoring/publishing tools then the
                  balance starts to shift the other way, sure.

                  Comment

                  • Jukka K. Korpela

                    #10
                    Re: XHTML or HTML 4.01?

                    John Bokma <postmaster@cas tleamber.com> wrote:
                    [color=blue][color=green]
                    >> XHTML 1.0 is equivalent to HTML 4.01. You don't gain anything from[/color]
                    >
                    > I thought my gain was that there is a much stricter syntax.[/color]

                    It is stricter only in the sense that XHTML removes some of the
                    variation that is allowed in "classical" HTML (and by actual browsers),
                    such as using upper or lower case in tag names. Naturally you can apply
                    such restrictions even when authoring in HTML 4.01. Maybe you meant
                    that you want a validator to report violations of the restrictions?

                    Contrary to popular belief, XHTML 1.0 has both Strict and Transitional
                    version, just as HTML 4.01 has. So in terms of _logical_ strictness,
                    they're the same.

                    Actually, XHTML is _less_ strict in some respects in its formalized
                    syntax. For example, a validator will not report nested <a> elements as
                    syntax errors, since the formalized syntax does not prevent them, only
                    the prose. "Classical" HTML is in theory SGML based, which means a more
                    expressive metalanguage, which means that a validator will catch errors
                    like nesting <a> elements.

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

                    Comment

                    • Pierre Senellart

                      #11
                      Re: XHTML or HTML 4.01?

                      John Bokma wrote in message <1059518093.837 752@halkan.kabe lfoon.nl>:
                      [color=blue]
                      > Thanks Darin, very clear. I consider going back to HTML/4.01. My XHTML
                      > documents are correct but I don't want to:
                      >
                      > "send back XHTML as application/xhtml+xml to UAs that support it, and as
                      > text/html to legacy UAs."
                      >
                      > since then I probably have to convince my host admin to change things
                      > *if* possible with Apache.[/color]

                      Why not? It can be relatively easy using Apache and content negociation,
                      as simple as activating the MultiViews Option.

                      What I am doing on my (tiny) website is having two copies of each XHTML
                      document (in fact, one of them is a symbolic link to the other one). The
                      first one has a name ending with .xhtml and served as
                      application/xhtml+xml, the other one ending with .html and served as
                      text/html. All links point to the filenames without the extension. If
                      the UA sends an HTTP Accept Field where application/xhtml+xml has a
                      better quality than text/html (which is what Mozilla does and I suppose
                      that XML understanding agents should do this), the application/xhtml+xml
                      version is returned; else the text/html is returned (even if the two
                      quality factors are the same, which is a good thing, since many UA send
                      an Accept field with quality factor 1 for */* :-( ).

                      --
                      Pierre Senellart

                      Comment

                      • Kris

                        #12
                        Re: XHTML or HTML 4.01?

                        In article <1059520488.849 679@halkan.kabe lfoon.nl>,
                        John Bokma <postmaster@cas tleamber.com> wrote:
                        [color=blue][color=green]
                        > > Worse, IE4.x/Mac shows a blank page when encountering this. A fair
                        > > reason to leave it out.[/color]
                        >
                        > Thanks Kris, enough reason for me to fall back to HTML/4.01 since I want
                        > to support 4.x browsers as much as possible, and a blank page is bad.[/color]

                        It is not the XHTML, it is the XML declaration before the DocType that
                        does it. Just to clear that up.

                        --
                        Kris
                        kristiaan@xs4al l.netherlands (nl)

                        Comment

                        • Eric B. Bednarz

                          #13
                          Re: XHTML or HTML 4.01?

                          John Bokma <postmaster@cas tleamber.com> writes:
                          [color=blue]
                          > I converted most (not all) of my pages at http://johnbokma.com/ to
                          > XHTML. I thought this was just a small change from 4.01.
                          >
                          > However someone stated quite vaguely that my pages are *not* XHTML
                          > since when a UA requests a page and states that it can handle XML the
                          > server still responds with a Content-type: text/html[/color]

                          Well, I think the shoe fits. Though i'm not sure about the 'vaguely'
                          part. My UA asks for XHTML and doesn't get it.
                          [color=blue]
                          > I see that http://www.w3.org/TR/xhtml1/ does the same (Firebird)
                          >
                          > So is this wrong or not?[/color]

                          It depends a lot on what 'wrong' means in your book. text/html is tag
                          soup, and there's very little reason to advertise tag soup otherwise.
                          The whole Appendix C business is wrong in itself of course.
                          [color=blue]
                          > "XHTML Documents which follow the guidelines set forth in Appendix C,
                          > "HTML Compatibility Guidelines" may be labeled with the Internet Media
                          > Type "text/html""
                          >
                          > Seems to suggest that nothing *is* wrong...[/color]

                          Nothing *is* wrong as long as HTML hasn't been treated as SGML as
                          a matter of implementation. The explicit message behind this is that
                          only braindead idiots would take w3c recommendations seriously, since
                          'compatibility' appears to be the first child of ignorance.


                          --
                          "America is the only country that went from barbarism to decadence
                          without civilization in between." --Oscar Wilde

                          Comment

                          • Jim Ley

                            #14
                            Re: XHTML or HTML 4.01?

                            On Sun, 03 Aug 2003 10:26:52 +0300, Henri Sivonen <hsivonen@iki.f i>
                            wrote:
                            [color=blue]
                            >In article <bg6rop$gv9$1@b lue.rahul.net>,
                            > Darin McGrew <mcgrew@stanfor dalumni.org> wrote:
                            >[color=green]
                            >> But current browsers don't support XHTML unless you pretend that it's
                            >> really HTML (by following Appendix C and sending it as text/html).[/color]
                            >
                            >ITYM "IE doesn't support..."[/color]

                            No, loads of other browsers don't either, you're being very misleading
                            saying it's only IE.
                            [color=blue]
                            >Mozilla-based browsers support XHTML 1.x delivered as
                            >application/xhtml+xml. However, they don't support incremental rendering
                            >of application/xhtml+xml as the content arrives from the network.[/color]

                            Which is absolutely disastrous, and makes their SVG content impossible
                            to be conformant to the spec, of course they claim they can't render
                            it incrementally to be conformant to the XHTML spec, so that's good,
                            either they can be a conformant SVG UA, or a conformant XHTML one, a
                            shame really.
                            [color=blue]
                            >Safari 1.0 supports some XHTML documents sent as application/xhtml+xml.
                            >However, tbodyless tables (XHTML Basic doesn't allow tbody) make the
                            >layout break. (First cell rendered and the rest of the document not
                            >shown.)[/color]

                            So with Opera and Safari and IE all not really supporting XHTML
                            reliably, aswell as all the other browsers that don't support, it's a
                            pretty fair comment to say that current browsers don't support XHTML.

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

                            Comment

                            • Headless

                              #15
                              Re: XHTML or HTML 4.01?

                              Henri Sivonen <hsivonen@iki.f i> wrote:
                              [color=blue]
                              >Recent versions of Opera supports simple documents sent as
                              >application/xhtml+xml (XHTML Basic is fine). Some large/complex
                              >documents make the document loading stall until the user presses "Stop"
                              >(in Opera 6). (This might be fixed in Opera 7.)[/color]

                              XHTML support in Opera 6 is pretty flaky, Opera 7 is much better, the
                              only thing lacking in the current release version is javascript support,
                              javascript is supported in the current beta.


                              Headless

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

                              Comment

                              Working...