Hi, Aaron.
If I understand correctly, your requirements are as
follows:
Requirements
You want to author a single DITA task topic that
you can use to generate two versions of output:
- Creating a checking account
- Creating a savings account
The content in the task topic has the following
variations:
- Type of account (checking versus savings)
- Wording in the user interface, leading to
different screen captures
DITA mechanisms for handling
content reuse
DITA has multiple mechanisms for handling content
reuse:
- Content referencing (@conref)
- Conditional processing using a DITAVAL file
- Key referencing (@keyref)
- Content key referencing (@conkeyref)
- Key scopes
- Branch filtering (using the DITAVALref domain)
Branch filtering and key scopes were designed to
address the use case of using DITA topics multiple
times within a single publication, with different
content in the generated output of the topics. (You
don't mention this, but I suspect this is what you
want to do.)
Information architecture choices
Getting ROI from DITA always requires sound
information design and architecture. Here, I would
ask the following questions:
- Do you really need two generated topics? Could
this be handled with a single topic ("Creating an
account") which could cover both scenarios?
- Do you need a DITA topic for each scenario? This
might be the case if you have elaborate metadata
requirements or other business requirements.
- Will you be localizing (translating) the DITA
source? Remember that inflection in non-English
languages can cause differences in articles
For the purpose of this exercise, we will assume
that you want to author a single DITA topic that can
be used to generate two versions of output (and you
are not worried about localization). For this goal,
you could use either key referencing or conditional
processing; I'll show how this can be done using key
references.
Reuse using key referencing
Author the content using the following markup
for keywords and images:
- <keyword keyref="accountType"/>
- <image keyref="creatingAccount"/>
In a DITA map, create the following key
definitions:
<keydef keys="accountType">
<topicmeta>
<linktext>checking</linktext>
</topicmeta>
</keydef>
<keydef keys="creatingAccount"
href="creatingCheckingAccount.png" format="png">
<topicmeta>
<linktext>Alternate text for the image
goes here</linktext>
</topicmeta>
</keydef>
Obviously, you'd need to modify the key definitions
when you process to generate the "Creating a savings
account" output.
Reuse using key references and
key scopes
If you want both versions of the topics
("Creating a checking account" and "Creating a
savings account" in the same publication,
you'll need to use key scopes.
Author the content using the (same as above) markup
for keywords and images:
- <keyword keyref="accountType"/>
- <image keyref="creatingAccount"/>
In the DITA map where you create the publication
navigation, you'll also define key scopes and
specify the values for the key references:
<!-- Generate output for "Creating a
checking account" -->
<topicgroup keyscope="checkingAccount">
<keydef keys="accountType">
<topicmeta>
<linktext>checking</linktext>
</topicmeta>
</keydef>
<keydef keys="creatingAccount"
format="png" href="creatingCheckingAccount.png">
<topicmeta>
<linktext>Screen capture
of the user interface window shown when creating a
checking account</linktext>
</topicmeta>
</keydef>
<topicref
href="creatingAccount.dita"/>
</topicgroup>
<!-- Generate output for "Creating a
savings account" -->
<topicgroup keyscope="savingsAccount">
<keydef keys="accountType">
<topicmeta>
<linktext>savings</linktext>
</topicmeta>
</keydef>
<keydef keys="creatingAccount"
format="png" href="creatingSavingAccount.png">
<topicmeta>
<linktext>Screen capture
of the user interface window shown when creating a
savings account</linktext>
</topicmeta>
</keydef>
<topicref
href="creatingAccount.dita"/>
</topicgroup>
I hope that this helps. I'd suggest that getting
some formal DITA training might be of benefit.
Best,
Kris
Kristen James Eberlein
Chair, OASIS DITA Technical Committee
OASIS Distinguished Contributor
Principal consultant, Eberlein Consulting LLC
www.eberleinconsulting.com
+1 919 622-1501; kriseberlein (skype)
On
12/27/2020 5:26 PM, Aaron Mehl via groups.io
wrote: