Empty link with keyref

Having trouble installing Oxygen? Got a bug to report? Post it all here.
abasanskaya1
Posts: 4
Joined: Fri Aug 28, 2015 10:41 pm

Empty link with keyref

Post by abasanskaya1 »

Hi,

I'm trying to use keyrefs in a DITA XML file so that links show up when the file is included in one map and no link shows up when the file is included in another map. I'm following the example in http://oxygenxml.com/doc/m/dita1.2_spec ... _keys.html. Specifically, I'm looking at #6 in the "Redirect a link or xref" section:
Author 5 wants to turn the link into just plain text (not hypertext) - for example a citation of a print-only magazine article.

Code: Select all

<topicref  keys="a">
<topicmeta>
<linktext>This is just text.</linktext>
</topicmeta>
</topicref>
When I include a topicref with no href in my ditamap and try to generate the PDF using Apache FOP, however, I get the following error:
Engine name: DITA-OT
Severity: error
Description: Missing attribute on fo:basic-link: Either external-destination or internal-destination must be specified.
Start location: 8001:0
URL: http://www.oxygenxml.com/internalHelp/f ... s-dita-pdf
This what I included in my .ditamap file (which is a bookmap):

Code: Select all

<topicref keys="CONTAINER" scope="local">
<topicmeta>
<linktext>CONTAINER</linktext>
</topicmeta>
</topicref>
and this is what I included in my dita file with the link:

Code: Select all

<xref keyref="CONTAINER" href="../markets/c_market_container.dita">CONTAINER</xref>
I tried playing around with this, but could not get it to work. Am I doing something wrong?
Thanks,
AB
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: Empty link with keyref

Post by Radu »

Hi,

So if in a DITA topic we have:

Code: Select all

<xref keyref="CONTAINER">CONTAINER</xref>
and the topicref in the DITA Map where the key is defined does not point to an href resource, indeed the PDF should contain only the plain text, without a link specified on it.
So the fact that the PDF fails (probably using the DITA Open Toolkit 1.8.5 publishing engine which is bundled with Oxygen) is a bug.
I tested with DITA Open Toolkit 2.1 (which will come integrated with Oxygen 17.1) the same behavior and it no longer reports the error when building the PDF.
So you could try and download DITA Open Toolkit 2.1 separately and use it from Oxygen to publish to PDF:

http://www.oxygenxml.com/doc/versions/1 ... ta-ot.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
abasanskaya1
Posts: 4
Joined: Fri Aug 28, 2015 10:41 pm

Re: Empty link with keyref

Post by abasanskaya1 »

Hi Radu,

Thank you for your response!
AB
Post Reply