keywords within keywords

Post here questions and problems related to editing and publishing DITA content.
nam
Posts: 18
Joined: Fri Apr 21, 2006 12:41 am

keywords within keywords

Post by nam »

I am trying to redevelop our technical documentation out of Word and into DITA. But I just ran into a brick wall - a tall one at that.

Like most technical documentation, our's is riddled with acronyms - acronyms that change on the boss' whim. So my document title might be: "CMES-BCA FN110: NCM Search Window" today, but "CMES Function110: EPM Search" tomorrow.

Well the whole thing is the title of a document, and I'd like it to be a keyword so it can be inserted into a title element. But "CMES-BCA" is a keyword, as is "FN110", as is "NCM", as is "Search Window". Ideally I would like to string them all together in my keyword DITA map under the keyword "doctitle", but that won't fly. I can't do

Code: Select all

<keydef keys="doctitle">
<topicmeta>
<keywords>
<keyword>text <keyword keyref="otherkw" /> more text <keyword keyref="anotherkw" /></keyword>
<keywords>
</topicmeta>
</keydef>
and since I am using templates for the main topics, I don't want to have to customize the template for each document. (We are expecting to have to do 640+ of this one type of document.)

I have the document project structured with chapter templates in one location, system level keywords in another, and document level keywords and concepts in a third. But my document specific keywords file is filled with acronyms that should be and are system level keywords which are located in the system keywords DITAMAP. Reuse and content insertion does me no good if I still have to go through the document level XML and manually find and replace these values. The whole reason for going to DITA in the first place is to NOT have to do that.

Of course I can insert keywords into concept file elements. But I cannot insert concept elements into titles or the middle of paragraphs. Sometimes you just need a keyword.

I have been looking all over for a way to do this but cannot find what I am looking for. I cannot be the first to run into this problem. What is the industry standard for this kind of thing?

Thanks in advance for your help.
Neil in Washington
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: keywords within keywords

Post by Radu »

Hi Neil,

The problem is that the <keyword> element only allows <text> and <tm> as child elements. <text> does not allow setting the @keyref attribute on it.

Maybe you should also ask advice about this on the DITA Users List and give a more detailed description of your use case:

http://groups.yahoo.com/neo/groups/dita-users/info

So far my only suggestion for this would be for you to use conkeyref instead.
Basically you would have a topic or concept keywords.dita with the content:

Code: Select all

<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="conceptID">
<title>Concept title</title>
<shortdesc></shortdesc>
<conbody>
<p>
<keyword id="doctitle">text <text conref="#conceptID/otherKWText" /> more text <text conref="#conceptID/anotherKWText"/></keyword>
<keyword id="otherKW"><text id="otherKWText"> other kw</text></keyword>
<keyword id="anotherKW"><text id="anotherKWText"> another kw</text></keyword>
</p>
</conbody>
</concept>
Then the DITA Map would reference it like:

Code: Select all

<keydef keys="keywords" href="keywords.dita"/>
And from the other topics it would be used something like:

Code: Select all

<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "http://docs.oasis-open.org/dita/v1.1/OS/dtd/topic.dtd">
<topic id="care">
<title>Care and Preparation<keyword conkeyref="keywords/doctitle"/></title>
.............
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
nam
Posts: 18
Joined: Fri Apr 21, 2006 12:41 am

Re: keywords within keywords

Post by nam »

Thanks Radu.

What you have shown me here is different from what I have been doing. It's a great clue though, and I will spend some time studying/experimenting with it.

Thanks again.
Neil in Washington
Post Reply