Printing @importance="optional" for more than steps

Here should go questions about transforming XML with XSLT and FOP.
dgallo
Posts: 90
Joined: Tue Mar 31, 2015 10:43 pm

Printing @importance="optional" for more than steps

Post 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.
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

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

Post 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
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
dgallo
Posts: 90
Joined: Tue Mar 31, 2015 10:43 pm

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

Post 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?
Radu
Posts: 8991
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply