One of the things you should consider and check out is the extent to which default padding and margins my have an effect on the display. I've run into a lot of differences among browsers that can be eliminated or at least reduced by explicitly re-setting the style characteristics of P (and, I suppose, LI) to something that alternative browsers will at least attempt to interpret consistently. You can do this with a quick STYLE block in the HEAD. (I qualify this when Netscape 4.x is in the equation; one needs to be a lot more into the bug trivia of that browser than I am to get it to work at all, let along consistently. Reason enough to join the "Update Your Browser" campaign.)
cheers. ...edN At 12:29 PM 21/03/2002 -0800, Bob Stayton wrote: >Well, I looked at your URL and they all look the same to >my browsers: IE 5.5 on Win98 and Netscape 4.72 on Linux. >They all have no space between items. Strange. >What version of IE are you using? > >Removing the <p> tags is probably the most reliable >method, but doing that with the XSL stylesheets could >be tricky. > >bobs > >On Thu, Mar 21, 2002 at 02:43:10PM -0500, Stephen Bannasch wrote: > > Bob, > > > > I tested your html in IE and Mozilla and it didn't seem to work. > > > > I think the html should probably look like this: > > > > <div class="orderedlist"> > > <ol type="1" compact> > > <li>item 1</li> > > <li>item 2</li> > > <li>item 3</li> > > </ol> > > </div> > > > > I put up the html for four orderedlists here: > > > > http://concord.org/~stephen/orderedlist.html > > > > The first one uses your method, the second is the one above, the third > is the same without the compact attribute, the fourth is what is produced > by the docbook stylesheets except that I have removed the trailing > </p>. That doesn't seem to help. > > > > At 10:40 AM -0800 3/21/02, Bob Stayton wrote: > > >On Thu, Mar 21, 2002 at 12:04:22PM -0500, Stephen Bannasch wrote: > > >> My ordered lists have extra space between lines. > > >> > > >> The problem below happens in both html and in fo->fop->pdf. > > >> > > >> using docbook-xsl-1.50.0 (and older versions) > > >> > > >> <orderedlist numeration="arabic" spacing="compact"> > > >> <listitem><para>item 1</para></listitem> > > >> <listitem><para>item 2</para></listitem> > > >> <listitem><para>item 3</para></listitem> > > >> </orderedlist> > > >> > > >> produces html like this: > > >> > > >> <div class="orderedlist"> > > >> <ol type="1" compact=""> > > >> <li> > > >> <p>item 1</p> > > >> </li> > > >> <li> > > >> <p>item 2</p> > > >> </li> > > >> <li> > > >> <p>item 3</p> > > >> </li> > > >> </ol> > > >> </div> > > >> > > >> Which produces output like this: > > >> > > >> 1. item 1 > > >> > > >> 2. item 2 > > >> > > >> 3. item 3 > > >> > > >> There are two problems. The obvious one is the <p> > > >> wrapped around the list content produces an extra blank > > >> line between list items. The result is the same with the > > >> orderedlist spacing set to normal. > > >> > > >> The content in the docbook listitem needs to be wrapped > > >> in something since the listitem can't be PCDATA. Is there > > >> something else I can wrap my docbook items in that won't > > >> produce the extra spacing produced with <para>? > > >> > > >> Also according to the html4.0 spec the attribute compact > > >> should be rendered as either: [compact] or > > >> [compact="compact"]. However they warn that many browsers > > >> only interpret the simpler form. > > > > > >For HTML output, > > >I've never found the 'compact' list option to be > > >reliably supported in the browsers. > > > > > >I have some clues, but not a complete answer. > > >The problem is actually with the closing </p> at > > >the end of each list item. If you remove that, the > > >space disappears. Apparently the browsers figure > > >if you have a closing </p> then you intended space. > > >But that's not an option using the XSL stylesheets. > > > > > >A margin style seems to work as well, by assigning a > > >class="compact" to those paras inside such lists: > > > > > ><html> > > ><head> > > ><style type="text/css"> > > > p.compact {margin-bottom: 0;} > > ></style> > > ></head> > > >... > > > <div class="orderedlist"> > > > <ol type="1" compact=""> > > > <li> > > > <p class="compact">item 1</p> > > > </li> > > > <li> > > > <p class="compact">item 2</p> > > > </li> > > > <li> > > > <p class="compact">item 3</p> > > > </li> > > > </ol> > > > </div> > > > > > >You'll have to customize the stylesheet to get > > >that class attribute added to para's inside lists > > >with spacing="compact". > > > > > >Bob Stayton 400 Encinal Street > > >Publications Architect Santa Cruz, CA 95060 > > >Technical Publications voice: (831) 427-7796 > > >Caldera International, Inc. fax: (831) 429-1887 > > > email: [EMAIL PROTECTED] > > > > > > -- > > > > -s > >-- > >Bob Stayton 400 Encinal Street >Publications Architect Santa Cruz, CA 95060 >Technical Publications voice: (831) 427-7796 >Caldera International, Inc. fax: (831) 429-1887 > email: [EMAIL PROTECTED]
