Page 1 of 1

Printing @importance="optional" for more than steps

Posted: Fri Apr 21, 2017 5:53 pm
by dgallo
We are using the attribute @importance="optional" on more than just step elements, therefore we need the word "Optional" to print whenever it is used. Currently the word "Optional" only prints when it is used for steps.

I need it to work for both HTML and PDF output.

Re: Printing @importance="optional" for more than steps

Posted: Mon Apr 24, 2017 3:56 pm
by bogdan_cercelaru
Hello,

I've tested by setting the @importance="optional" attribute on a paragraph in a DITA topic but this attribute is not passed in the generated output.
As a workaround, you could use the outputclass attribute, with a custom value (for example, @outputclass="optional") and a custom CSS:

Code: Select all

*[class*="optional"]:before{
    display: inline-block;
    content: "Optional:";
    font-weight: bold;
    padding-right: .5em
}

To use a custom CSS you have to set the "args.copycss" parameter to "yes" and the "args.css" to point to your custom CSS file.

Regards,
Bogdan

Re: Printing @importance="optional" for more than steps

Posted: Mon Apr 24, 2017 10:47 pm
by dgallo
Is there another way of doing this without having to use an outputclass? Can the important attribute be updated to have word phrases be printed out when used on more than just step elements?

Re: Printing @importance="optional" for more than steps

Posted: Mon May 01, 2017 9:37 pm
by Radu
Hi,

Right now the @importance attribute doe not seem to be used very much in the publishing engine.
Possibly my creating an XSLT customization for the HTML output, matching a certain DITA element you could use the value of the attribute and set a certain attribute to the corresponding HTML element but there is no such builtin capability.

Regards,
Radu