Collapse AllExpand All

8.3. The "Document Set" tool

As you can see it in the 3 above screenshots, a document set is represented by a special tool added to the left of XXE's main window: the "Document Set" tool. Each instance of this tool is given a specific, random, background color. This specific background color is also given to the tabs of all the opened documents which are members of the set.

As you will see it in next section, the "Document Set" tool is a convenient, interactive, navigational tool. However the most important part of its job is done behind the scene, because opening a document set in XXE automatically modifies the behavior of the Validity tool and the Attributes tool[17]:

  • The diagnostics issued by the Validity tool about cross-reference errors will take into account the fact that the document being checked is a member of a set.

  • The target of a link is almost always specified as an attribute value (XHTML example: the href attribute of the a element). That's why the Attributes tool, through its auto-completion feature, will suggest, not only link targets found within the document being edited, but also link targets found in the other members of the set.

Example 7.2. A simple use case

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 opening mybook.xml as a document set:

  • 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 opening mybook.xml as a document set:

  • 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.




[17] More precisely, the opened document set is used as a context by the linkType in XMLmind XML Editor - Configuration and Deployment and the attributeEditor in XMLmind XML Editor - Configuration and Deployment configuration elements introduced by XMLmind XML Editor v4.9.