6. Tools menu

Use as Master Document

This checkbox may be absent in the Tools menu. If this is the case, you need to explicitly enable it by checking "Enable the 'Tools|Use as Master Document' menu item" in OptionsPreferences, General|Features section.

The following documents may be used as master documents: DITA map, DocBook 5.1 assembly, Ebook, DocBook modular documents (for example, a book including chapters by the means of XInclude).

Declaring a document as being a master document creates a document set containing the master document and its module document. This document set is automatically updated when the master document is saved to disk.

By grouping a master document and its module documents, you inform XMLmind XML Editor (XXE) that all the module documents referenced or included, directly or indirectly, by the master document are related. When XXE knows that some of the opened documents are related:

  • it will more thoroughly check the cross-references which may exist between these documents;

  • it will make it easier creating cross-references between these documents;

  • it will make it easier following cross-references between these documents;

  • if a DITA map contains key definitions, then this map acts not only as a cross-reference creation/validation context for its topics, but it also acts as a key space;

  • if the "Easy Profiling" add-on has been installed, then the conditional processing profile selected for the master document is automatically shared by all module documents;

  • if the document view area is split in two parts, the module documents opened from a master document will appear at the opposite of this master document. This allows to use the view of the master document as a rudimentary navigation pane.

The list of master documents is persistent across editing sessions.

[Note]Automatic master documents

Note that, by default, DITA maps, DocBook 5.1 assemblies and Ebooks (that is, all kinds of maps) are automatically made master documents.

If for some maps, you don't want this to happen, simply uncheck "ToolsUse as Master Document". When this is done, the map is added to the list of exceptions called "Should NOT be automatically made master documents". See Section 6.8.1, “Master document options”.

Example 3.3. Example explaining the enhanced cross-reference creation/validation provided by a master document

Modular book mybook.xml includes 3 chapters. Each chapter is found in its own file: chapterA.xml, chapterB.xml and chapterC.xml.

File chapterA.xml contains:

<chapter id="chapterA">
  <title>Chapter A</title>

  <para>Link to <link linkend="nowhere">nowhere</link>. Link to <link
  linkend="sectionB1">Section B1</link>.</para>

  <section id="sectionA1">
    <title>Section A1</title>

    <para>TODO.</para>
  </section>

  <section id="sectionA2">
    <title>Section A2</title>

    <para>TODO.</para>
  </section>
</chapter>

In the above file, the first link element points to a non-existent target and the second link points to the first section of chapterB.xml.

The user wants to check the links found in chapterA.xml and also to add an xref element pointing to the first section of chapterC.xml. In order to do that, she/he opens chapterA.xml in XXE.

Before using mybook.xml as a master document:

  • The Validity tool reports 2 cross-reference warnings: reference to non-existent ID "nowhere" and reference to non-existent ID "sectionB1".

  • When the user inserts an xref element and specifies its linkend attribute, the Attributes tool suggests: chapterA, sectionA1, sectionA2.

After using mybook.xml as a master document:

  • The Validity tool reports 1 cross-reference warning: reference to non-existent ID "nowhere".

  • When the user inserts an xref element and specifies its linkend attribute, the Attributes tool suggests: chapterA, sectionA1, sectionA2, chapterB, sectionB1, sectionB2, chapterC, sectionC1, sectionC2.

Declare Namespace

Displays Declare Namespace dialog box.

If the current document is conforming to a DTD, the dialog box allows to view the namespaces and their prefixes but not to modify them.

Edit Attribute

Displays Attributes tool.

Check Validity

Displays Validity tool, unless no validity errors are found in current document, in which case an OK message is displayed in the status bar.

This command is disabled if current document is not constrained by a grammar.

[Tip]

Current document validity is automatically checked each time the document is saved, therefore unless you are fixing an invalid document you don't really need to explicitly use this command.

Execute Command

For advanced users only. Displays a dialog box which allows to choose a command by name. This is needed when a command is not bound to a keystroke, menu item or tool bar button. Example: command convertCase (see Section 15, “convertCase” in XMLmind XML Editor - Commands). This facility is especially useful when recording a macro-command.

This menu item is hidden by default. You need to enable it by checking "Enable the 'Tools|Record Macro' Submenu" in OptionsPreferences, General|Features section.