Show step importance (optional, recommended) in Webhelp and PDF

Post here questions and problems related to editing and publishing DITA content.
RichH
Posts: 14
Joined: Mon Jun 15, 2015 1:02 pm

Show step importance (optional, recommended) in Webhelp and PDF

Post by RichH »

Hi,
When I author DITA, the editor shows the step importance (optional, recommended) attribute. e.g.:
2. Optional: If you have the thingy then tighten the whatsit.
I would like to show the attribute in my Webhelp and PDF output. I have read may "DITA for Print" book and can change the label text by modifying the en.xml file.

Code: Select all

<!--Label for a step with importance="optional"-->
<variable id="Optional Step">Optional:</variable>
But what do I have to modify to make the attribute appear in the PDF/Webhelp?

Thanks
Rich
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Show step importance (optional, recommended) in Webhelp and PDF

Post by Radu »

Hi Rich,

When you edit the transformation scenario you are using to publish, in the Parameters tab there is a parameter called args.gen.task.lbl which you can set to YES if you want auto generated labels for various task elements.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
RichH
Posts: 14
Joined: Mon Jun 15, 2015 1:02 pm

Re: Show step importance (optional, recommended) in Webhelp and PDF

Post by RichH »

Hi Radu,

I have already set the parameter args.gen.task.lbl to YES so that I get the labels "About this task" and "procedure". But this still doesn't activate the display of the "importance" attribute.

thanks
rich
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Show step importance (optional, recommended) in Webhelp and PDF

Post by bogdan_cercelaru »

Hello,

I've tested with Oxygen v17.1, I set the importance="optional" attribute on the "step" element and the output contains the "Optional:" label for that step (PDF and WebHelp).
Please let us know what version of Oxygen are you using and send us a sample file.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
RichH
Posts: 14
Joined: Mon Jun 15, 2015 1:02 pm

Re: Show step importance (optional, recommended) in Webhelp and PDF

Post by RichH »

Hi,

I'm using Oxygen in Eclipse:

Eclipse IDE for Java Developers
Version: Luna Service Release 2 (4.4.2)
Build id: 20150219-0600

oXygen XML Editor and XSLT Debugger
17.1.0.v2015102718

In the setting : Window --> Preferences --> oXygen XML Editor --> DITA Open Toolkit
I have tried Built in 1.8 as well as Builtin 2.x

