Export DITA Map path issue

Post here questions and problems related to editing and publishing DITA content.
gbv34
Posts: 105
Joined: Thu Jan 20, 2022 12:36 pm

Export DITA Map path issue

Post by gbv34 »

Hello,
I'm having a problem with a publication whose source topics are all located at the root of the folder.
However, when publishing the project, it seems that the index is produced at the root of the out folder whereas the topics are produced and moved to subfolders following the path of the original source (see screenshot).
2022-12-10_11-44-05.png
The output produces the links as:
index.html -> topicA.html

But the topics are located in subfolders:
index.html -> Users -> Username -> Desktop -> folderOfTheOPublication -> topicsA.html

How strange is that?
Did you already meet such a behavior?
You do not have the required permissions to view the files attached to this post.
------
Gaspard
chrispitude
Posts: 922
Joined: Thu May 02, 2019 2:32 pm

Re: Export DITA Map path issue

Post by chrispitude »

Hi Gaspard,

Some questions:
  • Which transformation are you running?
  • Are you setting any interesting transformation parameters?
  • If you make a copy of your project and reduce it to a single topic, does the behavior still occur?
  • If it does not occur with a single topic, try a binary search to narrow down the cause to a problematic topic.
Remember that to reduce your testcase, you don't need to remove the topic files themselves, just their references in the map. And if you remove them in the DITA Maps Manager, you can run a transformation, then undo the removal in the DITA Maps Manager if you want to remove something else instead.
gbv34
Posts: 105
Joined: Thu Jan 20, 2022 12:36 pm

Re: Export DITA Map path issue

Post by gbv34 »

Hi Chris!
Thanks for the good tips :)
I ran a default HTML5 transformation with no specific transformation parameters.
The problem does not occur when I comment the maprefs progressively. It seems the issue might be related to nested maps (the initial project contains plenty of submaps and nested maps.
I will narrow down the publication to find something more relevant.
------
Gaspard
chrispitude
Posts: 922
Joined: Thu May 02, 2019 2:32 pm

Re: Export DITA Map path issue

Post by chrispitude »

Hi Gaspard,

Sometimes when I am simplifying testcases, I will read submap contents in place of their map references. And if the mapref applies a keyscope or something like that, I'll wrap it in a <topicgroup>.

For example, something like this:

Code: Select all

<mapref href="submap.ditamap" keyscope="foo"/>
could become this:

Code: Select all

<topicgroup keyscope="foo">
  <!-- insert submap.ditamap contents here -->
</topicgroup>
Sometimes it's mentally easier to combine everything together into fewer files, then reduce it down.
gbv34
Posts: 105
Joined: Thu Jan 20, 2022 12:36 pm

Re: Export DITA Map path issue

Post by gbv34 »

Nice, Chris!
I'll keep this trick for future debug, that's sure.
I eventually found the error.
A topic referenced an image with a link declared as:

Code: Select all

 <image href="file:/C:/Users/XXXX/Pictures/pfn1564008980712.png"
The

Code: Select all

file:/C:/Users.........
seemed to confuse the definition of the tree structure in the output. When I fixed this reference, I retrieved a consistent tree structure.
------
Gaspard
chrispitude
Posts: 922
Joined: Thu May 02, 2019 2:32 pm

Re: Export DITA Map path issue

Post by chrispitude »

Hi Gaspard,

Ahh yes! I seem to recall that if the DITA-OT sees a resource outside the local root map directory, it behaves like this to try to fix the problem. I think the Syncro Soft folks would have probably known to suggest this immediately, whereas I made you work for it. :(

But I'm glad you got it resolved!
Radu
Posts: 9439
Joined: Fri Jul 09, 2004 5:18 pm

Re: Export DITA Map path issue

Post by Radu »

Hi Gaspard,

You should indeed avoid references to resources outside of the DITA Map folder:
https://www.oxygenxml.com/doc/versions/ ... -refs.html
In the DITA Maps Manager if you use the "Validate and check for completeness" action there is a checkbox named "Report references to resources outside of the DITA Map folder". If you check that and validate Oxygen should report all such cases.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply