1. The DocBook menu

Upgrade to DocBook version 5

This menu item is present only if the document being edited is a DocBook version 4 document. Converts DocBook version 4 document being edited it to DocBook version 5.0, 5.1 or 5.2. A dialog box is displayed to allow choosing a DocBook version. A file chooser is displayed to allow choosing a save file for the DocBook 5 document.

Note that this command does not automatically upgrade the documents referenced in the document being edited (e.g. a chapter included in a book). This has to be done manually for each referenced document. Once this is done, the xi:include elements have to be edited by hand in the master DocBook 5 document after using EditReferenceUntransclude All in XMLmind XML Editor - Online Help.

Displays a dialog box allowing to declare the collection of DocBook documents in which olink is used for cross-referencing. More information in Specifying the set of olink-ed documents.

Paste As
Paste from Word Processor or Browser

Import the HTML copied to the clipboard by word processors or web browsers and intelligently paste it into the DocBook document being edited.

  • Extensive efforts are made to decently support the “non-filtered HTML” copied by MS-Word to the clipboard.

  • When an application other than MS-Word is used, the quality of the result you'll get in XXE highly depends on what has been copied to the clipboard. In all cases, XXE tries very hard to import something simple, clean and valid at the expense of the fidelity to the original data.

The pasted data replaces the text or node selection if any. When there is no selection, XMLmind XML Editor automatically determines a valid insertion location at or following the caret position.

If XMLmind XML Editor fails to find such valid insertion location, the rich text is converted to valid DocBook and then copied to the clipboard, overwriting the original data put there by the third-party application. This allows to use the “normal” Paste Before, Paste or Paste After commands to paste the data elsewhere in the document.

[Tip]

This menu entry allows not only to paste snippets copied from word processors or web browsers, but also to import entire documents or HTML pages. In order to import the entire document into XXE:

  1. Open the document in the third-party application.

  2. Press Ctrl+A (Select All) then press Ctrl+C (Copy) to copy it to the clipboard.

  3. Create a new DocBook document in XXE by using FileNew.

  4. Use FileSave As to save this new DocBook document to disk.

  5. Explicitly select the root element of the DocBook document, for example by clicking on its name in the node path bar.

  6. Select menu item "Paste from Word Processor or Browser" to paste the content of the clipboard[1].

[Tip]

If, using MS-Word, you want to copy a piece of text rather than a paragraph, do not include the hidden character found at the very end of a paragraph (the paragraph mark) in your selection.

Other menu entries

The following entries of this submenu allow to paste the plain text copied to the clipboard, typically using a third-party word processor or spreadsheet, as:

  • one or more paragraphs,

  • OR a programlisting element,

  • OR one or more list items,

  • OR an itemized list,

  • OR one or more table rows,

  • OR a table.

The last two menu entries assume that each text line specifies a table row and that, within a text line, the contents of the table cells are separated by tab characters.

[Tip]

If you need to paste the copied text as an ordered list, first paste this text as an itemized list then convert the pasted list to an ordered list using EditConvert (Ctrl+T).

The following entries of this submenu allow to paste the image copied to the clipboard as:

  • inlinemediaobject,

  • mediaobject,

  • figure.

Menu entry "inlinemediaobject" replaces the text or node selection if any. When there is no selection, this menu entry pastes its element at caret position (just like EditPaste).

All the other menu entries also replace the text or node selection if any. When there is no selection, these menu entries paste their elements at any valid position in the document following the caret position.

Convert to Module

This menu item is present only if the document being edited is a DocBook version 5 document. Makes it easy converting a large, monolithic, document to a modular document.

More precisely this menu saves explicitly selected element to a separate document and then replaces the selected element by a reference to the separate document. For example, it can be used to save selected chapter to file chapter1.xml and then to replace selected chapter by <xi:include href="chapter1.xm"/> in a monolithic book document.

For this menu item to work, a document template having the same root element as selected element must be available. For example, this menu item works when selected element is a chapter, section, appendix, etc, but not when the selected element is para, table, etc. Available document templates are listed in the dialog box displayed by menu item FileNew in XMLmind XML Editor - Online Help.

Convert between informal element and element

Converts an “informal element” to/from a “formal element” having a title.

This command currently works for informaltable/table (CALS tables only, not HTML tables), informalfigure/figure and informalexample/example.

Link callouts

Links a sequence of callout elements to the corresponding sequence of co or area elements (and, of course, also the other way round).

Useful information about callouts is found in DocBook XSL: The Complete Guide by Bob Stayton: Program listings, Annotating program listings, Callouts.

In order to use this command, you need to:

  1. Create a programlisting containing a number of co elements. No need to specify the ID or linkends attributes for these co elements.

    Note that this command also works for any element containing area elements rather than co elements (e.g. a programlistingco).

  2. Add a calloutlist element somewhere after the programlisting. No need to specify the ID or arearefs attributes for the callout elements.

    [Important]

    Make sure to create exactly the same number of co and callout elements. This is needed because the Nth co element will be linked to the Nth callout element.

  3. Explicitly select the node range comprising both the programlisting and the calloutlist elements.

    In fact, you can explicitly or implicitly select any element containing, at any nesting level, a sequence of co or area elements followed by a sequence of callout elements. For example, if your programlisting and calloutlist elements are contained in a programlistingco element, simply click anywhere inside the programlistingco element.

  4. Select DocBookLink callouts.

  5. The following dialog box is displayed:

    Specify a prefix for the IDs which will be automatically generated for the co and the callout elements. The links (linkends and arearefs attributes) between the co and the callout elements of course need to refer to these IDs.

  6. Click OK.

Notice that the above dialog box has a "Discard existing ID and linkends/arearefs attributes" checkbox. This checkbox is needed because the "Links callouts" command has been designed to be used, not only on newly created programlisting plus calloutlist elements, but also on existing, possibly hand-written, possibly complex[2] programlisting plus calloutlist elements.

When the co and callout elements found inside the node selection are found to already have ID attributes, this checkbox is enabled and, by default, unchecked. When this is the case, running this command will affect only the newly created co and callout elements. All the existing IDs and links will be left unchanged.

Insert or Edit indexterm

If the caret is anywhere inside an indexterm element or if a single element or node is explicitly selected anywhere inside an indexterm element, this menu item displays an indexterm editor dialog box allowing to modify this indexterm element.

Otherwise, this menu item displays an indexterm editor dialog box allowing to create a new indexterm element and then to insert it at caret position.

[Tip]

If some text has been selected, field Term of the dialog box is automatically initialized with the text selection. Therefore the simplest way to create an indexterm element is first to select the term in the body of the document, then invoke Insert or Edit indexterm and finally click OK.

Move Up

Move selected element up, that is, swap it with its preceding sibling node. Requires the element to be explicitly selected.

Move Down

Move selected element down, that is, swap it with its following sibling node. Requires the element to be explicitly selected.

Promote

To make it simple, increase the level of selected subsection (e.g. a sect2 element is converted to a sect1 element).

Requires a ``subsection'' (section, sect1, sect2, sect3, sect4 or sect5) or an element which is contained in the body[3] of the section to be explicitly selected.

  • If a subsection is selected, this subsection becomes a sibling of its parent section. Example: sect2 element having id="C" is ``promoted'':

    <sect1 id="A">...
      <sect2 id="B">...
      <sect2 id="C">...
      <sect2 id="D">...

    This results in:

    <sect1 id="A">...
      <sect2 id="B">...
    <sect1 id="C">...
      <sect2 id="D">...
  • If another type of child element is selected, this element is wrapped in a newly created section which becomes a sibling of its parent section. Example: para element having id="C" is ``promoted'':

    <sect1 id="A">...
      <para id="B">...
      <para id="C">...
      <sect2 id="D">...

    This results in:

    <sect1 id="A">...
      <para id="B">...
    <sect1>...
      <para id="C">...
      <sect2 id="D">...
Demote

To make it simple, decrease the level of selected section (e.g. a sect1 element is converted to a sect2 element).

Requires a ``section'' (chapter, appendix, section, sect1, sect2, sect3 or sect4) or an element which is contained in the body[4] of the section to be explicitly selected.

  • If a section is selected and if this section is preceded by a section of the same type, this section becomes a subsection of its preceding sibling. Example: sect1 element having id="C" is ``demoted'':

    <sect1 id="A">...
      <para id="B">...
    <sect1 id="C">...
      <para id="D">...

    This results in:

    <sect1 id="A">...
      <para id="B">...
      <sect2 id="C">...
        <para id="D">...
  • If a section is selected and if this section is not preceded by a section of the same type, a new section is created and selected section becomes a subsection of this new section. Example: sect2 element having id="C" is ``demoted'':

    <sect1 id="A">...
      <para id="B">...
      <sect2 id="C">...
        <para id="D">...

    This results in:to declare the collection of DocBook documents in which olink is used for cross-referencing. How to do this is explained in next section.

    <sect1 id="A">...
      <para id="B">...
      <sect2>...
        <sect3 id="C">...
          <para id="D">...
  • If another type of child element is selected, this element and all the other ``body elements'' which follow it are wrapped in a newly created subsection. Example: para element having id="C" is ``demoted'':

    <sect1 id="A">...
      <para id="B">...
      <para id="C">...
      <para id="D">...
      <sect2 id="E">...

    This results in:

    <sect1 id="A">...
      <para id="B">...
      <sect2>...
        <para id="C">...
        <para id="D">...
      <sect2 id="E">...


[1] Note that Ctrl+V, that is, the plain EditPaste command, would not work here.

[2] For example, containing a callout element linked to several co elements. In such case, the numbering of co and callout elements done on screen by XMLmind XML Editor will not reflect what you'll get when you'll convert your document to HTML or PDF. However this limitation should not prevent you from specifying such multi-co callout elements if needed to.

[3] That is, it is not possible to ``promote'' the title of a section.

[4] That is, it is not possible to ``demote'' the title of a section.