Adding a step number to a 1-step task

Post here questions and problems related to editing and publishing DITA content.
mdslup
Posts: 167
Joined: Tue Mar 06, 2018 1:34 am

Adding a step number to a 1-step task

Post by mdslup »

In a DITA task file, if the taskbody > steps has only one STEP element, the resulting web output does not add the "1.".
Even if it's a single step, I still want the "1" to appear in the ::before area of the resulting HTML span. Where can I edit this option?
Radu
Posts: 8395
Joined: Fri Jul 09, 2004 5:18 pm

Re: Adding a step number to a 1-step task

Post by Radu »

Hi,

There does not seem to be a publishing parameter for this.
In the XSLT stylesheet "OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT3.x/plugins/org.dita.html5/xsl/task.xsl" there is an XML comment:

Code: Select all

<!-- Single step. Process any stepsection before the step (cannot appear after). -->
so that is the place where the decision is made. Probably an HTML customization plugin could override the xsl:template and change it so that it no longer takes this decision.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
mdslup
Posts: 167
Joined: Tue Mar 06, 2018 1:34 am

Re: Adding a step number to a 1-step task

Post by mdslup »

Can I request a feature enhancement for a future oxygen release? At least to make this a flag or an xsl extension point?
Radu
Posts: 8395
Joined: Fri Jul 09, 2004 5:18 pm

Re: Adding a step number to a 1-step task

Post by Radu »

Hi,

Hi, I added an improvement request based on what you proposed:
https://github.com/dita-ot/dita-ot/issues/4072

Maybe as a workaround you can match on the generated <div> element for that single step with a custom CSS stylesheet and add a "1." before it:

Code: Select all

div.step:before {
	content: "1. ";
}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply