Page 1 of 1
Export DITA Map: Too many (keyref-ed) files exported
Posted: Thu Mar 16, 2017 4:15 pm
by Frank Ralf
Hi,
I'm using the
Export DITA Map function to export only a short version of a longer document (oXygen 16.1). I use keyrefs like the following one:
Code: Select all
<keydef keys="Cmd.SelectFile" href="../topics/cmd_Select.dita">
<topicmeta>
<keywords>
<keyword>Cmd.Select</keyword>
</keywords>
</topicmeta>
</keydef>
I'm having the opposite problem as described in
"Missing files when exporting a ditamap". In the short version document, only the keyword definition is used but not the referenced .dita file. Therefore the file should not be included in the export but it is. In addition, all figures referenced in the .dita file are also included in the export but shouldn't.
Is this the expected behavior? Or is it a fall-back mechanism I haven't understood correctly? Can I prevent this behavior somehow? Any pointers welcome.
Kind regards,
Frank
Re: Export DITA Map: Too many (keyref-ed) files exported
Posted: Thu Mar 16, 2017 4:27 pm
by Radu
Hi Frank,
As you noticed the export DITA Map will export the entire topic once it is referenced in the DITA Map, it does not look at whether there are links from other topics or maps to it.
I will add an internal issue for this, maybe at some point we'll have some time to improve the export behavior.
Regards,
Radu
Re: Export DITA Map: Too many (keyref-ed) files exported
Posted: Thu Mar 16, 2017 4:43 pm
by Frank Ralf
Hi Radu,
Many thanks for your quick reply.
The
Validate and Check for Completeness function already can "Report links to topics not referenced in DITA Maps". Admittedly, doing a similar check for keyref-ed topics in a map is a bit tricky but would be a useful enhancement.
Best regards,
Frank
Re: Export DITA Map: Too many (keyref-ed) files exported
Posted: Thu Mar 16, 2017 4:46 pm
by Radu
Hi Frank,
You mentioned:
In the short version document, only the keyword definition is used but not the referenced .dita file
How are you doing this exactly?
Regards,
Radu
Re: Export DITA Map: Too many (keyref-ed) files exported
Posted: Thu Mar 16, 2017 8:09 pm
by Frank Ralf
Hi Radu,
Thanks for looking into this.
I use <xref keyref="Cmd.SelectFile"/>. This displays a link with the value of the <keyword> in the PDF output. However, because the linked topic from the key definition is not included in the short document version's DITA map the link doesn't work but that is ok.
hth
Frank
Re: Export DITA Map: Too many (keyref-ed) files exported
Posted: Fri Mar 17, 2017 9:11 am
by Radu
Hi Frank,
This sounds like a very particular use case, so even if our DITA Map export would check if the href set on the key is used from anywhere, it would still come to the conclusion that it is.
Maybe you can post process the exported content with a custom script and remove from it the unwanted topics.
Regards,
Radu
Re: Export DITA Map: Too many (keyref-ed) files exported
Posted: Thu Mar 30, 2017 2:38 pm
by Frank Ralf
Hi Radu,
Thanks for your reply. This is indeed a very special case and I will look into solving this problem with some post-processing.
Best regards,
Frank