Re: How to control Collapse/Expand?
Hussein Shafie <hussein <at> xmlmind.com>
2015-01-04 10:13:49 GMT
Leif H S wrote:
> a little bit about my expectations for the Collapse/Expand functionality
> in the XXE translate file format:
> On 3 Jan 2015, at 20:34, Leif H S wrote:
> 1. My translation file for Norwegian Nynorsk consists of a root
> element <xliff> with numerous <file> elements children. I would
> like to be able to /collapse/ /all/ those <file> elements, so
> that I can have an overview of the document, more or less. Is
> there a way to do that without having to double click on each
> <file> element?
> * Is the Collapse/Expand functionality possible to control, without
> having to turn to Java programming? E.g. could I do something with
> a configuration file to decide which elements are collapsible?
> For example: In the translation project, I notice the triangle
> symbol at each <file> element, which signals that the element
> is collapsible. What is it that tells XXE to make the <file>
> element collapsible?
There are two ways to control the Collapse/Expand functionality.
1) Adding a collapser() button to the CSS generated content. See
2) The "toggleCollapsed" command. Currently this command is not bound to
any keystroke. See
See also the "A sample customize.xxe" add-on for an example of how the
"toggleCollapsed" command can be used:
> * Regardless: It seems to be a defect in the XXE translation file format
> if it only allows to collapse the <file> elements. Why is such a
> functionality called «Collapse /all/», when all it does is that it
> collapses a /single/ element? If it is supposed to be worthy to be
> called «Collapse /all/», it ought to be possible to collapse more
> than a single element.
No. "Collapse All" *recursively* collapses all collapsible descendant
elements. Hence if there is no collapsible descendant elements, then the
collapser() button collapses just its holder.
> * In fact, I attach an XHTML5 document where Collapse/Expand All works
> like I want, I think. Please take a look. In this element, the top
> heading allows me to collapse all child <section> elements. That is:
> I do not have to click on each child section element in order to
> collapse them. E.g. if I first use Collapse All, and then click
> just once to 'open' the top/outer section element, then the child
> section elements remain closed - giving me an overview over them.
The slightly modified translate_xxe.css I've sent you attached to a
previous email should do the trick.
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com