Link to step XSLT

Post here questions and problems related to editing and publishing DITA content.
pault
Posts: 70
Joined: Thu Mar 21, 2013 12:55 am

Link to step XSLT

Post by pault »

Hi,

I would like to add the word "step" to step links. In the generated HTML, the bare number link is obscure.

Here's the XML:

<cmd>Restart Cassandra without bootstrapping as described in step <xref keyref="opsRecoverUsingJBOD/vnode-used" type="step"/>:</cmd>

In the generated HTML (WebHelp Responsive), it looks like this:

Restart Cassandra without bootstrapping as described in step 7:

I would like to change the XSLT so that it adds step and is part of the link:

Restart Cassandra without bootstrapping as described in step 7:

I can't figure out where the link is created to make this change. Any help is most appreciated,
alin
Site Admin
Posts: 268
Joined: Thu Dec 24, 2009 11:21 am

Re: Link to step XSLT

Post by alin »

Hello,

You can achieve this without having to modify the XSLT files from DITA-OT.
You just have to add an @outputclass="step-link" attribute on each xref element that references a step. This way the corresponding a element generated in the HTML output will have the "step-link" class set on it.

You can then provide a custom CSS file to the transformation scenario containing the following rule:

Code: Select all


.step-link:before {
content: "step ";
}
The procedure of adding a custom CSS to the WebHelp output is described in our User Manual: https://www.oxygenxml.com/doc/versions/ ... n-css.html

Regards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
pault
Posts: 70
Joined: Thu Mar 21, 2013 12:55 am

Re: Link to step XSLT

Post by pault »

Thanks Alin.

I actually thought of using CSS, but didn't think of setting it as an output class on the xref.
pault
Posts: 70
Joined: Thu Mar 21, 2013 12:55 am

Re: Link to step XSLT

Post by pault »

Hi Alin,

When validation is run for the step-link, it shows warnings that looks like this:

No Profile

:!: W {REF] Reference is made with@type "step" to a DITA resource with class "-topic/topic task/task".

The link that's displayed goes to http://docs.oasis-open.org/dita/v1.2/os ... ibute.html

I'd like to get rid of these messages. Is there a way to do that?

Thanks,

Paul
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Link to step XSLT

Post by Radu »

Hi Paul,

Just to see that I understand, so you have an xref link to a DITA step and the link has @type="step" specified on it, right?
In this case Oxygen should not report a problem, from what I know we just fixed this issue a couple of weeks ago but I will double check. The fix will be available in Oxygen 19 (April-May this year).
You can remove the @type attribute completely from the xref, it should not be necessary, the publishing engine should detect the type from the target element.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply