Page 1 of 1

Remove <glossbody> from pdf

Posted: Wed May 18, 2016 6:08 pm
by Edwin
Hi,
I'm using the a glossary in my Ditamap this way I can use the <abbreviated-term> tag and add a glossary of terms to my document. The glossary items look like:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE glossentry PUBLIC "-//OASIS//DTD DITA Glossary//EN" "glossary.dtd">
<glossentry id="test_gloss">
<glossterm>Lorem ipsum</glossterm>
<glossdef><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.
Aenean massa.</p></glossdef>
<glossBody>
<glossSurfaceForm>Lorem Ipsum</glossSurfaceForm>
<glossAlt>
<glossAcronym>LS</glossAcronym>
</glossAlt>
</glossBody>
</glossentry>
In my pdf output I would like to include the <glossterm> and the <glosdef> so i've added the glossary like this in my ditamap:

Code: Select all

 <topichead navtitle="Glossary" type="topic">
<topicref href="Glossary/test_gloss.dita" keys="test_gloss" print="yes"/>
</topichead>
in the print i also get the <glossbody> elements, I don't want that, does anybody know how to remove these from the pdf output?

Re: Remove <glossbody> from pdf

Posted: Thu May 19, 2016 11:27 am
by radu_pisoi
Hi,

A solution is to create a PDF customization. The steps for creating a customization directory are described in our manual:
http://oxygenxml.com/doc/versions/18.0/ ... ation.html

Now, in the custom.xsl stylehseet you can add the next template that filters the 'glossbody' element:

Code: Select all

<xsl:template match="*[contains(@class, ' glossentry/glossBody ')]">

</xsl:template>

Re: Remove <glossbody> from pdf

Posted: Thu May 19, 2016 2:11 pm
by Edwin
Thanks Rudu works like a dream