Remove <glossbody> from pdf

Edwin
Posts: 21

Remove <glossbody> from pdf

Wed May 18, 2016 6:08 pm

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?
radu_pisoi
Posts: 336
Location: Craiova

Re: Remove <glossbody> from pdf

Thu May 19, 2016 11:27 am

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>
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Edwin
Posts: 21

Re: Remove <glossbody> from pdf

Thu May 19, 2016 2:11 pm

Thanks Rudu works like a dream

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 1 guest