copy-to fails to update image paths
See original GitHub issueI have a topic in the directory topics/
that includes two image references (one with a relative path, one with a key). Both images are located in the peer images/
directory:
<ul>
<li>Image with relatve path: <image href="../images/happycat.jpg" alt="yuk"/></li>
<li>Image with key: <image keyref="flag"/></li>
</ul>
In my map, I publish that topic as-is; I also use @copy-to
to copy it up a directory, down a directory, and to a peer directory.
My rendered HTML5 output has four copies of the topic (original, copied up, copied to peer, copied down). In all 4 versions, the original relative path ../images/
is used. This is true for both the relative-path version and the keyref version. As a result, the rendered topic is only valid in the original and peer directories.
copyimage.zip
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:13 (12 by maintainers)
Top Results From Across the Web
A file copy operation fails when files or folders have long paths ...
The copy operation fails and generates a message that states that the path (file name) is too long. The message also suggests that...
Read more >Update image-files in a specific directory - Stack Overflow
So far, everything seems to be ok, but how to pass an image from the First directory to the Second directory which is...
Read more >How to specify a path to a file in MATLAB Drive when using ...
My suggestion is to add the images folder and subfolders to your path. Right click on the folder and select Add to path...
Read more >Copying a File or Directory - The Java™ Tutorials
You can copy a file or directory by using the copy(Path, Path, CopyOption...) method. The copy fails if the target file exists, unless...
Read more >FileInfo.CopyTo UnauthorizedAccessException Error ... - GitHub
Hello, Im trying to copy some files within an external exfat drive. As we all know, exfat in linux ubuntu belongs to root...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I first reproduced the initial problem on 2.3.2. The problem could be reproduced in the XHTML outputs, the PDF worked. I updated to the latest 2.3.3 github branch, run gradle. The XHTML output looks fixed, images appear in all HTML topics. The PDF output is broken though:
Regarding the original issue, if the dita file in @href cannot be located (like a missing file etc.) we get a freak “Error: java.lang.NullPointerException” and naturally the transformation fails with no info as to what would be the actual problem.
Easy to reproduce with the copyimage example, just rename the
test.dita
file to something else.There should be a more concise error message in this situation.
We are using dita-ot v2.5.4 with the oXygen WebHelp transformation.