customizing content with dita conditional text and xmetal

29
© 2010 JustSystems Canada, Inc. Episode 9 Customizing Content with DITA Conditional Text Su-Laine Yeo, Solutions Consultant July 15, 2010 in 37 minutes

Upload: xmetal

Post on 22-May-2015

3.549 views

Category:

Technology


0 download

DESCRIPTION

With XMetaL and DITA, you can create documents customized for various audiences, products, and platforms from a single set of source files. XMetaL includes a sophisticated and easy-to-use set of features for applying consistent tags to conditionalize content, for color-coding conditional text in authoring views, and for generating customized output. In this webinar, we’ll take a close look at how to set up and use conditional text in DITA with XMetaL. A recording of the webinar is here: https://justsystems.webex.com/justsystems/lsr.php?AT=pb&SP=EC&rID=43143747&rKey=8e21588799156c20

TRANSCRIPT

Page 1: Customizing Content with DITA Conditional Text and XMetaL

© 2010 JustSystems Canada, Inc.

Episode 9Customizing Content with DITA

Conditional Text

Su-Laine Yeo, Solutions Consultant

July 15, 2010

in 37 minutes

Page 2: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.2

• Conditional text with the DITA (Darwin Information Typing Architecture) XML language

• Practical steps for using conditional text in XMetaL Author Enterprise– Fairly detailed level, but not difficult– Specific examples

• Not using DITA? Keep watching, and also come back for our next 37-minute webinar on July 29

Today’s webinar

Page 3: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.3

Customization and content reuse

• Reuse lets you deliver customized content without duplicating it

• Approaches:– Modular reuse:

• reusing whole topics• content references (conref) to reuse phrases and parts of

topics

– Conditional text

Page 4: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.4

What is conditional text?

“Conditional text” refers to:

• The practice of marking up the content in a single source file, so you can create deliverables with different subsets of the file.

• The content that is marked up so you can filter it out of some deliverables. In DITA, conditional "text" can be words, images, tables, index markers, links, etc.

Page 5: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.5

Conditional text

• Marking up the content in a single source file, so you can create deliverables with different subsets of the file.

• E.g. Windows-only content (Ctrl+S) and Macintosh-only content (Command+S)

Page 6: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.6

Under the covers: XML

• A paragraph that is not conditional:

<p>Press Ctrl+S.</p>

• A paragraph that applies to the Windows platform only:

<p platform = "windows">Press Ctrl+S.</p>

attribute attribute value

Page 7: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.7

Steps for using conditional text

1. Plan– Make a list of your audiences, products, and platforms that

require similar documentation

2. Configure– Configure the system to use the conditions you want– Style conditional content so that you can keep track of it when

writing

3. Write– Mark content as conditional

4. Generate output– Choose a particular product/platform/audience combination

Page 8: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.8

• Make lists: • What product variations are similar enough they

could be documented through one set of source files?• What audiences do you want to customize

documentation for?

• Example for today’s webinar: two platforms– A software application that has different keyboard

shortcuts for Macintosh and Windows platforms

Step 1: Plan

Page 9: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.9

Step 2: Define conditional attribute values

Edit the XMetaL ct_config.xml file. – This file is installed in your C:\Program Files\XMetaL

6.0\Author\Conditional Text\configs folder.

<attribute name="platform" title="Platform"> <value name="windows" title="Windows" /> <value name="macintosh" title="Macintosh" /> </attribute>

Page 10: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.10

Distribute settings files

• You can standardize conditions within a team by distributing the ditabase_ct_config.xml file.

• When you start XMetaL, XMetaL automatically configures its Conditional Text dialogs to use the values in this file.

Page 11: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.11

Style conditional text

• You'll want to be able to keep track of conditions when you are writing, preferably in real-time via color-coding.

Page 12: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.12

Configure styling

• Styling affects what you see in XMetaL, not in output• Click Reuse > Style Conditional Text.

Page 13: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.13

To make content conditional:

1. Click in an element, or select some text

