How to change topic template

catherine
Posts: 1

How to change topic template

Fri Nov 10, 2017 8:30 am

Hi, I am new to DITA and Oxygen.
I want to know how to change the default topic template.
For example, the default structure of task topic in Oxygen is:
How to make a Call
About This Task
You can make a call to your friends using your mobile phone.
Prerequisites
Before you start, you need:
    A mobile phone
    A valid SIM card
1. Pick up your phone.
2. Dial the destination number.
3. Press Send.

I want to delete the default context title "About This Task", and a title "Procedure"to the task steps, as the following:
How to make a Call
You can make a call to your friends using your mobile phone.
Prerequisites
Before you start, you need:
    A mobile phone
    A valid SIM card
Procedure
1. Pick up your phone.
2. Dial the destination number.
3. Press Send.

Any one can give me an idea, Thanks very much!
Radu
Posts: 5088

Re: How to change topic template

Fri Nov 10, 2017 3:12 pm

Hi Catherine,

A DITA Task also allows a <prereq> element, so you could write it something like:

Code: Select all

<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="task_4dn_bhv_qf">
    <title>Making a call</title>
    <taskbody>
        <prereq> Before you start, you need:<ul id="ul_bd3_tng_vbb">
                <li> A mobile phone</li>
                <li> A valid SIM card</li>
            </ul>
        </prereq>
        <steps>
            <step>
                <cmd>Type a phone number or a go to <term>Contacts</term> and search for contact
                    name</cmd>
            </step>
            <step>
                <cmd>Press the <term>Call</term> key.</cmd>
            </step>
            <step>
                <cmd>To end your call, press the <term>Cancel</term> key.</cmd>
            </step>
        </steps>
    </taskbody>
</task>


The DITA 1.3 specification shows what elements you can use inside a DITA task:

http://docs.oasis-open.org/dita/dita/v1.3/errata01/os/complete/part3-all-inclusive/archSpec/technicalContent/dita-task-topic.html#dita_task_topic

If you want to use other structures which are not compatible with the DITA vocabulary you could try to create a DITA task specialization but this requires some knowledge of DTDs: http://www.xiruss.org/tutorials/dita-specialization/ or you could use a simple DITA topic and add sections in it.

One more thing, if you duplicate and edit the transformation scenario you are using, in the Parameters list there is a parameter called args.gen.task.lbl which you can set to "yes" in order for the output to show static texts like "Procedure" before the steps or "Before you begin" before the <prereq>.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 0 guests