<?xml version="1.0" encoding="UTF-8"?>
<!--Arbortext, Inc., 1988-2010, v.4002-->
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
 "task.dtd">
<task id="mapref" xml:lang="en-us">
<title>Mapref</title>
<shortdesc>Mapref refers to a special usage of the <tt>&lt;topicref&gt;</tt> 
    element as a reference to another ditamap file. This allows you
to manage      the overall ditamap file more easily. A large ditamap
file can thus be      broken down into several ditamap files, making
it easier for the user to      manage the overall logical structure.
This mechanism also increases the reusability of those ditamap files.</shortdesc>
<taskbody>
<context>You can create references to another ditamap file by setting
the format attribute to "ditamap" as follows.<note>This usage is often
referred to as <codeph>mapref</codeph>. A new <codeph>mapref</codeph> element
is defined in DITA 1.2, which provides a shortcut for this function
by defaulting the format attribute to "ditamap". However, any topicref
or topicref specialization may do the same thing by setting the format
attribute as described.</note></context>
<steps>
<step><cmd>Add a <tt>&lt;topicref&gt;</tt> element to your map.</cmd>
</step>
<step><cmd>Define the location of the target ditamap file in the href
attribute. The href takes a standard URI format. Typically it is a
relative path to the ditamap. </cmd></step>
<step><cmd>Set format="ditamap".</cmd></step>
<step importance="optional"><cmd>Add a navigation title in the navtitle
attribute. </cmd><info>The navtitle attribute on a map reference is
not used for anything during DITA-OT processing, but is helpful when
authoring.</info></step>
</steps>
<example>       <p>For example, if you want to create a reference
to the          <i>samples/mysamp.ditamap</i> file using <tt>sample
ditamap</tt> as the          navigation title, add the following codes
into the          <i>readme.ditamap</i> file.</p><p>         <codeblock>&lt;topicref format="ditamap" href="samples/mysample.ditamap" navtitle="sample ditamap"&gt; </codeblock> 
     </p>       <p>Now the complete content of the <i>readme.ditamap</i> file
is shown as follows.         <codeblock>
&lt;?xml version="1.0" encoding="utf-8"?&gt;           
&lt;!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd"&gt;
&lt;map id="mainDITAreadme" title="DITA Readme map"&gt;
  &lt;topicref collection-type="family" href="DITA-readme.xml" id="DITA-doc" 
           locktitle="yes" navtitle="DITA-OT Introduction"&gt; 
    &lt;topicref href="DITA-changes.xml" navtitle="DITA release history"/&gt;
    &lt;topicref format="ditamap" href="samples/mysample.ditamap" navtitle="sample ditamap"/&gt;
  &lt;/topicref&gt;
&lt;/map&gt; 
        </codeblock>       </p>       <p>Assume the file <i>samples/mysample.ditamap</i> is
defined as follows:<codeblock>
&lt;?xml version="1.0" encoding="utf-8"?&gt; 
&lt;!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd"&gt; 
&lt;map id="samplemap" title="Sample Ditamap"&gt; 
  &lt;topicref href="..\DITA-relnotes.xml" navtitle="DITA OT Release notes"/&gt;
  &lt;topicref href="..\DITA-installation.xml" navtitle="Installation"/&gt;
&lt;/map&gt; 
        </codeblock><?Pub Caret 301?>       </p><p>The <i>readme.ditamap</i> file
can be equivalently expressed by the following map:</p><p>       
 <codeblock>
&lt;?xml version="1.0" encoding="utf-8"?&gt; 
&lt;!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd"&gt; 
&lt;map id="mainDITAreadme" title="DITA Readme map"&gt; 
  &lt;topicref collection-type="family" href="DITA-readme.xml" 
           id="DITA-doc" locktitle="yes" navtitle="DITA-OT Introduction"&gt;
    &lt;topicref href="DITA-changes.xml" navtitle="DITA release history"/&gt; 
    &lt;topicref href="DITA-relnotes.xml" navtitle="DITA OT Release notes"/&gt; 
    &lt;topicref href="DITA-installation.xml" navtitle="Installation"/&gt;
  &lt;/topicref&gt; 
&lt;/map&gt; 
        </codeblock></p></example>
</taskbody>
</task>
<?Pub *0000003985?>
