Author mode - keyref, href

Having trouble installing Oxygen? Got a bug to report? Post it all here.
art
Posts: 22
Joined: Fri Nov 14, 2008 8:21 am

Author mode - keyref, href

Post by art »

Currently I work with Oxygen Author 12.0. I add DITA keyrefs and DITA xrefs using the author mode and the "link" button (that looks like an underlined letter "a").

This is what I (1) see in text mode, (2) see in author mode, (3) anticipate in author mode for a DITA key reference:

Code: Select all

(1) <dialog><xref keyref="crm.cldb.dia.vertragsaenderung"/></dialog>
(2) LINKSYMBOL LEFTTRIANGLE RIGHTTRIANGLE
(3) LINKSYMBOL LEFTTRIANGLE [key for the referenced topic] RIGHTTRIANGLE
And for a DITA cross reference:

Code: Select all

(1) <xref href="crm.cldb.dia.vertragsaenderung.dita#crm.cldb.dia.vertragsaenderung" format="dita">DIA Vertragsänderung - Allgemein</xref>
(2) LINKSYMBOL [URL for the referenced topic] LEFTTRIANGLE TitleOfTheReferencedTopic RIGHTTRIANGLE
(3) LINKSYMBOL [URL for the referenced topic] LEFTTRIANGLE RIGHTTRIANGLE
In other words: For keyrefs I miss the key of the referenced topic, for xrefs I'd like the TitleOfTheReferencedTopic to not appear as it will not change when I change the topics title. I am sure both aspects of the tool are the result of deliberate decisions. I'd like to understand the underlying reasoning and find a way to rectify the tools behaviour.
Radu
Posts: 9058
Joined: Fri Jul 09, 2004 5:18 pm

Re: Author mode - keyref, href

Post by Radu »

Hi,

The first behavior that you reported (showing in the Author page the name of a key when an xref with a key reference is made) was corrected a couple of weeks ago and will be available in Oxygen 12.2 (in a couple of weeks). It involved modifying the CSS stylesheet OXYGEN_INSTAL_DIR/frameworks/dita/css_classed/topic.css

and adding this CSS selector to it:

Code: Select all

*[class~="topic/link"][keyref]:before,
*[class~="topic/xref"][keyref]:before {
content:url("../img/link.png") "[" attr(keyref) "]";
}
The second behavior (Oxygen extracting from the target file some text and adding it automatically to the xref content) is already fixed in Oxygen 12.1 so upgrading from 12.0 to 12.1 should fix this.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
art
Posts: 22
Joined: Fri Nov 14, 2008 8:21 am

Re: Author mode - keyref, href

Post by art »

Hi Radu,

thanks for your reply. I tried your fix for the first behaviour but could not get it to work. I still see the graphical link (chain) symbol followed by a triangle symbol pointing to the left followed by a triangle symbol pointing to the right.

Here's a part of my file OXYGEN_INSTAL_DIR/frameworks/dita/css_classed/topic.css

Code: Select all

/*Support for DITA 1.2 keyrefs*/
*[keyref]:before{
/*Use concat to cast from URI to string*/
link: concat("", attr(keyref, keyref));
content:url("../img/link.png");
}

*[keyref]{
text-decoration:underline;
}

/* fix based upon http://www.oxygenxml.com/forum/topic5850.html */
*[class~="topic/link"][keyref]:before,
*[class~="topic/xref"][keyref]:before {
content:url("../img/link.png") "[" attr(keyref) "]";
}

/*Remove the link*/
*[class~="topic/image"][keyref]:before{
content: "";
As to the second behaviour and your suggestion to upgrade: Sadly upgrading from 12.0 to 12.1 is currently not an option for our project. Could you let me know if/what I would need to change in order to fix the second behaviour?

Kind regards, Aaron.
Radu
Posts: 9058
Joined: Fri Jul 09, 2004 5:18 pm

Re: Author mode - keyref, href

Post by Radu »

Hi Aaron,

I tried the first CSS fix with an Oxygen 12.0 kit and the Author page displays a xref to a key called "introduction" like:
Image

Unfortunately I cannot give you a workaround for the second issue to work with Oxygen 12.0. You will just have to remove the auto-filled text.
A license for Oxygen entitles you to all minor version updates so you should really consider upgrading.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
art
Posts: 22
Joined: Fri Nov 14, 2008 8:21 am

Re: Author mode - keyref, href

Post by art »

Hi Radu,

I will try your fix for the first behaviour later. For that I need a fresh install of Author 12.0. With my current installation your fix doesn't work.

As to upgrading, the problem is not a licensing issue but has to do with customizations that would need to be redone after an upgrade. And no, these customizations were not properly encapsulated...

Kind regards, Aaron.
Post Reply