XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Amber's article

Hi All,
I've put Bruce's changes into Amber's article. However, I think it still needs reviewing to ensure that what it says is a best practice.
 
I cannot join the meeting tomorrow because of a workshop engagement. Let me know what you decide about the article.
JoAnn
 

JoAnn T. Hackos, PhD
President
Comtech Services, Inc.
710 Kipling Street, Suite 400
Denver CO 80215
303-232-7586
joann.hackos@comtech-serv.com

 

 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<!-- Created with XMetaL (http://www.xmetal.com) -->
<concept id="concept_B53B5D0F8C8848978E10D769D3BA5696">
  <title>Keywords: why, where and when to use them</title> 
  <shortdesc>In DITA, the &lt;keyword&gt; element and the elements that are specialized from it
contain text that has a unique or key-like value.
</shortdesc> 
  <prolog> 
	 <metadata>
		<keywords><keyword>keyword</keyword><keyword>test</keyword>
		</keywords></metadata>
  </prolog><conbody><p>                    This article explains these elements in more detail and proposes guidelines for how to use them.
          </p>

  </conbody> 
  <concept id="concept_7A3F40D0B45D4C2D9BD4B58A1E01EEA0"> 
	 <title>Keywords and the &lt;keyword&gt; element </title> 
	 <shortdesc>The keyword elements that are available in DITA
cover a wide variety of situations in which
you need to introduce new terms to the reader. For these situations,
                  DITA provides a variety of specialized elements.
</shortdesc> 
	 <conbody>                                     
		<p>
                  The &lt;keyword&gt; element is used to specify
                  any of several common types of terms in DITA.
                  What do all of these elements have in common? They are elements
                  designed to contain text "that has a unique or key-like value"<fn>DITA Release
                  1.1 Language Specification , page 71</fn>
                  By "text with a unique or key-like value," we mean
                  text that has a specific purpose.
                  You designate a term as a keyword when you want to indicate
                  that the term has a special meaning.
                 </p>
<p>For example, if you consistently apply the &lt;wintitle&gt; element for                   the names of windows in the graphical user interface, you can process the
&lt;wintitle&gt; element differently from other text. If the corporate style is
                   to format window names as bold text, then you can specify that the transform apply bold styling to all &lt;wintitle&gt; elements upon processing.


</p>

<p>
                 When used in the metadata of a topic, keywords are
                 "Terms from a controlled or uncontrolled subject vocabulary that
                 apply to the topic."<fn>DITA Release 1.1 Architectural Specification</fn>
                 Whether used as metadata or in the body of a topic,
                 "the &lt;keyword&gt; element identifies a keyword or token, such as a
                   single value from an enumerated list, the name of a command or parameter,
                   product name, or a lookup key for a message."<fn>DITA Release 1.1 Language
                          Specification, page 71
                   </fn>
                 </p>
<p>The &lt;keyword&gt; element is a generic element  designed to allow easy specialization. For example, the &lt;apiname&gt;, &lt;kwd&gt;,
&lt;option&gt;, &lt;parmname&gt;, &lt;cmdname&gt;, &lt;msgnum&gt;,
&lt;varname&gt; &lt;shortcut&gt;, &lt;wintitle&gt;, and &lt;shape&gt; elements
are all specializations of the &lt;keyword&gt; element.
</p>                                                                            
</conbody> 
  </concept> 
  <concept id="concept_E62F91C620AE4C3D876E5B4D87FC7EF2"> 
	 <title>Why use keywords </title> 
	 <shortdesc>The ability to control output processing for specific types of
		text is one of the main reasons to use the &lt;keyword&gt; element. 
	 </shortdesc> 
	 <conbody> 
		<p>Another reason for specifying keywords is to aid in Web content
		  indexing and retrieval. When the DITA Open Toolkit (OT) processes DITA topics
		  and maps to XHTML, it places any &lt;keyword&gt; and &lt;indexterm&gt; elements
		  that appear in the prolog of a topic into the metadata of the generated Web page.</p> 
	 <p>However, because of abuses of Web page metadata by sites attempting to optimize their ranking in search engine results, search engines that are designed for use on the public portions of the Web tend not to trust Web page metadata.</p></conbody> 
  </concept> 
  <concept id="concept_9A141EBF45E04797BFEBF93FE08482BE"> 
	 <title>Where to use keywords </title> 
	 <shortdesc>You can include keywords in different places in DITA topics.
		This ability is useful because it gives you flexibility in applying the
		keywords; however, you need to consider where the keywords are appropriate. 
	 </shortdesc> 
	 <conbody> 
		<p>If you have a word or phrase to which you want to apply a semantic
		  identification, simply make any inline text a keyword by including the text
		  within the &lt;keyword&gt; element. The following example shows how to make
		  DITA a keyword in a sentence from DITA XML.org.
		  <codeblock>&lt;p&gt;&lt;keyword&gt;DITA&lt;/keyword&gt; builds content reuse into the authoring process, defining an 
XML architecture for designing, writing, managing, and publishing many kinds of information in print and on 
the Web.&lt;/p&gt;
</codeblock> 
		</p> 
		<p>You can also specify keywords in the prolog of a topic, which implies
		  that the keyword applies to the full topic AND it will apply to the full topic
		  in any context. The following example shows the XML markup:
		  <codeblock>&lt;prolog&gt;&lt;metadata&gt;
&lt;keywords&gt;&lt;keyword&gt;Whitepaper&lt;/keyword&gt;&lt;/keywords&gt;
&lt;/metadata&gt;&lt;/prolog&gt;
</codeblock>
		</p> 
		<note>You insert the &lt;prolog&gt; element between the closing
		  &lt;shortdesc&gt; tag and the opening tag for the topic body element.
		</note> 
		<p>If a keyword applies to a topic but only in a specific context, you
		  can specify the keywords in the DITA map. The following example shows the XML
		  markup for specifying a keyword for a topic in a map:
		  <codeblock>&lt;topicref href="Topic_a.xml"&gt;
&lt;topicmeta&gt;&lt;keywords&gt;&lt;keyword&gt;XML Whitepapers&lt;/keyword&gt;&lt;/keywords&gt;&lt;/topicmeta&gt;
&lt;/topicref&gt;
</codeblock> 
		</p> 
	 </conbody> 
  </concept> 
  <concept id="concept_83826A78D62A4A4582B32417BB623B48"> 
	 <title>When to use keywords </title> 
	 <shortdesc>There are several DITA elements that seem to serve the same or
		similar purposes. For example, when do you specify a word as an index term,
		term, phrase, or keyword? 
	 </shortdesc> 
	 <conbody> 
		<section id="section_71D4329238A243F896CA3623239D2699">
		  <title>&lt;indexterm&gt; or &lt;keyword&gt;</title>
		  <p>Although the DITA OT processes &lt;keyword&gt; and &lt;indexterm&gt;
			 elements the same way for Web content, it provides additional processing for
			 &lt;indexterm&gt; elements and compiles them into an alphabetized index for
			 print, help, or another medium that includes an index. In addition, unlike
			 &lt;keyword&gt; elements, &lt;indexterm&gt; elements do not appear in output
			 text. To illustrate the difference in the output, the example shows the
			 generated text with "DITA" as a keyword.
		  <table id="table_DCD1505C4CA2484C8755A0D360DAC133">
			 <tgroup cols="1"><colspec colnum="1" colname="col1" colwidth="*"/>
				  <tbody>
					 <row>
						<entry colname="col1">DITA builds content reuse into the
						  authoring process, defining an XML architecture for designing, writing,
						  managing, and publishing many kinds of information in print and on the Web. 
						</entry>
					 </row>
				  </tbody>
			 </tgroup>
		  </table> 
		  </p>
		  <p>In contrast, the following text shows the generated text with 
			 <codeph>&lt;indexterm&gt;DITA&lt;/indexterm&gt;</codeph>:
		  <table id="table_017760E7962B44E88CE95529EFA22DF1">
			 <tgroup cols="1"><colspec colnum="1" colname="col1" colwidth="*"/>
				  <tbody>
					 <row>
						<entry colname="col1">builds content reuse into the authoring
						  process, defining an XML architecture for designing, writing, managing, and
						  publishing many kinds of information in print and on the Web. 
						</entry>
					 </row>
				  </tbody>
			 </tgroup>
		  </table>
		  </p>
		  <p>In the second example, the word "DITA" is missing. To have a word or
			 phrase appear in the text as well as in the index, you must apply both
			 &lt;indexterm&gt; and &lt;keyword&gt;. 
			 <codeblock>&lt;indexterm&gt;DITA&lt;/indexterm&gt;&lt;keyword&gt;DITA&lt;/keyword&gt; builds content reuse
into the authoring process, defining an XML architecture for designing, writing, managing, and 
publishing many kinds of information in print and on the Web.
</codeblock>
		  </p>
		  <p>Although it looks redundant when you view the XML markup, the output
			 from the above example generates the text with "DITA" as the keyword and
			 includes "DITA" in the index.
		  </p> 
		</section> 
		<section id="section_22A8E9C9397D47EF8BC58F6B507E9953">
		  <title>&lt;term&gt; or &lt;keyword&gt;?</title>
		  <p> The important distinction to note between a keyword and a term is
			 the purpose of the text. If you are defining a term in the text, then use the
			 &lt;term&gt; element rather than &lt;keyword&gt; for the inline element. The
			 &lt;term&gt; element identifies words that may have or require extended
			 definitions or explanations." 
			 <fn>DITA Release 1.1 Language Specification, page 204. 
			 </fn> If you consistently apply the &lt;term&gt; element when you are
			 defining words or phrases, you can easily format the text according to your
			 corporate style, such as formatting terms in text with italics.
		  </p> 
		</section> 
		<section id="section_C7DBE4A9C3014B3F9F865A5CEF75799C">
		  <title>&lt;phrase&gt; or &lt;keyword&gt;?</title>
		  <p>The &lt;phrase&gt; and &lt;keyword&gt; elements are valid in almost
			 all of the same places in DITA topics, but they are not interchangeable. The
			 primary difference is the purpose of the elements. If you want to classify text
			 as semantically important, use the &lt;keyword&gt; element. If you simply want
			 to encapsulate text in a generic element for reuse or conditional processing,
			 then use the &lt;phrase&gt; element. 
		  </p>
		  <p>For example, if you want to reuse a word, but it does not have
			 semantic meaning, you can apply the &lt;phrase&gt; element, assign an ID to the
			 &lt;phrase&gt; element, and then reference the ID using the conref attribute.
			 Granted, you can achieve the same outcome with the &lt;keyword&gt; element, but
			 the DITA OT also processes the &lt;keyword&gt; element for the Web metadata. 
		  </p>
		  <p>Another point to note is that the default .css that ships with the
			 DITA OT applies the bold style to keywords. Of course, you can override this
			 formatting with your own .css.
		  </p>
		</section> 
	 </conbody> 
  </concept> 
  <concept id="concept_D2D8A0776059431D95FD808096619977"> 
	 <title>Summary</title> 
	 <shortdesc>The rule when applying elements is to apply the element that
		provides the minimum processing that you need. If you do not need the semantic
		processing that the &lt;keyword&gt; element provides, do not use it; rather,
		use the element that provides the appropriate processing power and output.
	 </shortdesc> 
	 <conbody> 
		<p>If you are generating XHTML for Web output or need to identify text
		  with semantic distinction, then the &lt;keyword&gt; element provides value. In
		  many other cases, you can achieve the desired resulting processing and output
		  with other elements.
		</p> 
	 </conbody> 
  </concept> 
</concept> <?Pub *0000009820 0?>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2006 XML.org. This site is hosted by OASIS