Poster at Kinetium dot Com wrote:
> The collapsible feature is really nice!
>
> One question: when collapsed, if none of the content of the collapsed node
> is visible, the collapsed version is no longer an "outline" and becomes not
> readable.
>
> I tried the suggested "not-collapsible-head" but this changed the behavior
> of collapsing completely, often leaving an entire big widget like a table
> visible even when collapsed.
>
> elem {
> collapsible: yes;
> not-collapsible-head: 1; /* not good */
> }
>
> In every case where I would like a "header" version when collapsed, it would
> suffice to just display a read-only version of the 1st line of the hidden
> element content with "..." (and truncate it for display if too long).
>
> Would this be possible?
>
> If you need to allow other options, perhaps something like:
>
> elem {
> collapsible: yes;
> collapsed-content: first-line | other options
> }
>
For now, in such case, what follows is the best you can do:
---
elem {
display: block;
margin-left: 50;
collapsible: yes;
collapsed-content: "--- elem ---";
}
elem:before {
content: collapser();
display: marker;
}
---
If you can program in Java, you could replace "--- elem ---" by
something smarter. See
http://www.xmlmind.com/xmleditor/_distrib/docs/dev/ar01s07.html
And, in the near future, you'll be able to replace "--- elem ---" by an
XPath expression using the target of the CSS element as a context node
(which can be used to quickly and easily do what you want).