Martin Kolar?k wrote:
>
> I have CSS for DTD, where <listitem> element can but need not contain
> <paragraph>. So, if <paragraph> is not present, the list is expected to be
> inlined. And, of course, if <paragraph> is present the list is expected to
> contain paragraphs.
>
> Simple piece of XML:
>
> <list>
> <listitem><paragraph>Some text</paragraph></listitem>
> </list>
>
> and simple piece of CSS:
>
> list, p, listitem {
> display: block;
> }
> list > listitem:before {
> display: marker;
> content: disc;
> }
> listitem > p {
> margin-top: 0pt;
> margin-bottom: 0pt;
> }
>
> And the result? The bullets (disc) are ugly -- they are typeset on the top
> of the line, not, as I expected :-), in the middle of it. The lists e.g. in
> XHTML are OK, but there is usualy no <p> inside <li>.
>
> How should I set up CSS to display bullets properly?
What you describe is very common. This is the case with DocBook listitem
and XHTML li. You can use these DTDs and their stylesheets as examples
of what XXE can do at best.
PS: Your example is inconsistent: you use "paragraph" in the XML example
and "p" in the CSS. If this is not a typo in the email, this explains
very well why the result is ugly: the default display of an element is
inline and not block.