My Dita Map:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<title>Demonstration</title>
<topicref href="tasks/stepImportance.dita"/>
</map>
My Task (tasks/stepImportance.dita):

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="task_ozk_2bw_wt">
<title>Step Importance</title>
<shortdesc>Demonstrate steps with different levels of importance</shortdesc>
<taskbody>
<context>
<p>Do things with varying importance</p>
</context>
<steps>
<step>
<cmd>Pick up the Widget</cmd>
</step>
<step>
<cmd importance="optional">If you have a second Widget pick it up as well</cmd>
</step>
<step>
<cmd importance="recommended">Put on gloves because the Widgets are sharp</cmd>
</step>
</steps>
</taskbody>
</task>
My PDF Scenario:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<serialized version="17.1" xml:space="preserve">
<map>
<entry>
<String>scenarios</String>
<scenario-array>
<ditaScenario>
<field name="useXEP">
<Boolean>false</Boolean>
</field>
<field name="useAntennaHouse">
<Boolean>false</Boolean>
</field>
<field name="baseDir">
<String>${cfd}</String>
</field>
<field name="outputDir">
<String>${cfd}/out/pdf</String>
</field>
<field name="tempDir">
<String>${cfd}/temp/pdf</String>
</field>
<field name="transtype">
<String>pdf2</String>
</field>
<field name="filters">
<ditavalFilters>
<field name="useDitavalFilePath">
<Boolean>false</Boolean>
</field>
<field name="useAppliedConditionSet">
<Boolean>true</Boolean>
</field>
<field name="appliedConditionSet">
<null/>
</field>
<field name="ditavalFilePath">
<String></String>
</field>
<field name="simpleFiltersList">
<list/>
</field>
</ditavalFilters>
</field>
<field name="addOxygenJars">
<Boolean>true</Boolean>
</field>
<field name="skinCssFile">
<null/>
</field>
<field name="lastCustomSkinCssPath">
<null/>
</field>
<field name="additionalAntArgs">
<String></String>
</field>
<field name="buildTarget">
<String></String>
</field>
<field name="buildFilePath">
<String></String>
</field>
<field name="ditaParams">
<list>
<ditaParameter>
<field name="name">
<String>args.gen.task.lbl</String>
</field>
<field name="description">
<null/>
</field>
<field name="value">
<String>YES</String>
</field>
<field name="defaultValue">
<String>NO</String>
</field>
<field name="type">
<Integer>4</Integer>
</field>
<field name="possibleValues">
<String-array>
<String>YES</String>
<String>NO</String>
<null/>
</String-array>
</field>
</ditaParameter>
</list>
</field>
<field name="jvmArgs">
<String>-Xmx384m</String>
</field>
<field name="useCustomJavaHome">
<Boolean>false</Boolean>
</field>
<field name="customJavaHomeDir">
<String></String>
</field>
<field name="useCustomANTHome">
<Boolean>false</Boolean>
</field>
<field name="customANTHomeDir">
<String></String>
</field>
<field name="workingDir">
<null/>
</field>
<field name="showConsoleAlways">
<Boolean>true</Boolean>
</field>
<field name="advancedOptionsMap">
<null/>
</field>
<field name="name">
<String>DITA Map PDF - Kopie</String>
</field>
<field name="baseURL">
<null/>
</field>
<field name="footerURL">
<null/>
</field>
<field name="fOPMethod">
<null/>
</field>
<field name="fOProcessorName">
<null/>
</field>
<field name="headerURL">
<null/>
</field>
<field name="inputXSLURL">
<null/>
</field>
<field name="inputXMLURL">
<null/>
</field>
<field name="defaultScenario">
<Boolean>false</Boolean>
</field>
<field name="isFOPPerforming">
<Boolean>false</Boolean>
</field>
<field name="type">
<String>DITAMAP</String>
</field>
<field name="saveAs">
<Boolean>true</Boolean>
</field>
<field name="openInBrowser">
<Boolean>true</Boolean>
</field>
<field name="outputFile">
<null/>
</field>
<field name="outputResource">
<null/>
</field>
<field name="openOtherLocationInBrowser">
<Boolean>false</Boolean>
</field>
<field name="locationToOpenInBrowserURL">
<String></String>
</field>
<field name="openInEditor">
<Boolean>false</Boolean>
</field>
<field name="showInHTMLPane">
<Boolean>false</Boolean>
</field>
<field name="showInXMLPane">
<Boolean>false</Boolean>
</field>
<field name="showInSVGPane">
<Boolean>false</Boolean>
</field>
<field name="showInResultSetPane">
<Boolean>false</Boolean>
</field>
<field name="useXSLTInput">
<Boolean>false</Boolean>
</field>
<field name="xsltParams">
<list/>
</field>
<field name="cascadingStylesheets">
<String-array/>
</field>
<field name="xslTransformer">
<String>DITA-OT</String>
</field>
<field name="extensionURLs">
<String-array/>
</field>
</ditaScenario>
</scenario-array>
</entry>
<entry>
<String>scenarios.load.from.project</String>
<Boolean>false</Boolean>
</entry>
</map>
</serialized>
RichH
Posts: 14
Joined: Mon Jun 15, 2015 1:02 pm

Re: Show step importance (optional, recommended) in Webhelp and PDF

Post by RichH »

Hi,

I think that the problem is that I'm adding the importance attribute to the <cmd> and not to the <step>. The second step below works:

Code: Select all

