Loading ...
Sorry, an error occurred while loading the content.


Expand Messages
  • loro
    Dec 12, 2004
    • 0 Attachment
      weigheyeman wrote:
      >2. I realise that there are difficulties presenting XHTML to some
      >browsers (IE in particular) and that I will end up with the browser
      >treating my code as HTML in "quirks" mode.

      Not sure if we mean the same thing with "quirks mode"? Browser will treat
      XHTML as HTML, i.e. use their HTML parser, if the document is served as
      text/html. Locally the same thing happens if you use the html extension. An
      .xhtml extension makes them use their XML parser.

      The browser can treat the document as HTML and still use Standards Mode
      (AKA Strict Mode) as the rendering mode. How the doctype is written is used
      as a trigger for Standards or Quirks Mode, but it has nothing to do with
      Strict or Transitional (X)HTML.

      >For that reason I intend
      >to change to HTML 4.01 strict DOCTYPE before going live and carrying
      >out validation and final testing.

      I can understand that approach.

      >That's the background. The question is what is the best way of
      >testing and validating my XHTML code locally?

      Do you mean locally as in not connected to the Internet?
      I know only two options if you don't want to install one of the online
      validators on your own machine (which isn't all that easy, I'm told).

      ARV - the offline version of WDG's excellent validator and well worth its
      modest price.

      Igor Podlubny's cool freeware for Notetab.

      Otherwise, just upload to one of the online validators. The w3c one has
      already been mentioned. WDG's is here:

      >I am not very clear how
      >browsers, validators/linters, Tidy etc manage doctypes when looking
      >at code.

      Browsers don't understand doctypes. They just use them for their "doctype
      switching", as this rendering mode thing is called. Validators understand
      them very well a check a document's syntax against the corresponding
      doctype definition, DTD. Tidy and other lints typically didn't use to care
      about doctypes either, but that can have changed for all I know. Either
      way, they don't validate the document against a DTD.

      >How can I be sure that they are treating the code as XHTML
      >1.0 strict and not HTML?

      To sum up, browsers only care about HTML or XHTML (they don't know Strict
      and Transitional). The trigger is the content-type from a server and the
      extension locally.
      Validators use the DTD you refer to in the doctype.
      Lints do what lints do, whatever that is. ;-)

    • Show all 8 messages in this topic