Page 1 of 1

Link to step XSLT

Posted: Wed Nov 16, 2016 8:49 pm
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,

Re: Link to step XSLT

Posted: Fri Nov 18, 2016 3:09 pm
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

Re: Link to step XSLT

Posted: Mon Nov 21, 2016 8:39 pm
by pault
Thanks Alin.

I actually thought of using CSS, but didn't think of setting it as an output class on the xref.

Re: Link to step XSLT

Posted: Wed Jan 11, 2017 2:04 am
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

Re: Link to step XSLT

Posted: Fri Jan 13, 2017 11:45 am
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