concept.dita
This is a simple topic referencing information about a conference via key.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> <concept id="keyscope-concept"> <title>Concept with Keyrefs (<ph keyref="conferenceName"/>)</title> <conbody> <p>Conference name: <ph keyref="conferenceName"/></p> <p>Hotel link: <xref keyref="hotel"/></p> <p>Hotel image: <image keyref="hotelImage"/></p> </conbody> </concept>
map.ditamap
This is the DITA 1.2 version of the map, without key scopes. Both references to the topic will render identically.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd"> <map> <title>Map Without Key Scopes</title> <topicgroup> <keydef keys="conferenceName"> <topicmeta> <keywords> <keyword>DITA North America 2014</keyword> </keywords> </topicmeta> </keydef> <keydef keys="hotel" href="http://www.westinseattle.com/" scope="external"> <topicmeta> <linktext>Westin Seattle</linktext> </topicmeta> </keydef> <keydef keys="hotelImage" href="images/westin.jpg" format="jpg"/> <topicref href="concept.dita"/> </topicgroup> <topicgroup> <keydef keys="conferenceName"> <topicmeta> <keywords> <keyword>DITA North America 2015</keyword> </keywords> </topicmeta> </keydef> <keydef keys="hotel" href="http://mccormickplace.hyatt.com/en/hotel/home.html" scope="external"> <topicmeta> <linktext>Hyatt Regency McCormick Place</linktext> </topicmeta> </keydef> <keydef keys="hotelImage" href="images/hyatt.jpg" format="jpg"/> <topicref href="concept.dita"/> </topicgroup> <topicref href="source.dita"/> </map>
map-with-keyscopes.ditamap
This map is identical to
map.ditamap
except that it
specifies key scopes. Thus each reference to the
topic will look very different in resolved
output.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd"> <map> <title>Map with Key Scopes</title> <topicgroup keyscope="dita-na-2014"> <keydef keys="conferenceName"> <topicmeta> <keywords> <keyword>DITA North America 2014</keyword> </keywords> </topicmeta> </keydef> <keydef keys="hotel" href="http://www.westinseattle.com/" scope="external"> <topicmeta> <linktext>Westin Seattle</linktext> </topicmeta> </keydef> <keydef keys="hotelImage" href="images/westin.jpg" format="jpg"/> <topicref href="concept.dita"/> </topicgroup> <topicgroup keyscope="dita-na-2015"> <keydef keys="conferenceName"> <topicmeta> <keywords> <keyword>DITA North America 2015</keyword> </keywords> </topicmeta> </keydef> <keydef keys="hotel" href="http://mccormickplace.hyatt.com/en/hotel/home.html" scope="external"> <topicmeta> <linktext>Hyatt Regency McCormick Place</linktext> </topicmeta> </keydef> <keydef keys="hotelImage" href="images/hyatt.jpg" format="jpg"/> <topicref href="concept.dita"/> </topicgroup> <topicref href="source.dita"/> </map>