Page 1 of 1

abbreviated-form not working?

Posted: Sun Jul 06, 2014 8:11 pm
by tomjohnson1492
I'm having trouble getting the abbreviated-form element working in Oxygen 16. I'm not sure what I'm doing wrong.

I have a glossterm topic defined like this:

Code: Select all


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE glossentry PUBLIC "-//OASIS//DTD DITA Glossary//EN" "glossary.dtd">
<glossentry id="glossentry_k5k_rdg_r4">
<glossterm>Open Toolkit</glossterm>
<glossdef>Open Toolkit -- This is what processes DITA into the various outputs.</glossdef>

<glossBody>
<glossSurfaceForm>Open Toolkit (OT)</glossSurfaceForm>
<glossAlt>
<glossAcronym>OT</glossAcronym>
</glossAlt>
</glossBody>

</glossentry>
My map file has this:

Code: Select all


<glossref keys="opentoolkit" href="ot.dita"  />
Then I reference the glossary entry in a topic like this:

Code: Select all


 <p>You can use the <abbreviated-form keyref="opentoolkit"/> to process your dita files.</p>
When I publish webhelp, nothing appears for the term. In contrast, if I refer to the term like this it does work:

Code: Select all


 <p>You can use the <term keyref="opentoolkit">Open Toolkit</term> to process your dita files.</p>
Am I doing something wrong?

Re: abbreviated-form not working?

Posted: Sun Jul 06, 2014 8:15 pm
by tomjohnson1492
Here's a link to the dita spec on abbreviated-form: http://docs.oasis-open.org/dita/v1.2/os ... -form.html

Re: abbreviated-form not working?

Posted: Sun Jul 06, 2014 8:15 pm
by tomjohnson1492
Here's a link to the dita spec on abbreviated-form: http://docs.oasis-open.org/dita/v1.2/os ... -form.html

Re: abbreviated-form not working?

Posted: Mon Jul 07, 2014 12:10 pm
by sorin_ristache
Hello,
tomjohnson1492 wrote:I have a glossterm topic defined like this:

Code: Select all


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE glossentry PUBLIC "-//OASIS//DTD DITA Glossary//EN" "glossary.dtd">
<glossentry id="glossentry_k5k_rdg_r4">
My map file has this:

Code: Select all


<glossref keys="opentoolkit" href="ot.dita"  />
Then I reference the glossary entry in a topic like this:

Code: Select all


 <p>You can use the <abbreviated-form keyref="opentoolkit"/> to process your dita files.</p>
When I publish webhelp, nothing appears for the term.[/code]
Am I doing something wrong?
You have to define the glossary entry as:

Code: Select all

<glossentry id="opentoolkit">
because this is the ID value used in the keys and keyref attributes.
tomjohnson1492 wrote:In contrast, if I refer to the term like this it does work:

<p>You can use the <term keyref="opentoolkit">Open Toolkit</term> to process your dita files.</p>
I don't see the attribute value opentoolkit defined in your glossary file or in other file, so I don't see how it can work. The value opentoolkit is referenced but never defined in the example code that you posted.


Regards,
Sorin

Re: abbreviated-form not working?

Posted: Mon Jul 07, 2014 6:14 pm
by tomjohnson1492
Thanks, it's working now. However, I have a related issue. On the glossary entry page, after the term definition, the surface form and the abbreviated form of the term appear on the webhelp output. Is there a way to suppress them from appearing without giving them an output class that has a display of none or something?

Re: abbreviated-form not working?

Posted: Tue Jul 08, 2014 11:27 am
by sorin_ristache
The surface form (the content of the glossSurfaceForm element) and the abbreviated form (the content of the glossAcronym element) of the glossary term can be suppressed with a custom CSS set in the args.css param of the Webhelp transformation, for example:

Code: Select all

.glossSurfaceForm, .glossAlt {
display: none;
}

Regards,
Sorin

Re: abbreviated-form not working?

Posted: Tue Jul 08, 2014 8:48 pm
by tomjohnson1492
Awesome. I didn't even know the args.css was a parameter. That makes it very convenient. Thanks.