Problems Starting an Ordered List at Zero

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim Cobban

    Problems Starting an Ordered List at Zero

    I cannot get Netscape 4.79 to properly display the ordered list in the
    following fragment.

    <P>Get a specific portion of the date.
    Depending upon the value of index:
    <ol start=0>
    <li>complete value, usually as a <code>String</code>, or if
    an integral value as an <code>Integer </code>.
    <li>year as an <code>Integer </code>
    <li>month number as an <code>Integer </code>
    <li>day as an <code>Integer </code>
    <li>month name as a <code>String</code>
    </ol>
    ....

    When viewed under IE6 the ordered list starts with item 0 as I have
    requested, but when viewed in Netscape 4.79 the start=0 attribute is ignored
    and the list is displayed starting with item 1. Since this web page is part
    of the documentation of the product it is essential that the displayed
    indexes be correspond to the behavior of the program.

    When I go to the W3C website I am informed that the start= attribute is
    "DEPRECATED ". However I cannot find any alternative way to achieve this
    result that is not deprecated.

    Any ideas?

    --
    Jim Cobban jcobban@magma.c a
    34 Palomino Dr.
    Kanata, ON, CANADA
    K2M 1M1
    +1-613-592-9438


  • Neal

    #2
    Re: Problems Starting an Ordered List at Zero

    On Fri, 24 Sep 2004 13:33:12 -0400, Jim Cobban <jcobban@magma. ca> wrote:
    [color=blue]
    > I cannot get Netscape 4.79 to properly display the ordered list in the
    > following fragment.[/color]

    That browser is antique. If it will not observe the start attribute, and
    you must accommodate NN4, you'll ned to number manually.
    [color=blue]
    > When I go to the W3C website I am informed that the start= attribute is
    > "DEPRECATED ". However I cannot find any alternative way to achieve this
    > result that is not deprecated.[/color]

    Deprecated markup is allowed in the Transitional DTD. But as you seem to
    need to work with a browser that can't handle it anyway, you might need to
    do it differently anyhow.

    Comment

    • Jim Cobban

      #3
      Re: Problems Starting an Ordered List at Zero


      "Neal" <neal413@yahoo. com> wrote in message
      news:opseu81fly 6v6656@news.ind ividual.net...[color=blue]
      > On Fri, 24 Sep 2004 13:33:12 -0400, Jim Cobban <jcobban@magma. ca> wrote:
      >[color=green]
      > > I cannot get Netscape 4.79 to properly display the ordered list in the
      > > following fragment.[/color]
      >
      > That browser is antique. If it will not observe the start attribute, and
      > you must accommodate NN4, you'll ned to number manually.[/color]

      I appreciate that 4.79 is antique, however several of the web sites that I
      deal with use a tool, MrSid, that does not support any more recent Mozilla
      based browser. That is the tool refuses to install itself into the newer
      browsers.


      Comment

      • Dave Patton

        #4
        Re: Problems Starting an Ordered List at Zero

        "Jim Cobban" <jcobban@magma. ca> wrote in
        news:0YednRmpha 8FncjcRVn-uQ@magma.ca:
        [color=blue]
        > I appreciate that 4.79 is antique, however several of the web sites
        > that I deal with use a tool, MrSid, that does not support any more
        > recent Mozilla based browser. That is the tool refuses to install
        > itself into the newer browsers.[/color]

        LizardTech's MrSid isn't a tool, but a compression method.
        If you are using websites that have images that are in
        MrSid format, there are a number of ways to deal with such
        images, including using a browser plugin, which will work
        with more modern browsers than Netscape 4.79 - do a google
        search and you'll find info about people getting the plugin
        to work in various browser versions, or you could ask in
        a browser-specific newsgroup.

        --
        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

        • Jukka K. Korpela

          #5
          Re: Problems Starting an Ordered List at Zero

          Neal <neal413@yahoo. com> wrote:
          [color=blue][color=green]
          >> I cannot get Netscape 4.79 to properly display the ordered list in
          >> the following fragment.[/color]
          >
          > That browser is antique. If it will not observe the start attribute,[/color]

          It observes the start attribute but does not support a value of "0".
          There are some odd deficiencies in browser support to this attribute
          (e.g., when you use "0", or negative numbers, or large numbers).
          [color=blue]
          > and you must accommodate NN4, you'll ned to number manually.[/color]

          Indeed, because there's no CSS equivalent to the start attribute.

          When the numbers are _essential_, it's probably best to make them part of
          the content. The best approach is usually to use a <ul> element, with a
          class attribute, say <ul class="numbered ">, with numbers in the <li>
          elements (<li>0. foo bar</li>) and with a CSS rule like
          ul.numbered { list-style-type: none; }

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

          Comment

          • Jim Cobban

            #6
            Re: Problems Starting an Ordered List at Zero


            "Jukka K. Korpela" <jkorpela@cs.tu t.fi> wrote in message
            news:Xns956FDE4 7BF13Djkorpelac stutfi@193.229. 0.31...[color=blue]
            > Neal <neal413@yahoo. com> wrote:
            >
            > When the numbers are _essential_, it's probably best to make them part of
            > the content. The best approach is usually to use a <ul> element, with a
            > class attribute, say <ul class="numbered ">, with numbers in the <li>
            > elements (<li>0. foo bar</li>) and with a CSS rule like
            > ul.numbered { list-style-type: none; }[/color]

            If the text of the list item is too long to fit on one line won't it wrap
            back to the left margin, rather than being indented to the same horizontal
            position as the first letter of the text on the first line?


            Comment

            • Jukka K. Korpela

              #7
              Re: Problems Starting an Ordered List at Zero

              "Jim Cobban" <jcobban@magma. ca> wrote:
              [color=blue][color=green]
              >> When the numbers are _essential_, it's probably best to make them
              >> part of the content. The best approach is usually to use a <ul>
              >> element, with a class attribute, say <ul class="numbered ">, with
              >> numbers in the <li> elements (<li>0. foo bar</li>) and with a CSS
              >> rule like ul.numbered { list-style-type: none; }[/color]
              >
              > If the text of the list item is too long to fit on one line won't it
              > wrap back to the left margin, rather than being indented to the same
              > horizontal position as the first letter of the text on the first
              > line?[/color]

              Typically, yes. I didn't want to go into the presentational details, but
              if you wish to simulate the typical appearance of <ol>, you need to add
              some CSS code and probably extra HTML markup (for the numbers) too.
              On the other hand, it gets a bit awkward then, so you might also consider
              using a table:

              <table class="numbered " summary=
              "This table corresponds to a numbered list, so that the first
              column has item numbers, the second column contains the items."
              cellspacing="0" cellpadding="0" >
              <tr><td align="right" valign="top">0. &nbsp;&nbsp; </td>
              <td>foo bar</td></tr>
              ....
              </table>

              It's a bit clumsy too, of course, and a bit illogical, since the cells of
              the first column should really be headers for the cells of the second
              column (<th scope="row">0.</th>). But I just sketched an approach that
              works in "pure" (though surely not Puristic) HTML. Of course you could
              also use table markup with no presentational attributes (and no &nbsp;
              trickery) and handle the rendering in CSS, though then the list would
              look a bit odd in CSS-disabled browsing.

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

              Comment

              • Toby Inkster

                #8
                Re: Problems Starting an Ordered List at Zero

                Jukka K. Korpela wrote:[color=blue]
                > When the numbers are _essential_, it's probably best to make them part of
                > the content. The best approach is usually to use a <ul> element, with a
                > class attribute, say <ul class="numbered ">, with numbers in the <li>
                > elements (<li>0. foo bar</li>) and with a CSS rule like
                > ul.numbered { list-style-type: none; }[/color]

                Seems nasty though to suggest the use of a <ul> element in a situation
                where the numbers (and thus presumably the ordering) are so important.

                I guess this would end up producing the correct result in the most
                situations though.

                --
                Toby A Inkster BSc (Hons) ARCS
                Contact Me ~ http://tobyinkster.co.uk/contact
                Now Playing ~ ./white_town_-_your_woman.ogg

                Comment

                • Stan Brown

                  #9
                  Re: Problems Starting an Ordered List at Zero

                  "Jukka K. Korpela" <jkorpela@cs.tu t.fi> wrote in
                  comp.infosystem s.www.authoring.html:[color=blue]
                  >Indeed, because there's no CSS equivalent to the start attribute.[/color]

                  I wonder why, given that the attribute is deprecated in HTML 4.01
                  Strict.

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

                  HTML 4.01 spec: http://www.w3.org/TR/html401/
                  validator: http://validator.w3.org/
                  CSS 2.1 spec: http://www.w3.org/TR/CSS21/
                  validator: http://jigsaw.w3.org/css-validator/

                  Comment

                  • Jim Cobban

                    #10
                    Re: Problems Starting an Ordered List at Zero


                    "Stan Brown" <the_stan_brown @fastmail.fm> wrote in message
                    news:MPG.1bc0b8 34d287037598ca2 d@news.odyssey. net...[color=blue]
                    > "Jukka K. Korpela" <jkorpela@cs.tu t.fi> wrote in
                    > comp.infosystem s.www.authoring.html:[color=green]
                    > >Indeed, because there's no CSS equivalent to the start attribute.[/color]
                    >
                    > I wonder why, given that the attribute is deprecated in HTML 4.01
                    > Strict.[/color]

                    Apparently you are supposed to write some complicated CSS code to implement
                    the counter yourself. Seems overkill, and if they are going to propose such
                    a complicated workaround I feel they should describe the workaround in the
                    specification.


                    Comment

                    • Lauri Raittila

                      #11
                      Re: Problems Starting an Ordered List at Zero

                      In article <IdidndWzkaSZbM vcRVn-hQ@magma.ca>, jcobban@magma.c a says...[color=blue]
                      >
                      > "Stan Brown" <the_stan_brown @fastmail.fm> wrote in message
                      > news:MPG.1bc0b8 34d287037598ca2 d@news.odyssey. net...[color=green]
                      > > "Jukka K. Korpela" <jkorpela@cs.tu t.fi> wrote in
                      > > comp.infosystem s.www.authoring.html:[color=darkred]
                      > > >Indeed, because there's no CSS equivalent to the start attribute.[/color]
                      > >
                      > > I wonder why, given that the attribute is deprecated in HTML 4.01
                      > > Strict.[/color][/color]

                      IMHO, they should have included some attribute to hide markers in HTML,
                      even if deprecated it at the same time.
                      [color=blue]
                      > Apparently you are supposed to write some complicated CSS code to implement
                      > the counter yourself.[/color]

                      ol {counter-reset:foo;}
                      li:before {content:counte r(foo) ".";display:mar ker;}
                      li {counter-increment:foo;}

                      But, IMHO, that is not that bad. I can't think any easier way to code the
                      same - remember, CSS is not HTML specific, so first and last rule are
                      needed to tell browser which are the list elements, display:marker is
                      needed for rendering content as list item marker (it does not workm on
                      any browser).

                      It doesn't leave much.
                      [color=blue]
                      > Seems overkill,[/color]

                      IMHO, Counter things in CSS2 are quite nice and easy. They have been
                      supported by Opera for years. The reson they are hardly ever used is that
                      no Other browser have implemented them.

                      Often, when strange numbering is needed, numbers should be content. And
                      just as often, numbering is stylish, but can't be done in certain
                      browsers exept by putting numbers in content (anything with more than one
                      level of numbers)



                      --
                      Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>

                      Comment

                      • Jukka K. Korpela

                        #12
                        Re: Problems Starting an Ordered List at Zero

                        Toby Inkster <usenet200409@t obyinkster.co.u k> wrote:
                        [color=blue]
                        > Seems nasty though to suggest the use of a <ul> element in a situation
                        > where the numbers (and thus presumably the ordering) are so important.[/color]

                        I would say just the opposite: if the numbers are really important, then
                        they should be part of the textual content, and then <ul> is adequate.

                        The <ol> element is basically the same as <ul> but with different default
                        rendering. That is, their difference is presentational rather than
                        semantic.

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

                        Comment

                        • Jukka K. Korpela

                          #13
                          Re: Problems Starting an Ordered List at Zero

                          Lauri Raittila <lauri@raittila .cjb.net> wrote:
                          [color=blue]
                          > ol {counter-reset:foo;}
                          > li:before {content:counte r(foo) ".";display:mar ker;}
                          > li {counter-increment:foo;}
                          >
                          > But, IMHO, that is not that bad.[/color]

                          Except that it does not work, and it uses CSS constructs that are being
                          phased out rather soon, in CSS 2.1, the strange mix of industry standard
                          CSS and a few new odd inventions.

                          It was an unnecessarily complicated thing to handle a simple thing like a
                          replacement for <ol start="0">.

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

                          Comment

                          • Lauri Raittila

                            #14
                            Re: Problems Starting an Ordered List at Zero

                            In article <Xns957137A5908 Bjkorpelacstutf i@193.229.0.31> ,
                            jkorpela@cs.tut .fi says...[color=blue]
                            > Lauri Raittila <lauri@raittila .cjb.net> wrote:
                            >[color=green]
                            > > ol {counter-reset:foo;}
                            > > li:before {content:counte r(foo) ".";display:mar ker;}
                            > > li {counter-increment:foo;}
                            > >
                            > > But, IMHO, that is not that bad.[/color]
                            >
                            > Except that it does not work,[/color]

                            Yes. That is it's only problem. (of course, problem is not small...)
                            [color=blue]
                            > It was an unnecessarily complicated thing to handle a simple thing like a
                            > replacement for <ol start="0">.[/color]

                            But, it awould make possible to style things with numbers, unlike start
                            attribute. Of course, it is not good idea for replacing numbers in lists.
                            But IMHO, OL was bad idea from start, I would much prefer something like
                            this:

                            <list><li><mark er>0.</marker>First Item</li></list>

                            And marker would be optional, when leaved out style would come from
                            stylesheet.



                            --
                            Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>

                            Comment

                            • Stan Brown

                              #15
                              Re: Problems Starting an Ordered List at Zero

                              "Jukka K. Korpela" <jkorpela@cs.tu t.fi> wrote in
                              comp.infosystem s.www.authoring.html:[color=blue]
                              >The <ol> element is basically the same as <ul> but with different default
                              >rendering. That is, their difference is presentational rather than
                              >semantic.[/color]

                              Hmm, I wonder.

                              Never mind CSS for a minute; consider just generic documents. My
                              take on a bulleted list is that the items are equal and could just
                              as well appear in any order; my take on a numbered list is that theh
                              numbers are steps in a procedure.

                              I agree with you that the numbers themselves re not terribly
                              important, but the fact that "microwave for 10 minutes" comes before
                              "puree with a blender" _is_ important.

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

                              HTML 4.01 spec: http://www.w3.org/TR/html401/
                              validator: http://validator.w3.org/
                              CSS 2.1 spec: http://www.w3.org/TR/CSS21/
                              validator: http://jigsaw.w3.org/css-validator/

                              Comment

                              Working...