<steps>
<step>
<cmd importance="optional">This is an optional task</cmd>
</step>
<step importance="optional">
<cmd>so is this</cmd>
</step>
</steps>
I think I can live with that...
Rich
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Show step importance (optional, recommended) in Webhelp and PDF

Post by bogdan_cercelaru »

Hello,

I've tested with the importance attribute set to the <cmd> element and the output does not contains the "Optional:" label.
I've noticed the same problem in the XHTML output of the DITA-OT. The WebHelp transformation is based on the XHTML transformation and also inherits this behavior.

As you already observed, a workaround is to set the importance attribute to the <step> element.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
GKlimeck
Posts: 23
Joined: Tue Mar 07, 2017 7:54 pm

Re: Show step importance (optional, recommended) in Webhelp and PDF

Post by GKlimeck »

Hi,
I'm using Oxygen XML Editor 18.1

In this thread it looks like <step importance="recommended"> is viable. However, https://www.oxygenxml.com/dita/1.3/spec ... /step.html
says: Allowed values are "optional", "required", or -dita-use-conref-target.

Within the Text editor, I receive the error:
Attribute "importance" with value "recommended" must have a value from the list "optional required -dita-use-conref-target ".

For the xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="task_mhv_npy_dz">
<taskbody>
<steps>
<step importance="recommended">
<cmd>In the <uicontrol>Plan Number</uicontrol> text box, type a unique number in accordance with <xref
href="../topics/c_recommended-character-use.xml" type="concept"/>. </cmd>
</step>
</steps>
</taskbody>
</task>

I looked at https://www.oxygenxml.com/dita/1.3/spec ... arget.html
How do I apply that so I can use <step importance="recommended"> ?
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Show step importance (optional, recommended) in Webhelp and PDF

Post by Radu »

Hi,

There is no allowed importance="recommended" value in the DITA 1.3 (and older) specification.
Possibly the person using it had some kind of custom DITA specialization which added this value.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GKlimeck
Posts: 23
Joined: Tue Mar 07, 2017 7:54 pm

Re: Show step importance (optional, recommended) in Webhelp and PDF

Post by GKlimeck »

Thank you, Radu.
I looked at https://www.oxygenxml.com/dita/1.3/spec ... arget.html
Can I apply that so I can use <step importance="recommended"> ?
Best Regards-
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Show step importance (optional, recommended) in Webhelp and PDF

Post by Radu »

Hi,

I'm sorry but the link you pasted seems incomplete so I'm not sure what part of the specification you are mentioning.
Anyway, in my opinion the only way to support a custom value on an attribute which restricts its set of values is by creating a DITA DTD specialization plugin:

https://www.oxygenxml.com/doc/versions/ ... ation.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
GKlimeck
Posts: 23
Joined: Tue Mar 07, 2017 7:54 pm

Re: Show step importance (optional, recommended) in Webhelp and PDF

Post by GKlimeck »

Hi Radu,
For some reason when I paste the url, it gets abbreviated after the dialog is submitted. Trying again:

The Oxygen <step> element description page:
***https://www.oxygenxml.com/dita/1.3/spec ... /step.html***

has a link to the Oxygen -dita-use-conref-target page:
***https://www.oxygenxml.com/dita/1.3/spec ... arget.html***

Can I apply the information on the -dita-use-conref-target page so I can use <step importance="recommended"> ?
Best Regards
Ginny
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Show step importance (optional, recommended) in Webhelp and PDF

Post by Radu »

Hi Ginny,

The links worked this time.
I do not see any connection between the use of the "-dita-use-conref-target" attribute value on an element which has a @conref to another element and the fact that you want to allow for "importance='recommended'" being set on the step.
So my advice is either to create a DITA DTD specialization or you could try to express the value something like this:

Code: Select all

<step importance="optional" outputclass="recommended">
<cmd/>
</step>
and customize the publishing accordingly to take that "outputclass" specific value into account.

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