Printing @importance="optional" for more than steps

Here should go questions about transforming XML with XSLT and FOP.
Posts: 84

Printing @importance="optional" for more than steps

Fri Apr 21, 2017 5:53 pm

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.
Posts: 207

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

Mon Apr 24, 2017 3:56 pm


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

    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.

Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
Posts: 84

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

Mon Apr 24, 2017 10:47 pm

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?
Posts: 5992

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

Mon May 01, 2017 9:37 pm


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.

Radu Coravu
<oXygen/> XML Editor

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 0 guests