2. Click Reuse > Apply/Remove Conditions

Step 3: Write

Page 14: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.14

Under the covers

Content for Windows only:

<p platform="windows">Press Ctrl+S.</p>

Content for Windows and Macintosh, but not Unix:

<p platform="windows macintosh">Press Ctrl+S.</p>

Content for all platforms:

<p>Press Ctrl+S.</p>

Page 15: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.15

What content can you make conditional?

Yes:• Text• Images• Cross-references• Index markers• Tables• Rows in tables• Content within content

references• Topic references in DITA

maps

No:• Individual table cells

• Table columns

• Required elements (you can conditionalize text within required elements)

Page 16: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.16

<ph> element

• If you make selected text conditional, XMetaL inserts <ph> tags so it can “hang” attributes on the <ph> element.

Page 17: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.17

Best practices

• To make a whole topic conditional, conditionalize the corresponding topic reference in the DITA map file.

• Do not conditionalize content that is "common to all." – If an element is common to all deliverables, do not put

conditional attributes on it.– If an element is common to all products, do not put any "product"

attributes on it.

• If your content will be translated, it is safest to conditionalize entire sentences, not parts of sentences.

Page 18: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.18

Step 4: Generate conditional output

• In XMetaL: File > Generate Output

• Choose what platforms, products, and audiences you want to include

Page 19: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.19

What about DITAVAL files?

• You don’t need to write one. XMetaL generates the DITAVAL file automatically:

<prop att="platform" val="macintosh" action="exclude"/>

Page 20: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.20

Multiple Condition Types

Page 21: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.21

Multiple condition types

Say you have:

• Three platforms: “Windows” and “Macintosh” and "Unix"

• Two audience types: “Europe” and “North America”

Page 22: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.22

How DITA handles multiple condition types

For an element marked as audience = “Europe” and platform = “windows”

In output for this audience and product:

Does the element appear?

Notes

EuropeMacintosh

No* The element is for the right audience. The element is not for the right platform.

North AmericaWindows

No* The element is not for the right audience. The element is for the right platform.

Europe Windows and Macintosh

Yes The element is for the right audience. The element is for one of the right platforms.

*Would appear if you used native FrameMaker® conditions instead of DITA

Page 23: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.23

Multiple condition types: the rule

• In this example: Content must be for both the right platform and the right audience in order to be included.

• The general rule: An element is included if, for each conditional attribute:- It doesn't have any values for that attribute, i.e. it is

"common to all"- OR it matches at least one value that should be

included.

Page 24: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.24

Of the 4 steps, planning is the most challenging:

1. Plan

2. Configure

3. Write

4. Generate output

Putting it into practice

Page 25: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.25

DITA attributes

DITA attributes for conditional text are:– product– platform– audience– otherprops

• For anything else, including other audience types

– props • Create new attributes by specializing the “props” attribute

Page 26: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.26

Example

You are documenting a product with Macintosh, Windows, and Unix versions

For this example:• the attribute you need is "platform".• you will allow the values of the platform attribute

to be "Macintosh", "Windows", and "Unix".

Page 27: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.27

• List the attributes, and values of each attribute, that you want to use.– These will go into your ct_config.xml file

• Do not overload the “audience” attribute:– E.g. have an “audience_skill_level” attribute and a

“audience_region” attribute. Do not put your lists of skill levels and regions all into the “audience” attribute.

Make lists

Page 28: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.28

Summary: Why DITA for conditional text?

• Scalable:– Handles multiple condition types well– Easily standardized across a team

• Standards-based:– Multiple output formats – Can work with dynamic content delivery systems

• Within reach:– No programming needed– Does not require a sophisticated CMS or publishing

system

Page 29: Customizing Content with DITA Conditional Text and XMetaL

© 2010JustSystems Canada, Inc.29

Q&A

[email protected]

1-866-793-1542

• Contact Su-Laine at: syeo at justsystems dot com

• Today’s slides are at http://www.slideshare.net/XMetaL