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?
Questions/Comments:
* 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
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/collapser.html
2) The "toggleCollapsed" command. Currently this command is not bound to
any keystroke. See
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/toggleCollapsed.html
See also the "A sample customize.xxe" add-on for an example of how the
"toggleCollapsed" command can be used:
http://www.xmlmind.com/xmleditor/addons_doc.html#sample_customize_xxe
* 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
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support