conref

Oxygen general issues.
Viviane
Posts: 3
Joined: Wed Apr 01, 2015 8:14 pm

conref

Post by Viviane »

Hello, is it possible to conref a task within a concept?

My concept has a section called STEPS TO PERFORM.
In that section, I would like to conref the content of a task, i.e. its short description and the step-by-step. Is it possible?

If yes, what is the best way to proceed.
Thank you
Radu
Posts: 9438
Joined: Fri Jul 09, 2004 5:18 pm

Re: conref

Post by Radu »

Hi Vivianne,

In my opinion according to the DITA 1.2 specs:

http://docs.oasis-open.org/dita/v1.2/os ... tml#conref

it should be possible to conref from a DITA <ol> to a <steps> element or from a li to a step element. But this does not quite work in the published output.
I added an issue for this for the DITA Open Toolkit publishing engine used by Oxygen to convert DITA to various output formats:

https://github.com/dita-ot/dita-ot/issues/1884

For reusing the shortdesc content you could do this:

In the DITA task wrap the entire content of the shortdesc in a ph element:

Code: Select all

<shortdesc><ph id="reusedShortDesc">THIS IS SHORT DESC</ph></shortdesc>
In the DITA concept you can conref to that <ph> element in a paragraph for example:

Code: Select all

<p><ph conref="task.dita#taskID/reusedShortDesc"/></p>
Possibly you could do the same for each step you want to reuse, surround the cmd content in a ph and reuse that ph:

Code: Select all

<step>
<cmd><ph id="reusedShortDesc">CMD CONTENT. </ph></cmd>
</step>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Viviane
Posts: 3
Joined: Wed Apr 01, 2015 8:14 pm

Re: conref

Post by Viviane »

Hello,

Thank you for your answer.
If I was using a topic document model instead of a concept, would I be able to pull the content of a task and put it within the topic document?

Thanks
Viviane
Radu
Posts: 9438
Joined: Fri Jul 09, 2004 5:18 pm

Re: conref

Post by Radu »

Hi Viviane,

My answer would be no with the same reasons as above.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Viviane
Posts: 3
Joined: Wed Apr 01, 2015 8:14 pm

Re: conref

Post by Viviane »

Hello,

In a generic topic type <topic>, I am able to use these elements: title, description or abstract, prolog, body, related links, and nested topics.

If in the generic topic type I was using a nested topic where I would put task-related content (step-by-step process), is there any way to "wrap" the task content in order to be able to use it in a task topic?

Thanks
Viviane
Radu
Posts: 9438
Joined: Fri Jul 09, 2004 5:18 pm

Re: conref

Post by Radu »

Hi Viviane,

As I previously said, you cannot reuse a part of a task inside a topic if those conreffed elements are not allowed in a topic.

A DITA composite allows you to nest a task inside a topic:

Code: Select all

<!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<dita>
<topic id="topic_b1m_n34_sr">
<title>Topic title</title>
<body>
<p/>
</body>
<task id="task">
<title>Task title</title>
</task>
</topic>
</dita>
but DITA composites are quite an old concept and not quite recommended nowadays.
Also if you want to reuse an entire DITA task file you can just link it from the DITA Map as a child topicref to the topic.

Maybe an alternative for you would be that instead of using a DITA task model for the task content, just use the regular DITA topic model and use <ol>'s instead of steps.

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