Manuel Collado wrote:
> Hussein Shafie escribi?:
> 
>> Fco. Mario Barcala Rodr?guez wrote:
>> ...
>>
>>> 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.
> 
> 
> I've found this weird behaviour several times, and already commented it 
> in this mailing list.
> 
> In my opinion the problem is not the stated limitation that a block 
> without children cannot be collapsed. The real problem is the dynamic 
> association between the collapser button and the block to be collapsed, 
> depending on the block contents. I see it as a bug in XXE.
> 
> My expected behavior is that a collapser either:
> - collapses the *innermost* collapsible block that contains it, if the
>   block is not empty, or
> - doesn't collapses anything. In that case the button should be
>   displayed as disabled (grayed). I've seen grayed collapsers several
>   times.
> 
> Being able to collapse a block outside the innermost collapsible 
> surrounding scope is probably a surprising fact for most users (at least 
> for me and for the starter of this thread).
> 
> If you still think this is not buggy behaviour, please consider this 
> message as a feature request for cleaning up (simplify) the collapser 
> logical model.

The most common use of a collapser() is to add one to the content 
generated for the title of a section.

Of course, it is the section which needs to be collapsed and not its 
title. That's why a collapser() attempts to find a collapsible 
*ancestor-or-self* of its associated element.

Therefore, if you generate a collapser(), you simply need to make sure 
that its associated element has an ancestor-or-self which has been 
marked as collapsible.

Suffice to *mark* this ancestor-or-self as collapsible.

If this ancestor-or-self is empty or does not contain blocks, that is, 
if this ancestor-or-self is marked as collapsible but actually cannot be 
collapsed due to its content, the collapser() will be disabled/grayed[*] 
and you'll have no weird side-effects.

Now XXE does not work as described here[*], simply because you have 
found a bug.

This bug is fixed now. Thanks for insisting on this point.


Reply via email to