Export DITA Map: Too many (keyref-ed) files exported

Post here questions and problems related to editing and publishing DITA content.
Frank Ralf
Posts: 460
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Export DITA Map: Too many (keyref-ed) files exported

Post 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
Frank Ralf
parson AG
www.parson-europe.com
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Export DITA Map: Too many (keyref-ed) files exported

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Frank Ralf
Posts: 460
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Re: Export DITA Map: Too many (keyref-ed) files exported

Post 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
Frank Ralf
parson AG
www.parson-europe.com
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Export DITA Map: Too many (keyref-ed) files exported

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Frank Ralf
Posts: 460
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Re: Export DITA Map: Too many (keyref-ed) files exported

Post 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
Frank Ralf
parson AG
www.parson-europe.com
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Export DITA Map: Too many (keyref-ed) files exported

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Frank Ralf
Posts: 460
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Re: Export DITA Map: Too many (keyref-ed) files exported

Post 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
Frank Ralf
parson AG
www.parson-europe.com
Post Reply