Resource-only topics publishing in TOCJS output

Post here questions and problems related to editing and publishing DITA content.
HeatherW
Posts: 8
Joined: Tue May 01, 2012 10:05 am

Resource-only topics publishing in TOCJS output

Post by HeatherW »

Hi, I have a resource-only topic that I use to store xrefs. This topic does not appear in PDF or HTML output, but when I run the TOCJS transformation, the resource-only topic appears in the contents pane.

Do you have any suggestions for how I can control this behaviour? The map is pasted below.

<map>
...
<mapref href="Glossary/glossary_html.ditamap" format="ditamap"/>
<keydef href="externalLinks.dita" format="dita" keys="links" processing-role="resource-only"/>
</map>
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Resource-only topics publishing in TOCJS output

Post by Radu »

Hi Heather,

This looks like a bug in the TOCJS plugin which is not that well maintained by the DITA Open Toolkit.

Looking in this stylesheet:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA ... picref.xsl

at this xsl:template:

Code: Select all

<xsl:template match="*[contains(@class, ' map/topicref ')]">...
it seems to be looking at the toc='no' attribute so you may want to try to also set this attribute on the resource-only topicref.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Resource-only topics publishing in TOCJS output

Post by Radu »

Hi Heather,

I also added an issue for this on the DITA OT bugs list:

https://github.com/dita-ot/dita-ot/issues/1311

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
HeatherW
Posts: 8
Joined: Tue May 01, 2012 10:05 am

Re: Resource-only topics publishing in TOCJS output

Post by HeatherW »

Thanks Radu, it works now. Much appreciated, as always :)
Post Reply