Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path to PDF resources referenced through keyref mechanism are not computed correctly in the XHTML output #2581

Closed
radu-pisoi opened this issue Jan 27, 2017 · 4 comments

Comments

Projects
3 participants
@radu-pisoi
Copy link

commented Jan 27, 2017

We have an issue report from a user that the links to PDF resources are broken in the XHTML output. The PDF references are done using the keyref mechanism.

The structure of a sample DITA project to reproduce the issue is:
image

In the DITA map, the key is defined as follows:
<keydef keys="pdf-key" href="pdf/flowers.pdf" format="pdf"/>

The key reference from topic.dita is:
<p>Reference to the <xref keyref="pdf-key">PDF resource</xref>.</p>

In the HTML document, the path to the PDF resource is generated like:
<a class="xref" href="pdf/flowers.pdf" target="_blank">PDF resource</a>

but it should be:
<a class="xref" href="../pdf/flowers.pdf" target="_blank">PDF resource</a>

A sample DITA project to reproduce the issue can be found in the next attachment: pdf-keyref-issue.zip

@robander robander added the bug label Feb 1, 2017

@robander

This comment has been minimized.

Copy link
Member

commented Feb 1, 2017

I think this is the same issue that came up in #1951 (originally reported as an issue for peer links with relative paths, but in the comments, it was reproduced with local non-DITA links as well).

@jelovirt

This comment has been minimized.

Copy link
Member

commented Apr 24, 2017

From #2667 (comment)

Non-image and non-dita links should be resolved here against the keyDef.source as well.

@jelovirt jelovirt added this to the 2.5 milestone Apr 24, 2017

@jelovirt jelovirt modified the milestones: 3.0, 2.5 May 23, 2017

@jelovirt jelovirt modified the milestones: 3.0, 3.1 Oct 10, 2017

@jelovirt jelovirt added this to To Do in 3.1 Jan 11, 2018

@jelovirt jelovirt removed this from To Do in 3.1 Jun 5, 2018

@jelovirt jelovirt added this to To do in 3.2 via automation Jun 5, 2018

@jelovirt jelovirt removed this from the 3.1 milestone Jun 5, 2018

@jelovirt jelovirt removed this from To do in 3.2 Oct 28, 2018

@jelovirt jelovirt added this to To do in 3.3 via automation Oct 28, 2018

@jelovirt jelovirt removed this from To do in 3.3 Feb 9, 2019

@robander

This comment has been minimized.

Copy link
Member

commented Feb 21, 2019

This is a duplicate of #2620 -- local paths for non-DITA key targets are not adjusted when resolving the key.

robander added a commit to robander/dita-ot that referenced this issue Feb 21, 2019

Adjust relpath for peer or non-dita keys dita-ot#2620 dita-ot#2581 di…
…ta-ot#2250

Signed-off-by: Robert D Anderson <robander@us.ibm.com>

robander added a commit to robander/dita-ot that referenced this issue Feb 21, 2019

Test for conditions in dita-ot#2620 dita-ot#2581 dita-ot#2250 dita-ot…
…#1951

Signed-off-by: Robert D Anderson <robander@us.ibm.com>

@robander robander added this to To do in 3.3 via automation Feb 25, 2019

@robander robander added this to the 3.3 milestone Feb 25, 2019

@robander

This comment has been minimized.

Copy link
Member

commented Feb 25, 2019

Fixed with #3234

@robander robander closed this Feb 25, 2019

3.3 automation moved this from To do to Done Feb 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.