Replies: 2 comments
-
I had a little bit more time to look at that, and wanted to see how the generate.copy.outer option is affecting the processing. I initially looked a bit at the gen-list target in the preprocess (1), because that's what the html5 transform is using in 3.3.4, and it seems that the GenMapAndTopicListModule class is using the GenListModuleReader, which here seems to just issue a warning if the file is out of scope, and fail if the But after that, I quickly moved on because I thought it would make more sense to investigate this in the dita-ot 4.3.2 and the html5 transform, which uses preprocess2, which is not using gen-list. This is a bit more tricky for me to follow, but I think basically the preprocess2.maps target, and more exactly the map-reader target seems to be where files are read and processed for the first time, and this seems to be done in the MapReaderModule Java class, which I think eventually also uses the GenListModuleReader when processing files (via waitlist). I'm not so sure yet how preprocess2 really handles all filesets, so I'll keep doing some investigation to understand how files are passed, references followed, and filesets bult. I did see here that a set of outDitaFiles is built, but I'm not so sure yet if it's supposed to always be processed regardless of the value of generate.copy.outer. Sorry, lots of information dump here without really any logic, but I'm just tracking my investigation here, and sharing in case someone is wondering the same thing on this mysterious option 😉 |
Beta Was this translation helpful? Give feedback.
-
So looking more into that. I think that when GenListModuleReader is parsing attributes, if this is an Except this, nothing else happens to the out-of-scope topics, so I'll check if this |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I don't really understand how the generate.copy.outer option is supposed to work. From what the documentation says, it is supposed to control if content out of the input/map's directory (or what I like to call out-of-scope) is generated or not, and if the map's folder is pushed down in the output hierarchy so all content can be included.
However, I've tried this with a very small sample with an
<xref href="../other_folder/task_in_another_folder.dita" scope="local">
(I know local is the default for relative link, just wanted to make it obvious) on both DITA-OT 3.3.4 (which is what we use today), and the latest (4.2.3), and got the exact same output with-Dgenerate.copy.outer=1
and-Dgenerate.copy.outer=3
. The equivalent of the map's folder in the output folder is pushed down one level, andother_folder/task_in_another_folder.html
is always generated. The only difference I see is that-Dgenerate.copy.outer=1
issues warnings in the logs, and-Dgenerate.copy.outer=3
doesn't:Here is the result of those 4 runs of the dita-ot:
Is it the expected behavior? If this is, then what does the option do? Am I supposed to use it together with outer.control to change the behavior and to not generate content outside the map's folder?
Here is my minimum sample to reproduce. I left the logs of all 4 runs, and the output folders so you don't have to run it yourself 😉
Edit: I also tried with an image (
<image href="../other_folder/dcs.png" scope="local"><alt>DCS icon</alt></image>
) and got the same behavior,./other_folder/dcs.png
is included regardless of the value of the generate.copy.outer option.Thanks for your help.
Beta Was this translation helpful? Give feedback.
All reactions