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
Keyref breaks with peer topic, relative path, topic in sub-directory #1951
Comments
What is your expectation for this type of peer reference to a topic? (or to an HTML file for that matter). Given that the spec through 1.3 does not really say what it means to make a peer reference (except now for peer references to maps in 1.3), I'm genuinely curious what the behavior is that you want or expect. I'm not sure what I would expect in that case--a reference to a topic with no other context can only be interpreted as being part of the publication represented by the root map that contains the topicref to the topic, but "peer" suggests that the topic is not a first-class citizen of the publication. In that case, what is it? Is the topic rendered in isolation as a standalone publication? Is it treated as a provisional part of the current publication (since peerness tends to imply potential unavailability of the source file). |
If I have a local file reference, such as I expect that if I have a file reference with a relative path (even if How that ends up getting resolved likely differs based on your final output and assumptions made by your processor. Native DITA-OT to XHTML preserves file structure and naming, meaning I can generate a "publication" in one directory, using keys to address a topic that I know will be in a peer book in a peer directory. That's the real-world case we encountered; a publication tries to link to something like Basic idea being - the relative-path reference should continue to resolve to the same resource, wherever the reference is moved. Arguably the same is true for local files referenced as |
I am seeing the same behavior for key references to non-DITA resources without using
Note: I see the same behavior whether the key is defined with |
I believe org.dita.dost.module.KeyrefModule isn't correctly resolving the paths, but I don't have the Java-fu to fix it. I suspect this step is meant to use the results of the earlier mapref relative path resolution (in the "mapref" target) but that seems not to be happening. |
This issue has been automatically marked as stale because it has not been updated recently. It will be closed soon if no further activity occurs. Thank you for your contributions. |
…#1951 Signed-off-by: Robert D Anderson <robander@us.ibm.com>
Fixed for 3.3 with #3234. |
I've got a key definition with
@scope="peer"
, linking to a topic with a relative path. I've also got a topic in a sub-directory.When the key is referenced in a
<reltable>
and pushes a link into the subdirectory, the path is adjusted properly, link resolves. When the key is referenced directly from that topic, the link is not adjusted, and is broken.To reproduce, add this to the end of
hierarchy.ditamap
:Then add this reference into
tasks\garagetaskoverview.xml
:The text was updated successfully, but these errors were encountered: