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

Local non-DITA links in topics break with preprocess2 and onlytopic.in.map #4371

Open
robander opened this issue Jan 29, 2024 · 0 comments
Open

Comments

@robander
Copy link
Member

robander commented Jan 29, 2024

Expected Behavior

I have the following link in my topic

<xref href="nonditazip-in-topic.zip" format="zip"/>

When building HTML today, that links to the specified href, with the file name as the link text. I get the same result for all four variations of the link; the first two files are listed in my map, the last two are not:

<li>keyref to zip in map <xref keyref="zip"/></li>
<li>zip also listed in map <xref href="nonditazip-in-map.zip" format="zip"/></li>
<li>zip listed in topic <xref href="nonditazip-in-topic.zip" format="zip"/></li>
<li>zip listed in topic, peer <xref href="nonditazip-in-topicpeer.zip" format="zip" scope="peer"/></li>

Actual Behavior

When I test swapping out preprocess to preprocess2 in HTML5, AND when I use --onlytopic.in.map=true, the third variation above generates a link to a hashed file name. The zip file with that hash is missing from the .job.xml file which is probably why it does not get rewritten back.

With the tests above:

  1. First one (using key) now has a hash name for the link text. I think that's OK; I get warnings in the build (like I did with preprocess, link text is set during preprocessing so it uses the hash. So, not an issue, I get 2 warnings about it already.
  2. Second one works in both cases (link text is the file name, link is correct)
  3. Third one is broken (link text is the hash, and link is to the hashed file that does not exist)
  4. Fourth one (with scope=peer) is fine

Steps to Reproduce

Attaching test files, use
dita-ot-4.1.2/bin/dita -i nonditalink.ditamap -f html5 -temp temp --onlytopic.in.map=true

The test tries the same 4 things with a zip file, a PDF, and an HTML file. Same result for all formats.

Environment

  • DITA-OT version: 4.1.2
  • Operating system and version: macOS
  • How did you run DITA-OT? dita c ommand
  • Transformation type: html5

htmltest.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant