Link to step XSLT

pault
Posts: 64

Link to step XSLT

Wed Nov 16, 2016 8:49 pm

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: 129

Re: Link to step XSLT

Fri Nov 18, 2016 3:09 pm

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: 64

Re: Link to step XSLT

Mon Nov 21, 2016 8:39 pm

Thanks Alin.

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

Re: Link to step XSLT

Wed Jan 11, 2017 2:04 am

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: 5620

Re: Link to step XSLT

Fri Jan 13, 2017 11:45 am

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

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: Costin and 2 guests