Ralf Hildebrandt wrote:
> Is there any way of hierarchically "raising" a structure one level,
> e.g. making a 
> 
> <sect2><sect3><sect4>Text</sect4></sect3></sect2>
> into 
> <sect1><sect2><sect3>Text</sect3></sect2></sect1>
> ? I really need that quite often, since I want to change a subsection
> into a section, without having to cut & paste all it's contents.
> 
> Right now (under Linux) I have to do this manually, by using jed or
> vi. This works, but after saving I have lots of additional blank lines
> displayed in the XML editor. Also, the contents of <screen> are
> totally destroyed after such an operation, all the newlines are missing.

You'll have such a command in next release.

Note that without a specialized command, it just takes 5 seconds to do 
it ***but you need to <section> instead of <sect1>, <sect2>, <sect3>***.

[1] Insert a (new, empty) <section>.

[2] Select the <section> "to be raised".

[3] Select all the child elements in the <section> "to be raised" by 
typing Esc Down-Arrow (or using the Select menu).

[4] Ctrl-C  to copy all these children to the clipboard.

[5] Select the new, empty <section>.

[6] Select all the child elements in the new, empty <section> (empty 
title+para) by typing Esc Down-Arrow.

[7] Type Ctrl-V to replace empty title+paragraph by the content of 
<section> "to be raised".

[8] Delete the <section> "to be raised".

Basically, this is just copy/paste multiple elements at once. And of 
course, the content of <screen> will not be destroyed.

My advice: use vi to replace <sect1>, <sect2>, etc, by <section> and 
after that, use the above recipe until a specialized command is added to 
XXE.



Reply via email to