Fco. Mario Barcala Rodr?guez wrote:
> I have a doubt. In my css I have something like this:
>
> division_body::before
> {
> font-weight: bold;
> color:#9C0031;
> content: element-label() " " collapser() " " attributes(wrap-rows,no);
> }
>
> division_body
> {
> display: block;
> collapsible: yes;
> not-collapsible-head: 1;
> collapsed: yes;
> border: 3px solid black;
> padding: 2;
> margin: 5;
> }
>
> And division_body is defined in my dtd as follows:
>
> division_body (paragraph* | division*)
>
> The problem is that some division_body are empty, and have nothing inside.
> In these cases if we "click" over collapser, the parent is collapsed, and it
> is not desirable for us.
> ?Is there any way to show the collapser only if division_body is not empty,
> or some other solution to avoid this collapser behaviour?
An element which does not contain *blocks* (for example, because it is
empty) cannot be collapsible. See the "Limitation" note in
http://www.xmlmind.com/xmleditor/_distrib/docs/csssupport/ch04s11.html
Fix your empty division_body problem as recommended in my previous email
and you'll also fix this problem.
---
PS: It is recommended to ``structure'' your generated content as follows:
---
division_body::before
{
font-weight: bold;
color:#9C0031;
display: inline;
content:
division(content(paragraph(content(element-label(), " ",
collapser())),
attributes(wrap-rows, no)));
}
---
See http://www.xmlmind.com/xmleditor/_distrib/docs/csssupport/ch06.html