<?xml version='1.0' encoding='UTF-8'?>
<!-- This file is part of the DITA Open Toolkit project hosted on 
  Sourceforge.net. See the accompanying license.txt file for 
  applicable licenses.-->
<!-- (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved. -->

<!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<dita>
  <topic id="dita-mapdomains">
    <title>How to define a formal information architecture with DITA map domains</title>
    <shortdesc>The benefits of formal information typing are well known for the content of topics, but collections of topics also benefit from formal organizing structure. Such formal structures guide authors while they assemble collections of topics and ensure consistent large-scale patterns of information for the user. Using DITA map domains, a designer can define a formal information architecture that can be reused in many deliverables. </shortdesc>
    <body>
      <p>This article explains the design technique for creating DITA map domains. As an example, the article walks through the definition for assembling a set of topics as a how-to. Such a how-to could be one reusable design component within an information architecture.</p>
    </body>
    <concept id="informationArchitecture">
      <title>Formal information architecture</title>
      <conbody>
        <p>Information architecture can be summarized as the design discipline that organizes information and its navigation so an audience can acquire knowledge easily and efficiently. For instance, the information architecture of a web site often provides a hierarchy of web pages for drilling down from general to detailed information, different types of web pages for different purposes such as news and documentation, and so on. </p>
        <p>An information architecture is subliminal when it works well. The lack of information architecture is glaring when it works poorly. The user cannot find information or, even worse, cannot recognize or assimilate information when by chance it is encountered. You probably have experience with websites that are poorly organized or uneven in their approach, so that conventions learned in part of the website have no application elsewhere. Extracting knowledge from such information resources is exhausting, and you quickly abandon the effort and seek the information elsewhere.</p>
        <p>Currently, information architects work by defining the architecture through guidelines and instructions to the writer. A better approach is to formalize the architecture through an XML design that is validated by the XML editor or parser. This formal approach has the following benefits:</p>
        <ul>
          <li>Authors receive guidance from the markup while working.</li>
          <li>Information with the same purpose is consistent across deliverables.</li>
          <li>Information for a purpose is complete.</li>
          <li>Processing can rely on the structure of the information and operate on the declared semantics of the information.</li>
        </ul>
        <p>The following drawings illustrate the gain in clarity and consistency by applying a design to produce a formal information architecture:</p>
        <table frame="none">
          <tgroup cols="3">
            <thead>
              <row>
                <entry>Casual architecture</entry>
                <entry>Applied design</entry>
                <entry>Formal architecture</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry>
                  <image href="image/infoarch1.gif" alt="Topics in any arrangement" height="185" width="180" placement="inline"/>
                </entry>
                <entry>
                  <image href="image/infoarch2.gif" alt="Topic collection type" height="65" width="124" placement="inline"/>
                </entry>
                <entry>
                  <image href="image/infoarch3.gif" alt="Topics in formal arrangement" height="162" width="156" placement="inline"/>
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <p>In short, the formal design acts as a kind of blueprint to be fullfilled by the writer. </p>
      </conbody>
    </concept>
    <concept id="mapBackground">
      <title>Specializing topics and maps</title>
      <conbody>
        <p>DITA supports the definition of a formal information architecture through topics and map types. The topic type defines the information architecture within topics (the micro level) while the map type defines the information architecture across topics (the macro level).</p>
        <p>The base topic and map types are general and flexible so they can accomodate a wide variety of readable information. You specialize these general types to define the restricted types required for your information architecture. </p>
        <dl>
          <dlentry>
            <dt>Topic</dt>
            <dd>The topic type mandates the structure for the content of a topic. For instance, the DITA distribution includes a task type that mandates a list of steps as part of the topic content. This specialized topic type provides guidance to the author and ensures the consistency of all task topics. Processing can rely on this consistency and semantic precision. For instance, the processing for the task type could format the task steps as checkable boxes.</dd>
          </dlentry>
          <dlentry>
            <dt>Map</dt>
            <dd>The map type mandates the structure for a collection of topics. A map can define the navigation hierarchy for a help system or the sequence and nesting of topics in a book. For instance, the DITA distribution includes a bookmap demo that mandates a sequence of preface, chapter, and appendix roles for the top-level topics. This specialized map type ensures that the collection of topics conforms to a basic book structure.</dd>
          </dlentry>
        </dl>
        <p>Without formal types, the information architecture is defined only through editorial guidelines. Different authors may interpret or conform to the guidelines in varying degrees, resulting in inconsistency and impredictability. By contrast, the formal types ensure that the design that can be repeated for many deliverables. </p>
      </conbody>
    </concept>
    <concept id="formalCollection">
      <title>The how-to collection</title>
      <conbody>
        <p>One typical purpose for a collection of topics is explain how to accomplish a specific goal. A how-to assembles the relevant topics and arranges them in a typical sequence for one way to reach that goal. A standard design pattern for the how-to collection might consist of an introduction topic, some background concepts, some task and example topics, and a summary. </p>
        <p>A help system or book might have several how-tos, for instance, on setting up web authentication, reading a database from a web application, and so on. Or, a web provider might publish an ongoing series of how-to articles on technical subjects. Thus, designing a formal how-to pattern would be useful so that all how-tos are consistent regardless of the writer.</p>
        <p>Note that formalizing a collection doesn&apos;t prevent topic reuse but, instead, guides topic reuse so that appropriate types of topics are used at positions within the collection. For example, in the how-to, concept topics will appear only as background before the tasks rather than in the middle of the how-to.</p>
      </conbody>
    </concept>
    <concept id="mapSpecialization">
      <title>Map specialization</title>
      <conbody>
        <p>Among the many capabilities added to maps by DITA 1.3 is specialization through map domains. Instead of packaging specializations of elements for topic content, however, you specialize elements for map content, typically the<codeph>topicref</codeph>. The specialized <codeph>topicref</codeph>element lets authors specify semantics or constraints on collections of topics. By packaging the <codeph>topicref</codeph> specializations as a map domain rather than as a map type, you can reuse the formal collection design in many different map types.</p>
        <p>A specialized <codeph>topicref</codeph>can be used for the following purposes:</p>
        <ul>
          <li>To restrict the references to topics of a specialized type. For instance, a <codeph>conceptref</codeph> refers only to concept topics (including specialized concepts).</li>
          <li>To assign a topic a topic to a role within a collection. For instance, the topic identified by a <codeph>summaryref</codeph> could provide the concluding explanation for a collection.</li>
          <li>To restrict the contents of the collection, requiring specific topic types or requiring topics to act in specific roles at specified positions within the collection. </li>
        </ul>
        <p>Drawing on all of these capabilities, we can define a formal structure for a how-to collection. </p>
      </conbody>
    </concept>
    <task id="implementDomain">
      <title>Implementing a map domain</title>
      <taskbody>
        <context>
          <p>A map domain uses the same DTD design pattern as a topic domain. See <xref href="http://www-106.ibm.com/developerworks/xml/library/x-dita5/index.html" format="html" class="- topic/xref ">specializing domains</xref> for the details on the domain design pattern, which aren&apos;t repeated here. Instead, this article summarizes the application of the domain DTD design pattern to maps.</p>
        </context>
        <steps>
          <step>
            <cmd>Create a domain entities file to declare the elements extending the <codeph>topicref</codeph> element.</cmd>
          </step>
          <step>
            <cmd>Create a domain definition module to define the elements including their element entities, content and attribute definitions, and the architectural class attribute.</cmd>
          </step>
          <step>
            <cmd>Create a shell DTD that assembles the base map module and the domain entities file and definition module.</cmd>
          </step>
          <step>
            <cmd>Create map collections from the shell DTD. </cmd>
          </step>
        </steps>
      </taskbody>
    </task>
    <topic id="declareEntities">
      <title>Declaring the map domain entities</title>
      <body>
        <p>The entities file for the how-to domain defines the howto, conceptref, taskref, and exampleref extensions for the topicref element and defines the how-to domain declaration for the domain attributes entity:</p>
        <codeblock>&lt;!ENTITY % howto-d-topicref &quot;howto&quot;&gt;
&lt;!ENTITY howto-d-att &quot;(map howto-d)&quot;&gt;</codeblock>
      </body>
    </topic>
    <topic id="domainModule">
      <title>Defining the map domain module</title>
      <body>
        <p>The definition module for the how-to domain starts with the element entities so the new elements could, in turn, be extended by subsequent specializations. Of these new elements, only <codeph>howto</codeph> has been declared in the entities file because the other new elements should only appear in the child list of the <codeph>howto</codeph> element. (In fact, reference typing elements such as <codeph>conceptref</codeph> and <codeph>taskref</codeph> might also be defined in the entities file for reuse in other specialized child lists.)</p>
        <codeblock>&lt;!ENTITY % howto       &quot;howto&quot;&gt;
&lt;!ENTITY % conceptref  &quot;conceptref&quot;&gt;
&lt;!ENTITY % taskref     &quot;taskref&quot;&gt;
&lt;!ENTITY % exampleref  &quot;exampleref&quot;&gt;
&lt;!ENTITY % summaryref  &quot;summaryref&quot;&gt;</codeblock>
        <p>The definition module goes on to define the elements. The definition for the <codeph>howto</codeph> element restricts the content list for the collection to the metadata for the topic, references to any number of concept topics, references to task topics and optional example topics, and a topic acting in the role of a concluding summary. In addition, the <codeph>howto</codeph> element refers to the topic that provides an overview of the contents.</p>
        <codeblock>&lt;!ELEMENT howto ((%topicmeta;)?, (%conceptref;)*, ((%taskref;), (%exampleref;)?)+,
      (%summaryref;))&gt;
&lt;!ATTLIST howto
  navtitle     CDATA     #IMPLIED
  id           ID        #IMPLIED
  href         CDATA     #IMPLIED
  keyref       CDATA     #IMPLIED
  query        CDATA     #IMPLIED
  conref       CDATA     #IMPLIED
  copy-to      CDATA     #IMPLIED
  %topicref-atts;
  %select-atts;&gt;</codeblock>
        <p>The <codeph>conceptref</codeph> and <codeph>taskref</codeph> elements have a restricted type, meaning that validating processing is obligated to report an error if the referenced topic doesn&apos;t have the declared type (or a specialization from the declared type):</p>
        <codeblock>&lt;!ELEMENT conceptref ((%topicmeta;)?, (%conceptref;)*)&gt;
&lt;!ATTLIST conceptref
  href         CDATA     #IMPLIED
  type         CDATA     &quot;concept&quot;
  ...&gt;
&lt;!ELEMENT taskref    ((%topicmeta;)?, (%taskref;)*)&gt;
&lt;!ATTLIST taskref
  href         CDATA     #IMPLIED
  type         CDATA     &quot;task&quot;
  ...&gt;</codeblock>
        <p>The <codeph>exampleref</codeph> and <codeph>summaryref</codeph> elements don&apos;t restrict the type but, instead, assign roles to the referenced topics. Because the content list of the <codeph>howto</codeph> collection topic allows a topic to act as an example and requires a topic to act as a summary, the author is prompted to create topics in those roles, and the roles can be used in processing, for instance, to add a lead-in word to the emitted topic titles.</p>
        <codeblock>&lt;!ELEMENT exampleref  ((%topicmeta;)?, (%exampleref;)*)&gt;
&lt;!ATTLIST exampleref
  ...&gt;
&lt;!ELEMENT summaryref  ((%topicmeta;)?)&gt;
&lt;!ATTLIST summaryref
  ...&gt;</codeblock>
        <p>On closer investigation, either or both of these particular roles may turn out to reflect a persistent topic structure or semantic, in which case it would be appropriate to define topic types and limit the corresponding <codeph>topicref</codeph> specialization to topics of those types. The general technique, however, of assigning a role to a topic in the context of a collection remains valid.</p>
        <p>Finally, the definition module sets the class attribute to declare that the new elements derive from <codeph>topicref</codeph> and are provided by the howto package:</p>
        <codeblock>&lt;!ATTLIST howto %global-atts;
    class CDATA &quot;- map/topicref howto/howto &quot;&gt;
&lt;!ATTLIST conceptref %global-atts;
    class CDATA &quot;- map/topicref howto/conceptref &quot;&gt;
...</codeblock>
      </body>
    </topic>
    <topic id="assembleDTD">
      <title>Assembling the shell DTD</title>
      <body>
        <p>As with topic domains, a shell DTD assembles the base map module with the entities file and definition module for the how-to domain:</p>
        <codeblock>&lt;!--vocabulary declarations--&gt;
&lt;!ENTITY % howto-d-dec PUBLIC &quot;-//IBM//ENTITIES DITA How To Map Domain//EN&quot; &quot;howto.ent&quot;&gt;
  %howto-d-dec;
...

&lt;!--vocabulary substitution (one for each extended base element,
    with the names of the domains in which the extension was declared)--&gt;
&lt;!ENTITY % topicref  &quot;topicref | %mapgroup-d-topicref; | %howto-d-topicref;&quot;&gt;

&lt;!--vocabulary attributes (must be declared ahead of the default definition) --&gt;
&lt;!ENTITY included-domains &quot;&amp;mapgroup-d-att; &amp;howto-d-att;&quot;&gt;

&lt;!--Embed map to get generic elements --&gt;
&lt;!ENTITY % map-type PUBLIC &quot;-//IBM//Elements DITA Map//EN&quot; &quot;../../dtd/map.mod&quot;&gt;
  %map-type;

&lt;!--vocabulary definitions--&gt;
...

&lt;!ENTITY % howto-d-def PUBLIC &quot;-//IBM//ELEMENTS DITA How To Map Domain//EN&quot; &quot;howto.mod&quot;&gt;
  %howto-d-def;</codeblock>
      </body>
    </topic>
    <topic id="domainInstance">
      <title>Creating a collection with the domain</title>
      <body>
        <p>Using the shell DTD, a map could include one or more how-to collections, as in the following example: </p>
        <codeblock>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!DOCTYPE map PUBLIC &quot;-//IBM//DTD DITA How To Map//EN&quot;
  &quot;howtomap.dtd&quot;&gt;
&lt;map&gt;
  &lt;!-- how-to clusters can appear anywhere in a map hierarchy but always
       follow a consistent information pattern within the how to --&gt;
  &lt;howto href=&quot;dita-mapdomains.xml&quot;&gt;
    &lt;conceptref href=&quot;informationArchitecture.xml&quot;/&gt;
    &lt;conceptref href=&quot;mapBackground.xml&quot;/&gt;
    &lt;conceptref href=&quot;formalCollection.xml&quot;/&gt;
    &lt;conceptref href=&quot;mapSpecialization.xml&quot;/&gt;
    &lt;taskref href=&quot;implementDomain.xml&quot;/&gt;
    &lt;exampleref href=&quot;declareEntities.xml&quot;/&gt;
    &lt;exampleref href=&quot;domainModule.xml&quot;/&gt;
    &lt;exampleref href=&quot;assembleDTD.xml&quot;/&gt;
    &lt;exampleref href=&quot;domainInstance.xml&quot;/&gt;
    &lt;summaryref href=&quot;summary.xml&quot;/&gt;
  &lt;/howto&gt;
&lt;/map&gt;</codeblock>
        <p>In fact, this example is the map for the article that you&apos;re reading right now. That is, as you may well have noticed, this article conforms to the formal pattern for a how-to collection. Here&apos;s the list of topics in this how-to article but with the addition of the topic type or role and title:</p>
        <ul>
          <li>howto: How to define a formal information architecture with DITA map domains<ul>
              <li>concept: Formal information architecture</li>
              <li>concept: Specializing topics and maps</li>
              <li>concept: The how-to collection</li>
              <li>concept: Map specialization</li>
              <li>task: Implementing a map domain</li>
              <li>example: Declaring the map domain entities</li>
              <li>example: Defining the map domain module</li>
              <li>example: Assembling the shell DTD</li>
              <li>example: Creating a collection with the domain (this topic)</li>
              <li>summary: Summary</li>
            </ul></li>
        </ul>
        <p>While this article contains only a how-to collection, a how-to collection could be part of a larger deliverable. For instance, a help system could include multiple how-tos as part of a navigation hierarchy. Similarly, how-to collections could be used in books by creating a new shell DTD that combines the bookmap map type with the how-to map domain.</p>
        <p>As you explore collection types, you&apos;ll find that, in addition to topics, a collection can aggregate smaller collections. For instance, you could create domains for a how-to collection, a case study collection, and a reference set collection. A product information collection could then require a product summary topic and at least one of each of these subordinate collections in that order.</p>
        <p>You&apos;ll also find that, to represent a high-level relationship with a collection, you can create a relationship to the root topic for the collection branch. As the introduction and entry point for the collection, the root topic should provide the most statement of the content of the collection. That is, you can treat the set of topics as a collective content object, using the root topic to represent the collection as a whole for navigation and cross references. </p>
      </body>
    </topic>
    <topic id="summary">
      <title>Summary</title>
      <body>
        <p>In this article, you&apos;ve learned how to specialize the <codeph>topicref</codeph> element to mandate a specific collection of topics. For complete, single-purpose collections such as functional specifications and quick reference guides, you might package these specialized <codeph>topicref</codeph> elements with a new map type. For building-block collections (such as how-tos or case studies) that can appear within a large deliverable, especially when different designers might create different collection types, you might want to package the specialized <codeph>topicref</codeph> elements as a map domain.</p>
        <p>By specializing a DITA map in this way, you can implement a formal information architecture not just at the micro level within topics but at the macro level across topics. By defining such large-scale collective content objects, you can provide guidance to authors and declare semantics for processors with the end result that users have consistent and complete information deliverables. </p>
      </body>
    </topic>
  </topic>
</dita>

