Friday, July 7, 2006, 11:24:17 AM, Hussein Shafie wrote:
> Daniel Dekany wrote:
>> I think it's safe to say that the typically used XSL-s (for HTML and
>> PDF output) use similar vertical margin (vertical spacing) around
>> listitem elements than around para elements. But the default CSS used
>> for editing in XXE doesn't have vertical margin around the listitem-s,
>> only around the itemziedlist/orderedlist. It should have, except if
>> the spacing attribute of the parent itemziedlist/orderedlist element
>> is "compact".
>
> This is not a bug or even an omission. Unlike one of our respectable
> competitors, we *really* don't try to mimic what is done by the XSL
> style sheets.
>
> The goal of our CSS is simply to have on screen a document
> * which is readable,
> * whose structure/semantic is easy to understand.
And this is not the case in the current situation, since you can't see
easily if the itemizedlist/orederedlist is "compact" or not (yes, of
course you could check the Attributes tab, but needless to say that
looking at the screen and just immediately see if which list is is
compact is way more efficient). And since we are talking about DocBook
documents, it belongs to the semantic, wether you happen to agree with
this feature of the DocBook schema or not. I mean, this is an
attribute in DocBook schema, and I build a DocBook XML document, so,
the designers of the DocBook schema has decided it belongs to the
semantic of a DocBook document. And actually, when correctly used,
this attribute is about document semantic, and not really a formatting
hint. Like, I swear I'm no a guy who can't free his mind from MS Word,
or who doesn't understand semantic VS formatting. So I didn't patched
the CSS from aesthetic reason, but because I want to spot easily if I
forgot to set the spacing attribute to "compact" for certain listings
or not. I make a list compact not because it looks better, but because
I list keywords or something like that, and not sentences or
paragraphs. This is a semantic difference. (Some stylesheets, like the
HTML stylesheet that comes with XXE, will actually ignore this
attribute, and always show the listing with big vertical space between
items... bur some will not.)
> What you suggest does not make listitems substantially easier to read or
> easier to understand.
I support that showing the structure/semantic is the priority. But why
does the current CSS (no vertical space) makes it easier to
understand, compared to the patched CSS? OK, this question should be
split into two independent questions. In the first iteration, let's
say you will ignore the "spacing" attribute in the CSS. So, you have
two CSS-es to chose from, A and B (neither considers the spacing
attribute). Both shows the structure equally well, but with B the
result is closed to the final output of most XSL-s. I think that's
only good, and there was no tradeoff for that. B has only advantage as
far as I can see. So why don't you prefer B over A? I.e. using
vertical space around listitems over no vertical space? This is what I
mostly don't get here.
Then, after this was answered, in the second iteration, I would
dispute that taking spacing="compact" into consideration is against
the principle of showing the only structure... that I already did
earlier in this mail. Surely this is a less obvious question.
> A counterexample would be supporting the "continuation" attribute of an
> orderedlist.
>
>
>> I have quickly fixed it for myself by modifying
>> $XXE_HOME/addon/config/docbook/css/docbook1.imp and docbook2.imp so
>> now itemziedlist/orderedlist doesn't have a margin, instead the
>> listitems-s have, except if the spacing attribute of its parent is
>> "compact", in which case there is no margin. Something like (but I
>> don't really know CSS):
>>
>> itemizedlist {
>> display: block;
>> margin-left: 2ex;
>> }
>>
>> listitem {
>> display: block;
>> margin-top: 1.33ex;
>> margin-bottom: 1.33ex;
>> }
>>
>> itemizedlist[spacing=compact] > listitem {
>> display: block;
>> margin-top: 0ex;
>> margin-bottom: 0ex;
>> }
>>
>> ...
>>
>> orderedlist {
>> display: block;
>> margin-left: 2ex;
>> border: thin solid #0000FF;
>> }
>>
>> ...
>>
>> orderedlist[spacing=compact] > listitem {
>> display: block;
>> margin-top: 0ex;
>> margin-bottom: 0ex;
>> }
>>
>> Now it certainly should be further improved, because if I put the
>> itemizedlist/ordered into a para (<para>Blah
>> blah<itemziedlist>...</itemizedlist></para>) instead of after it, and
>> in additional spacing="compact", then now will be no vertical space
>> between the paragraph and the first list item. I think there should
>> be. Apart from this problem, what I see after this CSS modification is
>> far closer to the typical output. And most importantly, now I see
>> where did I set spacing="compact" without checking the Attributes tab.
>
> We are happy to see that power users are not affraid to customize our
> DocBook CSS style sheets to their own taste.
--
Best regards,
Daniel Dekany