com.elovirta.ooxml icon indicating copy to clipboard operation
com.elovirta.ooxml copied to clipboard

Link text for Xref links to topics is not resolved

Open raducoravu opened this issue 7 years ago • 6 comments

I have a DITA topic looking like this:

    <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
    <topic id="introduction">
        <title>Introduction</title>
        <body>
            <p>This is it <xref href="#topic_tnd_j4h_kz" format="dita"/></p>
        </body>
        <topic id="topic_tnd_j4h_kz">
            <title>Second topic</title>
        </topic> 
    </topic>

When publishing to Word the xref is not properly resolved, you end up in the Word document with "Error! Reference source not found." errors. XHTML and PDF output formats properly work.

raducoravu avatar Mar 30 '17 09:03 raducoravu

Actually it seems that even for xref's to other topics like:

 <xref href="someOtherTopic.dita"/>

the title of the link does not appear in the Word document, only the index of the referenced topic appears.

raducoravu avatar Mar 31 '17 07:03 raducoravu

It seems that during conversion always the numeric reference _Num... is chosen. Also if no header numbers are in use (like in the first example) - in which case the respective numeric reference does not exist and therefore Word complains.

However the general reference _Ref... seems to exist at all times, so I fixed this problem for me by changing $bookmark-prefix.num to $bookmark-prefix.ref in /docx/word/document.link.xsl (line 242 of 152bf51). The link text is then of course the clause name and not the respective header number.

spoeschel avatar Sep 28 '17 11:09 spoeschel

It seems that during conversion always the numeric reference _Num... is chosen. Also if no header numbers are in use (like in the first example) - in which case the respective numeric reference does not exist and therefore Word complains.

However the general reference _Ref... seems to exist at all times, so I fixed this problem for me by changing $bookmark-prefix.num to $bookmark-prefix.ref in /docx/word/document.link.xsl (line 242 of 152bf51). The link text is then of course the clause name and not the respective header number.

Thanks very much. I also encountered this problem, and fixed by your method. Does this method have any side effect?

kodango avatar Jan 25 '19 08:01 kodango

It is some time ago that I used the plugin and applied the described fix. While I'm not 100% sure, I currently don't recall any problems though.

spoeschel avatar Jan 29 '19 10:01 spoeschel

👍 One more report here: https://www.oxygenxml.com/forum/viewtopic.php?f=20&t=20057

raducoravu avatar May 22 '19 11:05 raducoravu

👍 One more report on the same Oxygen forum post.

raducoravu avatar Jun 13 '19 15:06 raducoravu