XHTML 1.0 Validator: No attributes, elements not defined...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Colin Cogle

    XHTML 1.0 Validator: No attributes, elements not defined...

    -------
    Line 47, column 8: there is no attribute "id"
    <DIV id="LeftNavigat ion" style="position :absolute; left:8px; top:6px;
    width:200p
    -------
    Line 47, column 31: there is no attribute "style"
    <DIV id="LeftNavigat ion" style="position :absolute; left:8px; top:6px;
    width:200p
    -------
    Line 47, column 127: element "DIV" undefined
    ....1250px; z-index:1; overflow:visibl e;">
    -------

    These are just three of 272 errors that I got when I validated my
    site, http://www.zeonline.net/. I'm using a valid XHTML 1.0
    Transistional DOCTYPE statement. You can check the beginning of the
    source code if you want:

    -------Source Code: http://www.zeonline.net/-------
    <?xml version="1.0" encoding="utf-8"?>
    <?xml-stylesheet href="http://www.zeonline.ne t/zeonline.css"
    type="text/css"?>
    <?xml-stylesheet href="#newsForm atting" type="text/css"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us"
    lang="en-us" dir="ltr">
    -------(more...)-------

    Something tells me that the validator is messed up. All of my tags
    are lowercase, but the validator shows them as uppercase. I use
    Dreamweaver MX 2002 to create my sites. Program bug? Validator
    problem? Or did I just miss something?
    --
    Colin

  • Philip Ronan

    #2
    Re: XHTML 1.0 Validator: No attributes, elements not defined...

    On 11/8/04 10:21 am, Colin Cogle wrote:
    [color=blue]
    > Something tells me that the validator is messed up. All of my tags
    > are lowercase, but the validator shows them as uppercase. I use
    > Dreamweaver MX 2002 to create my sites. Program bug? Validator
    > problem? Or did I just miss something?[/color]

    Your tags are *not* all lowercase.

    And you appear to be missing *lots* of other things besides. The validator
    seems to have generated a pretty comprehensive list of your problems, so I
    won't bother listing them here.

    I suggest you read up on how to include Javascript in XHTML documents for a
    start. And then perhaps you could correct the errors in your href attributes
    (hint: "..showflat.php ?Cat=mber=6248 16&page=1.." should be
    "..showflat.php ?Cat=mber=6248 16&amp;page=1.. ", etc.)

    Have fun!

    Phil

    --
    Philip Ronan
    phil.ronanzzz@v irgin.net
    (Please remove the "z"s if replying by email)


    Comment

    • Steve Pugh

      #3
      Re: XHTML 1.0 Validator: No attributes, elements not defined...

      MasterColinX@ea rthlink.net (Colin Cogle) wrote:
      [color=blue]
      >-------
      >Line 47, column 8: there is no attribute "id"
      ><DIV id="LeftNavigat ion" style="position :absolute; left:8px; top:6px;
      >width:200p
      >-------
      >Line 47, column 31: there is no attribute "style"
      ><DIV id="LeftNavigat ion" style="position :absolute; left:8px; top:6px;
      >width:200p[/color]

      These two are due to the next one:
      [color=blue]
      >-------
      >Line 47, column 127: element "DIV" undefined
      >...1250px; z-index:1; overflow:visibl e;">
      >-------[/color]

      There is no element DIV in XHTML, thus it can't have any attributes
      and hence the earlier two errors. There is an element div though.
      Remember that XHTML, unlike HTML, requires lowercase element and
      attribute names.
      [color=blue]
      >These are just three of 272 errors that I got when I validated my
      >site, http://www.zeonline.net/.[/color]
      [color=blue]
      >Something tells me that the validator is messed up. All of my tags
      >are lowercase, but the validator shows them as uppercase.[/color]

      A view source shows them as uppercase, so the problem seems to be with
      your code not the validator.

      Most of the upprcase tags are between the comments
      <!-- Begin LeftNavigation SSI --> and <!-- End SSI -->
      so it looks like your forgot to make the contents of your include
      XHTML compatible. (There's also one uppercase <SCRIPT></SCRIPT> after
      the latter comment.)

      Steve

      --
      "My theories appal you, my heresies outrage you,
      I never answer letters and you don't like my tie." - The Doctor

      Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

      Comment

      • Paul

        #4
        Re: XHTML 1.0 Validator: No attributes, elements not defined...

        Colin Cogle wrote:

        <snip>[color=blue]
        >
        > Something tells me that the validator is messed up. All of my tags
        > are lowercase, but the validator shows them as uppercase.[/color]

        No they're not. Just scroll down past the <body> statement.

        I use[color=blue]
        > Dreamweaver MX 2002 to create my sites. Program bug? Validator
        > problem? Or did I just miss something?[/color]

        Probably missed a load of things. That's what the validator is telling you!

        Comment

        • Philip Ronan

          #5
          Re: XHTML 1.0 Validator: No attributes, elements not defined...

          On 11/8/04 10:37 am, Philip Ronan wrote:[color=blue]
          > (hint: "..showflat.php ?Cat=mber=6248 16&page=1.." should be
          > "..showflat.php ?Cat=mber=6248 16&amp;page=1.. ", etc.)[/color]

          Hmm, I seem to have copied another bug from your source code -- what on
          earth is that control character (??) doing between "Cat=" and "mber="

          Perhaps you should try using a different editor.

          --
          Philip Ronan
          phil.ronanzzz@v irgin.net
          (Please remove the "z"s if replying by email)


          Comment

          • Lachlan Hunt

            #6
            Re: XHTML 1.0 Validator: No attributes, elements not defined...

            Colin Cogle wrote:[color=blue]
            > Something tells me that the validator is messed up. All of my tags
            > are lowercase, but the validator shows them as uppercase. I use
            > Dreamweaver MX 2002 to create my sites. Program bug? Validator
            > problem? Or did I just miss something?[/color]

            Validator doesn't have many bugs. There are some, but none, AFAICT,
            are causing your problems. The editor is good, I use Dreamweaver and
            only have problems when I attempt to do something in the GUI editor.
            For hand coding, it's great! The problem is most definately with your
            html, and javascript (though, the script isn't causing your validation
            errors)

            The easiest way to fix problems in validator is one at a time. It
            helps if you use verbose mode, with the show source option. In the
            future, I recommend validating more often, as you author it, and write
            new documents with a stict doctype. That way, you can fix them as you
            go (2 or 3 each time, instead of 272 all at once!), and you'll quickly
            learn to spot and fix the common problems without needing to validate so
            often

            Regarding your use of JavaScript, document.write( ) does not work for
            XHTML documents. Hixie explains why [1]. If you're only going to serve
            your document as text/html, and continue to use document.write( ) then
            it's better to use HTML 4 Strict [2].

            You should learn to write script that uses the DOM instead.
            W3Schools has some reasonable tutorials on scripting, and the DOM [3].
            Or, you can just dive straight into the specifications and other W3C
            information about it [4]. The DevEdge sidebar [5] for Netscape, Mozilla
            and Firefox has a very good quick reference for all the DOM methods and
            attributes, as well as CSS, JavaScript and HTML.

            [1] http://ln.hixie.ch/?start=1091626816&count=1
            [2] http://www.hixie.ch/advocacy/xhtml
            [3] http://www.w3schools.com/
            [4] http://www.w3.org/DOM/
            [5] http://devedge.netscape.com/toolbox/sidebars/

            --
            Lachlan Hunt


            Please direct all spam to abuse@127.0.0.1
            Thank you.

            Comment

            • Colin Cogle

              #7
              Re: XHTML 1.0 Validator: No attributes, elements not defined...

              Well, I converted it to HTML 4.01 Transistional and fixed a few more
              errors. Now it's valid code! My stylesheet is also valid, too. I'm
              going to go through all of the pages and validate them as well.
              Thanks for the help. Now I know that for straight HTML, XHTML sucks.

              Just two more questions.
              (1) What's the difference between HTML 4.01 Transistional and Strict?
              I don't suppose one is better?

              (2) The validator doesn't seem to want to validate my RSS news feed.
              Can it? RSS, for those out of the loop, is just XML, and I do have
              the <?xml...?> tag first in the file.
              (http://www.zeonline.net/rss.xml)
              --
              Colin

              Comment

              • Brian

                #8
                Re: XHTML 1.0 Validator: No attributes, elements not defined...

                Colin Cogle wrote:
                [color=blue]
                > What's the difference between HTML 4.01 Transistional and Strict?[/color]

                Transitional includes certain presentational elements and attributes
                that have been deprecated, and thus removed from strict.
                [color=blue]
                > I don't suppose one is better?[/color]

                Generally, Tranisitional is meant for legacy documents. For new
                documents, it is better to use HTML 4 strict. Save the presentation for CSS.

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

                Comment

                • Neal

                  #9
                  Re: XHTML 1.0 Validator: No attributes, elements not defined...

                  On 12 Aug 2004 20:11:39 -0700, Colin Cogle <MasterColinX@e arthlink.net>
                  wrote:
                  [color=blue]
                  > (1) What's the difference between HTML 4.01 Transistional and Strict?
                  > I don't suppose one is better?[/color]

                  Oversimplified, Transitional includes most of the presentational markup
                  from HTML 3.2, Strict does not allow most presentational elements.
                  Documents with Strict DTDs are parsed by some browsers in a more
                  standards-respecting manner than those with Transitional DTDs. And
                  Transitional is best when upgrading an old-school document, then when the
                  deprecated elements have been removed one can change the DTD to Strict.
                  [color=blue]
                  > (2) The validator doesn't seem to want to validate my RSS news feed.
                  > Can it? RSS, for those out of the loop, is just XML, and I do have
                  > the <?xml...?> tag first in the file.
                  > (http://www.zeonline.net/rss.xml)[/color]

                  What validator are you referring to? The above file shows no errors AFAICS.

                  Comment

                  • Neal

                    #10
                    OT RSS WAS Re: XHTML 1.0 Validator: No attributes, elements not defined...

                    On 12 Aug 2004 20:11:39 -0700, Colin Cogle <MasterColinX@e arthlink.net>
                    wrote:
                    [color=blue]
                    > (2) The validator doesn't seem to want to validate my RSS news feed.
                    > Can it? RSS, for those out of the loop, is just XML, and I do have
                    > the <?xml...?> tag first in the file.
                    > (http://www.zeonline.net/rss.xml)[/color]

                    Apologies for the off-topic post. I want to learn more about RSS and what
                    it does. I've seen a few websites which discuss it, but am curious: Who
                    really uses this? Is there one version ofr another that's best for a
                    particular application? Is this something that is useful for "any" site
                    which lists events and noteworthy updates?

                    I don't expect a discussion here. Please provide a pointer to where that
                    discussion might take place. I find no RSS newsgroups, and I have yet to
                    determine the XML newsgroup where the responses to this type and level of
                    question would be most lucent.

                    Comment

                    • Andy Dingley

                      #11
                      Re: XHTML 1.0 Validator: No attributes, elements not defined...

                      On 12 Aug 2004 20:11:39 -0700, MasterColinX@ea rthlink.net (Colin
                      Cogle) wrote:
                      [color=blue]
                      >(2) The validator doesn't seem to want to validate my RSS news feed.[/color]

                      So why not ? What's it complaining about ?



                      v> Sorry This feed does not validate.
                      v> line 40, column 1: Undefined item element: image [help]
                      v> <image>

                      seems pretty clear to me - there's an <image> element in RSS 0.91, but
                      it's not allowed as a child of <item>
                      [color=blue]
                      >I do have the <?xml...?> tag first in the file.[/color]

                      This is the prolog, not a "tag". And it's not essential either
                      (although a good idea to use it)
                      [color=blue]
                      >(http://www.zeonline.net/rss.xml)[/color]

                      If asking for advice on RSS feeds (or anything dynamic), please take a
                      _static_ copy and give us a URL to that. The content of your dynamic
                      feed may often change and it's a common problem in helping out RSS
                      problems posted to Usenet that the feed with the problem is no longer
                      quite the same when others try to look at it.

                      --
                      Smert' spamionam

                      Comment

                      • Lachlan Hunt

                        #12
                        Re: XHTML 1.0 Validator: No attributes, elements not defined...

                        Colin Cogle wrote:[color=blue]
                        > (1) What's the difference between HTML 4.01 Transistional and Strict?
                        > I don't suppose one is better?[/color]

                        Transitional includes all the deprecated elements, but it also has
                        different content models for some elements, such as <body>, <form>, etc...
                        eg.
                        for strict:
                        <!ELEMENT BODY O O (%block;|SCRIPT )+ +(INS|DEL) -- document body -->

                        but for transitional:
                        <!ELEMENT BODY O O (%flow;)* +(INS|DEL) -- document body -->

                        This can cause problems if you're attempting to migrate transitional
                        documents from transitional to strict. It's better to always author in
                        strict so you don't run into any problems later on.

                        Also, the doctype affects the rendering mode of the UA. for Mozilla,
                        there's 3 modes: Standards, Almost Standards and Quirks. Transitional
                        and frameset doctypes use Almost Standards, and the strict use full
                        standards. See Mozilla's DOCTYPE sniffing [3] for more info about the
                        differences:
                        [color=blue]
                        > (2) The validator doesn't seem to want to validate my RSS news feed.
                        > Can it? RSS, for those out of the loop, is just XML, and I do have
                        > the <?xml...?> tag first in the file.
                        > (http://www.zeonline.net/rss.xml)[/color]

                        How can it validate a file with no DTD or schema? The xml prologue,
                        <?xml ...?>, only serves to identify the version, encoding and whether
                        or not it's a standalone document. Without a DTD or Schema, a validator
                        can only check for well-formedness, but any modern browser will do that
                        when it opens it for you anyway.

                        [1] http://www.w3.org/TR/html401/strict.dtd
                        [2] http://www.w3.org/TR/html401/loose.dtd
                        [3] http://www.mozilla.org/docs/web-deve.../doctypes.html

                        --
                        Lachlan Hunt


                        Please direct all spam to abuse@127.0.0.1
                        Thank you.

                        Comment

                        • Arne

                          #13
                          Re: XHTML 1.0 Validator: No attributes, elements not defined...

                          Lachlan Hunt wrote:
                          [color=blue]
                          > Also, the doctype affects the rendering mode of the UA. for Mozilla,
                          > there's 3 modes: Standards, Almost Standards and Quirks. Transitional
                          > and frameset doctypes use Almost Standards, and the strict use full
                          > standards. See Mozilla's DOCTYPE sniffing [3] for more info about the
                          > differences:[/color]

                          I have never seen "Almost Standards" mode on any page I tested for
                          validation? I get Quirks Mode for valid Transitional and framset pages
                          and Standard for valid 4.01 Strict and XHTML, looking thrue the "View >
                          Page Info".

                          --
                          Arne

                          Comment

                          • Lachlan Hunt

                            #14
                            Re: XHTML 1.0 Validator: No attributes, elements not defined...

                            Arne wrote:
                            [color=blue]
                            > Lachlan Hunt wrote:
                            >
                            >[color=green]
                            >>Also, the doctype affects the rendering mode of the UA. for Mozilla,
                            >>there's 3 modes: Standards, Almost Standards and Quirks. Transitional
                            >>and frameset doctypes use Almost Standards, and the strict use full
                            >>standards. See Mozilla's DOCTYPE sniffing [3] for more info about the
                            >>differences :[/color]
                            >
                            > I have never seen "Almost Standards" mode on any page I tested for
                            > validation? I get Quirks Mode for valid Transitional and framset pages
                            > and Standard for valid 4.01 Strict and XHTML, looking thrue the "View >
                            > Page Info".[/color]

                            It was introduced because the reality is that many pages that use
                            HTML and XHTML Transitional depend on IE's quirks to render correctly.
                            At least that's what Hixie told me in a private email. There's not much
                            difference in Mozilla between the two modes, it's just the inline box
                            model that differs. See this test [1] using HTML 4.01 Transitional.
                            Also, view the page info on that, and it will show standards compliance
                            mode (it will never show "Almost Standards Mode"). You get quirks when
                            you use HTML 4 transitional without a system identifier. You should
                            also note that any document sent as XML rather than text/html,
                            regardless of which XHTML doctype is used, will always render in
                            standards mode.

                            Look through that doctype sniffing page I sent previously [2]; it
                            lists every doctype known to mozilla and which modes it triggers. If
                            your interested, you can also take a look at how Opera [3] and IE [4]
                            use doctype sniffing. All browsers (except IE, of course) use full
                            standards mode for strict doctypes. (Run IE through mozilla's
                            compatibility mode tests [1|2], and you'll see what I mean)

                            [1]

                            [2] http://www.mozilla.org/docs/web-deve.../doctypes.html
                            [3] http://www.opera.com/docs/specs/doctype/index.dml
                            [4]

                            --
                            Lachlan Hunt


                            Please direct all spam to abuse@127.0.0.1
                            Thank you.

                            Comment

                            • Dave Patton

                              #15
                              Re: XHTML 1.0 Validator: No attributes, elements not defined...

                              Lachlan Hunt <lachlan.hunt@l achy.id.au.inva lid> wrote in
                              news:dp1Tc.5504 8$K53.23719@new s-server.bigpond. net.au:
                              [color=blue][color=green][color=darkred]
                              >>>Also, the doctype affects the rendering mode of the UA. for Mozilla,
                              >>>there's 3 modes: Standards, Almost Standards and Quirks.[/color][/color][/color]
                              [color=blue][color=green]
                              >> I have never seen "Almost Standards" mode on any page I tested for
                              >> validation?[/color][/color]
                              [color=blue]
                              > It was introduced because the reality is that many pages that use
                              > HTML and XHTML Transitional depend on IE's quirks to render correctly.
                              > At least that's what Hixie told me in a private email. There's not
                              > much difference in Mozilla between the two modes, it's just the inline
                              > box model that differs. See this test [1] using HTML 4.01[/color]
                              [color=blue]
                              > [1]
                              > http://dbaron.org/mozilla/tests/comp...YPE+HTML+PUBLI
                              > C+%22-%2F%2FW3C%2F%2F DTD+HTML+4.01+T ransitional%2F% 2FEN%22+%22http %3A%2
                              > F%2Fwww.w3.org% 2FTR%2Fhtml4%2F loose.dtd%22%3E[/color]

                              However, is that really a proper test page,
                              when it doesn't pass validation?

                              --
                              Dave Patton
                              Canadian Coordinator, Degree Confluence Project
                              The Degree Confluence Project contains photographs of the intersections of integer latitude and longitude degree lines.

                              My website: http://members.shaw.ca/davepatton/

                              Comment

                              Working...