importance="optional" for li ?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
DrStrangelove
Posts: 18
Joined: Thu Jan 25, 2018 11:21 pm

importance="optional" for li ?

Post by DrStrangelove »

We recently converted our content to Dita. Some of our tasks correctly use steps/step but many are still using ul/li. We eventually intend to convert them but that cannot be completed in the available timeframe.

We want optional steps to be labelled as "Optional:" regardless of whether the importance is on the step or on the li.

Code: Select all

<li importance="optional">Do this.</li>
importance="optional" is valid for li. I added the following to the style sheet, but the output does not include the label. How can I get this to work?

Code: Select all

li[importance="optional"]:before {
content: "Optional: ";
font-weight: bold;
}
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: importance="optional" for li ?

Post by Costin »

Hi DrStrangelove,

Setting the importance="optional" attribute on the <li/> does not affect the output, as the attribute is not passed to the class appropriate for list entries.
Therefore, the solution would be to set the outputclass attribute to "optional" instead.
Specifically, in your documents, you should use something like:

Code: Select all

<li outputclass="optional">Do this.</li>
In the output, this would translate in

Code: Select all

<li class="li optional">Do this.</li>
, so you could just filter the optional list entries from CSS.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
DrStrangelove
Posts: 18
Joined: Thu Jan 25, 2018 11:21 pm

Re: importance="optional" for li ?

Post by DrStrangelove »

Thank you!
Post Reply