Re: Acronyms and Spelled Out Forms Do Not Appear in Output

Hussein Shafie <[email protected]> Sat, 15 Jul 2017 10:40:02 +0200
Newsgroups gmane.text.xml.xfc.general
Message-ID <[email protected]>
On 07/15/2017 01:45 AM, Julie McHam wrote:
> I am trying to use DITA to keep track of spelling out acronyms
> the first time used within a topic, and then using the acronym for the
> remainder of the topic. In the Word files generated using the DITA to
> DOCX Transformation with XSL Utility 5.4.5, neither the spelled out word
> or the acronym show up.
>
>
>
> Here is a sample of my test glossary file (note that I am only using
> glossary entries for acronyms, not for term definitions):
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE glossgroup PUBLIC "-//OASIS//DTD DITA Glossary Group//EN"
> "glossgroup.dtd">
> <glossgroup id="acronyms">
>     <title>Acronyms</title>
>       <glossentry id="cde">
>             <glossterm>California Department of Education</glossterm>
>             <glossBody>
>                   <glossSurfaceForm>California Department of Education
> (CDE)</glossSurfaceForm>
>                   <glossAlt>
>                         <glossAcronym>CDE</glossAcronym>
>                   </glossAlt>
>             </glossBody>
>       </glossentry>
> </glossgroup>
>
>
>
> Here is what I am coding in my ditamap file:
>
>
>
>     <backmatter>
>             <topicref href="common/acronyms.dita" />
>             <booklists>
>                   <indexlist/>
>             </booklists>
>       </backmatter>
>
>
>
> Here is a sample of how I am placing the code in my text:
>
>
>
> <li><term>Required SACS codes</term> are defined by the <term
> keyref="cde" />.
>                                         Test: <abbreviated-form
> keyref="abs" />.
>                                        They are the minimum set of SACS
> codes that your district
>                                         <i>must</i> use to report
> accounting detail.
>                                         All required SACS codes are
> available in Galaxy Web.
> </li>
>
>
>
> I have also tried several other things, like creating my glossary file
> with just one entry (not a glossgroup) and placing the reference to
> acronyms.dita inside the booklists element, but to no avail.
>
>
>
> I have scoured your documentation and forums and cannot locate any
> information that will point me in the right direction. Would you please
> provide a link to your documentation that describes how to do this? Or,
> please explain what I am doing incorrectly.
>
>

Without a keydef for key "cde", there is no way to make something 
keyref="cde" work.

You need to add something like what follows in your map (directly or 
indirectly, that is, group all your keydefs in a separate file and 
reference this file from your map):

---
<keydef href="glossgroup.dita#cde" keys="cde"/>
---

Please find attached to this email a complete working example.



References:

- "2.3.4.9 Processing key references to generate text or link text",
http://docs.oasis-open.org/dita/dita/v1.3/errata01/os/complete/part2-tech-content/archSpec/base/processing-keyref-for-text.html

- "3.10.5.2.1 <abbreviated-form>", 
http://docs.oasis-open.org/dita/dita/v1.3/errata01/os/complete/part2-tech-content/langRef/technicalContent/abbreviated-form.html#abbreviated-form

- "3.10.5.2.2 <glossref>", 
http://docs.oasis-open.org/dita/dita/v1.3/errata01/os/complete/part2-tech-content/langRef/technicalContent/glossref.html#glossref

is just another way to specify a keydef:

"3.3.2.2 <keydef>", 
http://docs.oasis-open.org/dita/dita/v1.3/errata01/os/complete/part2-tech-content/langRef/base/keydef.html#keydef


--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support
glossgroup.dita (text/xml, 763 B)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glossgroup PUBLIC "-//OASIS//DTD DITA Glossary Group//EN" 
"glossgroup.dtd">
<glossgroup id="acronyms">
  <title>Acronyms</title>
  <glossentry id="cde">
    <glossterm>California Department of Education</glossterm>
    <glossBody>
      <glossSurfaceForm>California Department of Education (CDE)</glossSurfaceForm>
      <glossAlt>
        <glossAcronym>CDE</glossAcronym>
      </glossAlt>
    </glossBody>
  </glossentry>
  <glossentry id="abs">
    <glossterm>Anti-lock Braking System</glossterm>
    <glossBody>
      <glossSurfaceForm>Anti-lock Braking System (ABS)</glossSurfaceForm>
      <glossAlt>
        <glossAcronym>ABS</glossAcronym>
      </glossAlt>
    </glossBody>
  </glossentry>
</glossgroup>
map.ditamap (text/xml, 495 B)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN"
"bookmap.dtd">
<bookmap>
  <title>Test</title>

  <frontmatter>
    <keydef href="glossgroup.dita#cde" keys="cde"/>

    <keydef href="glossgroup.dita#abs" keys="abs"/>

    <booklists>
      <toc/>
    </booklists>
  </frontmatter>

  <chapter href="ch1.dita"/>

  <backmatter>
    <topicref href="glossgroup.dita"/>

    <booklists>
      <indexlist/>
    </booklists>
  </backmatter>
</bookmap>
ch1.dita (text/xml, 566 B)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN"
"topic.dtd">
<topic id="ch1">
  <title>First chapter</title>

  <body>
    <p>First chapter.</p>

    <ul>
      <li>First item.</li>

      <li><term>Required SACS codes</term> are defined by the <term
      keyref="cde"/>. Test: <abbreviated-form keyref="abs"/>. They are the
      minimum set of SACS codes that your district <i>must</i> use to report
      accounting detail. All required SACS codes are available in Galaxy
      Web.</li>
    </ul>
  </body>
</topic>