XHTML Strict vs Basic Madness

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Philipp Lenssen

    XHTML Strict vs Basic Madness

    I've tested some of the new Nokia 6600 functionality. It ships with
    WAP2 and XHTML Support (it says). What it does is check the Doctype --
    if it's not the XHTML Mobile Profile Doctype, but a XHTML1.0 Strict
    one, the media-handheld CSS is _ignored_. Only with the Nokia Doctype,
    the CSS is used. I find this really annoying as it goes against the
    whole idea of media-independent XHTML Strict along with stylesheets.

    On the good side, WML seems to be running but only for
    backwards-compatibility, and pretty much any HTML can be rendered --
    and XHTML1 Strict using CSS2 naturally fares much better than most
    pages here.

    Still, if I want to style my already working pages, I need to make a
    redundant copy, or change to XHTML Basic Doctype, which would probably
    confuse half dozen Doctype-sniffers on the desktop-platform. It's the
    Netscape 4 desaster all over again.


    Samples I used:

    Mobile DTD (uses handheld-CSS with Nokia):
    <http://outer-court.com/mobile/index.html>

    1.0 Strict DTD (lacks CSS support with Nokia)
    <http://outer-court.com/mobile/test.html>
  • Anne van Kesteren

    #2
    Re: XHTML Strict vs Basic Madness

    Philipp Lenssen wrote:[color=blue]
    > I've tested some of the new Nokia 6600 functionality. It ships with
    > WAP2 and XHTML Support (it says). What it does is check the Doctype --
    > if it's not the XHTML Mobile Profile Doctype, but a XHTML1.0 Strict
    > one, the media-handheld CSS is _ignored_. Only with the Nokia Doctype,
    > the CSS is used. I find this really annoying as it goes against the
    > whole idea of media-independent XHTML Strict along with stylesheets.[/color]

    Another DOCTYPE, means other elements. There is something to say for
    Nokia's behavior.
    [color=blue]
    > On the good side, WML seems to be running but only for
    > backwards-compatibility, and pretty much any HTML can be rendered --
    > and XHTML1 Strict using CSS2 naturally fares much better than most
    > pages here.
    >
    > Still, if I want to style my already working pages, I need to make a
    > redundant copy, or change to XHTML Basic Doctype, which would probably
    > confuse half dozen Doctype-sniffers on the desktop-platform. It's the
    > Netscape 4 desaster all over again.[/color]

    XHTML Basic doesn't support scripting and derives (sp?) from the XHTML
    modularization which means that it's content-type should be
    application/xhtml+xml, a Internet Explorer disaster as well ;-).
    [color=blue]
    >
    > Samples I used:
    >
    > Mobile DTD (uses handheld-CSS with Nokia):
    > <http://outer-court.com/mobile/index.html>
    >
    > 1.0 Strict DTD (lacks CSS support with Nokia)
    > <http://outer-court.com/mobile/test.html>[/color]


    --
    Anne van Kesteren
    <http://www.annevankest eren.nl/>

    Comment

    • Philipp Lenssen

      #3
      Re: XHTML Strict vs Basic Madness

      Anne van Kesteren wrote:
      [color=blue]
      > Philipp Lenssen wrote:[color=green]
      > > I've tested some of the new Nokia 6600 functionality. It ships with
      > > WAP2 and XHTML Support (it says). What it does is check the Doctype
      > > -- if it's not the XHTML Mobile Profile Doctype, but a XHTML1.0
      > > Strict one, the media-handheld CSS is ignored. Only with the Nokia
      > > Doctype, the CSS is used. I find this really annoying as it goes
      > > against the whole idea of media-independent XHTML Strict along with
      > > stylesheets.[/color]
      >
      > Another DOCTYPE, means other elements. There is something to say for
      > Nokia's behavior.[/color]

      But XHTML Basic is just a Subset of XHTML Strict...
      They should just render Strict and ignore what they want to ignore...
      [color=blue]
      >
      > XHTML Basic doesn't support scripting and derives (sp?) from the
      > XHTML modularization which means that it's content-type should be
      > application/xhtml+xml, a Internet Explorer disaster as well ;-).
      >[/color]

      Theoretically yes, though actually Nokia doesn't seem to care about the
      content-type. I serve HTML. (I wonder how that is connected to the
      situation.)

      Actually, I should check if it works with the Basic Doctype at all --
      what I was serving the first time to test was the Nokia Mobile Profile
      Doctype.

      I wonder does anybody know problems with XHTML Basic Doctype and
      popular doctype-sniffing?

      Comment

      • Anne van Kesteren

        #4
        Re: XHTML Strict vs Basic Madness

        Philipp Lenssen wrote:
        [color=blue]
        > But XHTML Basic is just a Subset of XHTML Strict...
        > They should just render Strict and ignore what they want to ignore...[/color]

        I'm not sure if a browser is supposed to do that. But if you are not
        serving it as XML, the browser probably is.
        [color=blue]
        > Theoretically yes, though actually Nokia doesn't seem to care about the
        > content-type. I serve HTML. (I wonder how that is connected to the
        > situation.)
        >
        > Actually, I should check if it works with the Basic Doctype at all --
        > what I was serving the first time to test was the Nokia Mobile Profile
        > Doctype.[/color]

        That would indeed come in handy.
        [color=blue]
        > I wonder does anybody know problems with XHTML Basic Doctype and
        > popular doctype-sniffing?[/color]

        Mozilla will stay in standard mode and I think Internet Explorer 6 will
        as well (older IE's didn't check the doctype). Not sure about Opera and
        Mac browsers though.


        --
        Anne van Kesteren
        <http://www.annevankest eren.nl/>

        Comment

        • Philipp Lenssen

          #5
          Re: XHTML Strict vs Basic Madness

          Anne van Kesteren wrote:
          [color=blue]
          > Philipp Lenssen wrote:
          >[/color]
          [color=blue][color=green]
          > >
          > > Actually, I should check if it works with the Basic Doctype at all
          > > -- what I was serving the first time to test was the Nokia Mobile
          > > Profile Doctype.[/color]
          >
          > That would indeed come in handy.
          >[/color]

          OK, Nokia 6600 with Symbian OS 7/ WAP2 XHTML1 Support does handle the
          XHTML Basic Doctype good as well (it will load the handheld CSS -- e.g.
          <http://outer-court.com/mobile/basic.html>).
          It doesn't care much about the content-type (it doesn't need the XML
          content-type).

          Comment

          • Henri Sivonen

            #6
            Re: XHTML Strict vs Basic Madness

            In article <btb8hl$582dk$2 @ID-203055.news.uni-berlin.de>,
            "Philipp Lenssen" <info@outer-court.com> wrote:
            [color=blue]
            > I've tested some of the new Nokia 6600 functionality. It ships with
            > WAP2 and XHTML Support (it says). What it does is check the Doctype --
            > if it's not the XHTML Mobile Profile Doctype, but a XHTML1.0 Strict
            > one, the media-handheld CSS is _ignored_. Only with the Nokia Doctype,
            > the CSS is used. I find this really annoying as it goes against the
            > whole idea of media-independent XHTML Strict along with stylesheets.[/color]

            If that's really what happens, it is very, very wrong. :-(

            I don't have a Nokia phone to test with, but feedback about the light
            version of Macsanomat (http://macsanomat.com/lite/) can be summarized as
            follows:
            * T68i works except proper quotes and dashes show up as rectangles
            * P800 (default browser--not Opera) is reported to work
            * 3650 breaks non-ASCII (Why? According to Nokia, UTF-8 is supported.
            And regardless of what Nokia says, every XML processor MUST support
            UTF-8. Some blame the gateways.)
            * Some other Nokia phone doesn't work (details not specified)
            * No feedback about Opera, yet
            [color=blue]
            > Still, if I want to style my already working pages, I need to make a
            > redundant copy, or change to XHTML Basic Doctype, which would probably
            > confuse half dozen Doctype-sniffers on the desktop-platform.[/color]

            You shouldn't be serving XHTML Basic as text/html and doctype sniffing
            is supposed to only apply to text/html in desktop browsers. (Do you have
            proof to the contrary?)
            [color=blue]
            > Mobile DTD (uses handheld-CSS with Nokia):
            > <http://outer-court.com/mobile/index.html>
            >
            > 1.0 Strict DTD (lacks CSS support with Nokia)
            > <http://outer-court.com/mobile/test.html>[/color]

            FWIW, my tests are at http://iki.fi/hsivonen/test/mobile/

            --
            Henri Sivonen
            hsivonen@iki.fi

            Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html

            Comment

            • Henri Sivonen

              #7
              Re: XHTML Strict vs Basic Madness

              In article <btb921$94k$1@r eader11.wxs.nl> ,
              Anne van Kesteren <mail@annevanke steren.nl> wrote:
              [color=blue]
              > Another DOCTYPE, means other elements.[/color]

              No. The identity of the element should be bound to the XHTML namespace.
              Paying attention to the doctype is bogus.

              In practical terms, if an app needs to know something about an XML
              document that isn't exposed via the ContentHandler interface in SAX, the
              app is highly likely broken in some way.

              --
              Henri Sivonen
              hsivonen@iki.fi

              Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html

              Comment

              • Henri Sivonen

                #8
                Re: XHTML Strict vs Basic Madness

                In article <btbee9$5cdjl$1 @ID-203055.news.uni-berlin.de>,
                "Philipp Lenssen" <info@outer-court.com> wrote:
                [color=blue]
                > OK, Nokia 6600 with Symbian OS 7/ WAP2 XHTML1 Support does handle the
                > XHTML Basic Doctype good as well (it will load the handheld CSS -- e.g.
                > <http://outer-court.com/mobile/basic.html>).[/color]

                What about DTDless XHTML?

                --
                Henri Sivonen
                hsivonen@iki.fi

                Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html

                Comment

                • Philipp Lenssen

                  #9
                  Re: XHTML Strict vs Basic Madness

                  Henri Sivonen wrote:
                  [color=blue]
                  >
                  > You shouldn't be serving XHTML Basic as text/html and doctype
                  > sniffing is supposed to only apply to text/html in desktop browsers.
                  > (Do you have proof to the contrary?)
                  >[/color]

                  But I must serve XHTML as text/html for downwards-compatibility, right?!

                  So what to do to serve both my phone (and similar ones) plus common
                  browsers?

                  In any case, the WWW and its HTML at whole is almost unusable on this
                  phone, even though Nokia manages interprets all sorts of HTML (it
                  breaks up tables etc.). But then you'll end up with lots of useless
                  content clutter still. Or servers don't serve at all (tested with
                  German Spiegel Online). So I decided that I'll write a simple RSS to
                  XHTML Basic converter which will also try to convert the follow-up
                  linked pages. I need to program and upload scripts to my server to make
                  this Nokia XHTML really useful, and then only for the world of RSS.
                  That's a bad situation. Same goes for Google content. I posted the
                  summary to my blog:
                  <http://blog.outer-court.com/archive/...#1073293481655
                  73660>

                  Comment

                  • Philipp Lenssen

                    #10
                    Re: XHTML Strict vs Basic Madness

                    Henri Sivonen wrote:
                    [color=blue]
                    > In article <btbee9$5cdjl$1 @ID-203055.news.uni-berlin.de>,
                    > "Philipp Lenssen" <info@outer-court.com> wrote:
                    >[color=green]
                    > > OK, Nokia 6600 with Symbian OS 7/ WAP2 XHTML1 Support does handle
                    > > the XHTML Basic Doctype good as well (it will load the handheld CSS
                    > > -- e.g. <http://outer-court.com/mobile/basic.html>).[/color]
                    >
                    > What about DTDless XHTML?[/color]

                    That didn't work either.

                    However... I just found a workaround...

                    If I include the XHTML Basic DTD within comments inside the
                    body-element of the XHTML-Strict document, Nokia handles it as XHTML
                    Basic! They just check if the Doctype-string occurrs somewhere...

                    XHTML 1.0 Strict, served as text/html:
                    <http://outer-court.com/mobile/comment.html>
                    (The CSS handheld is used on my Nokia!)

                    Comment

                    • Jim Ley

                      #11
                      Re: XHTML Strict vs Basic Madness

                      On 5 Jan 2004 10:31:37 GMT, "Philipp Lenssen" <info@outer-court.com>
                      wrote:
                      [color=blue]
                      >It doesn't care much about the content-type (it doesn't need the XML
                      >content-type).[/color]

                      XHTML basic sent as text/html would be (most likely) invalid tag-soup,
                      any other parsing would be wrong by the parser.

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

                      Comment

                      • Jim Ley

                        #12
                        Re: XHTML Strict vs Basic Madness

                        On 5 Jan 2004 12:23:41 GMT, "Philipp Lenssen" <info@outer-court.com>
                        wrote:
                        [color=blue]
                        >Henri Sivonen wrote:[color=green]
                        >> You shouldn't be serving XHTML Basic as text/html and doctype
                        >> sniffing is supposed to only apply to text/html in desktop browsers.
                        >> (Do you have proof to the contrary?)
                        >>[/color]
                        >
                        >But I must serve XHTML as text/html for downwards-compatibility, right?![/color]

                        You have no authority to serve it as text/html, XHTML 1.0
                        transitional/script/frameset are the only types of XHTML allowed to be
                        served as that (and do that you have to follow condratictory
                        requirements, but we're told they're non-normative so you can ignore
                        them.)

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

                        Comment

                        • Philipp Lenssen

                          #13
                          Re: XHTML Strict vs Basic Madness

                          Jim Ley wrote:
                          [color=blue]
                          > On 5 Jan 2004 12:23:41 GMT, "Philipp Lenssen" <info@outer-court.com>
                          > wrote:
                          >[/color]

                          [color=blue][color=green]
                          > >
                          > > But I must serve XHTML as text/html for downwards-compatibility,
                          > > right?![/color]
                          >
                          > You have no authority to serve it as text/html, XHTML 1.0
                          > transitional/script/frameset are the only types of XHTML allowed to be
                          > served as that (and do that you have to follow condratictory
                          > requirements, but we're told they're non-normative so you can ignore
                          > them.)
                          >[/color]

                          Well, it all works now (valid and all), thanks to the comment-hack: I
                          use XHTML1.0 Strict, serve as text/html, and include a comment with the
                          XHTML1.0 Basic doctype. Enough to please Nokia and doesn't cause
                          troubles in other browsers I suppose.

                          Comment

                          • Henri Sivonen

                            #14
                            Re: XHTML Strict vs Basic Madness

                            In article <btblgj$5dvu5$2 @ID-203055.news.uni-berlin.de>,
                            "Philipp Lenssen" <info@outer-court.com> wrote:
                            [color=blue]
                            > Henri Sivonen wrote:
                            >[color=green]
                            > > In article <btbee9$5cdjl$1 @ID-203055.news.uni-berlin.de>,
                            > > "Philipp Lenssen" <info@outer-court.com> wrote:
                            > >[color=darkred]
                            > > > OK, Nokia 6600 with Symbian OS 7/ WAP2 XHTML1 Support does handle
                            > > > the XHTML Basic Doctype good as well (it will load the handheld CSS
                            > > > -- e.g. <http://outer-court.com/mobile/basic.html>).[/color]
                            > >
                            > > What about DTDless XHTML?[/color]
                            >
                            > That didn't work either.[/color]

                            As application/xhtml+xml or text/html?
                            [color=blue]
                            > However... I just found a workaround...
                            >
                            > If I include the XHTML Basic DTD within comments inside the
                            > body-element of the XHTML-Strict document, Nokia handles it as XHTML
                            > Basic! They just check if the Doctype-string occurrs somewhere...[/color]

                            That's strange. Scanning for particular string before parsing is not
                            something browser implementors want to do. Even when they do it, they
                            tend to limit the scanning to the first n bytes.

                            Are you sure your gateway isn't doing the sniffing?

                            --
                            Henri Sivonen
                            hsivonen@iki.fi

                            Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html

                            Comment

                            • Henri Sivonen

                              #15
                              Re: XHTML Strict vs Basic Madness

                              In article <btbl0d$5dvu5$1 @ID-203055.news.uni-berlin.de>,
                              "Philipp Lenssen" <info@outer-court.com> wrote:
                              [color=blue]
                              > Henri Sivonen wrote:[color=green]
                              > >
                              > > You shouldn't be serving XHTML Basic as text/html and doctype
                              > > sniffing is supposed to only apply to text/html in desktop browsers.
                              > > (Do you have proof to the contrary?)
                              > >[/color]
                              >
                              > But I must serve XHTML as text/html for downwards-compatibility, right?![/color]

                              Assuming you consider IE being downwards compared to phones and you want
                              to be compatible with it, you need to serve text/html (the payload
                              doesn't have to pretend to be XHTML) to IE.

                              In my first post to this thread I was assuming we were discussing real
                              XHTML (served as application/xhtml+xml). I'm interested in how Nokia
                              6600 handles DTDless XHTML (not "strictly conforming") served as
                              application/xhtml+xml.

                              I'm not sympathetic to labeling XML as tag soup and then complaining
                              when weirdness ensues.
                              [color=blue]
                              > So what to do to serve both my phone (and similar ones) plus common
                              > browsers?[/color]

                              1) Serve HTML 4.01 Strict as text/html and require Opera on the phone.
                              2) Serve text/html pages to desktop browsers and separate
                              application/xhtml+xml pages to phones.

                              --
                              Henri Sivonen
                              hsivonen@iki.fi

                              Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html

                              Comment

                              Working...