Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
How To
Syntax
FAQ
License

Glossary



It is possible to add a glossary to the wiki. Defining a glossary will add a new menu options which will open a glossary of terms, and the articles were this term is used. The corresponding page will present each word defined in the glossary, and all the articles which contain this word.

For example:
glossary

Defining a glossary

A glossary is an xml file which can be defined wherever in the wiki source, with the root element "glossary"[1]
It is perfectly valild to have more than one glossary file in the wiki source. In that case they will be merged
.

For example:
  <glossary>
     <word word="text">
       <description>The text description</description>
     </word>
     <word word="paragraph">
       <altTerm term="par" />
     </word>
     <word word="red" id="the red"/>
  </glossary>
The glossary contain word elements. Words have a name and can optionally have an id to another article or anchor.

By default the generator will detect automatically which articles contain the word[2]
The search is not case-sensitive
, there is no need to define them yourself.

Word alternate terms

It is possible to define alternate terms for the word.

Word case

By default the first character of the word and the alternate terms will be on upper case and the other characters on lower case.

However it is possible to keep the case of the word and the alternate terms with the "keepCase" attribute. For example:
  <glossary>
     <word word="UA" keepCase="true">
       <description>The Description</description>
     </word>
     <word word="paragraph" >
       <altTerm term="par" keepCase="true" />
     </word>
     <word word="red"/>
  </glossary>

Word description

  • If the word does not contains a description, the glossary will only present the word and all the articles which contain this word
  • If the word contains a description, the glossary will present the word with its description

Glossary policy

There are two possible policies for the glossary generation:
  • "automatic" (the default): The generator will detect automatically which articles contain the word[3]
    The search is not case-sensitive
    , there is no need to define them yourself
  • "manual": Each word must be specified explicitly
For example:
  <glossary policy="manual">
     <word word="UA" keepCase="true">
       <description>The Description</description>
     </word>
     <word word="paragraph" >
       <altTerm term="par" keepCase="true" />
     </word>
     <word word="red"/>
  </glossary>

Automatic policy

By default, the generator will detect automatically which articles contain the word[3]
The search is not case-sensitive
, there is no need to define them yourself.

Of course if you use this policy, you can have in some cases a lot of articles asspociated with each word in the glossary. Switching to the manual policy will allow to control which articles will be linked to each word.

Manual policy

Main Article: Manual glossary

For the manual policy, you need to add word anchors in the article where you want to refer to for your words. Note that word anchors used in a wiki where there is no glossary or an ontology with an automatic policy will be discarded.

For example, suppose that we have the following glossary:
   <glossary policy="manual">
      <word word="ontology">
        <description>The description for ontologies</description>
      </word>
   </glossary>
We refer here to the "ontology" word in an article (the anchor is applied on the word just before is, in this case "OWL"):
   <article desc="my article">
   This is the text which refer to the OWL<word word="ontology" /> concept.
   </article>
We can omit the word attribute if the word just before the anchor correspond to a term used for the glossary word:
   <article desc="my second article">
   This is the text which refer to the ontology<word /> concept.
   </article>
We can also refer to the content on an "anchor" element. For example:
   <article desc="my second article">
   This is the text which refer to the <anchor id="ontology" desc="OWL" /><word /> concept.
   </article>

Words which are associated to no article at all will not appear in the glossary for the manual policy. If the showGlossaryErrors is set to true, then a warning will appear in this case during the generation.

Usage

When clicking on an article referenced in the glossary, the text which contain the word or its alternate term will be highlighted in the html page.

For example:
glossaryUsage

Notes

  1. ^ It is perfectly valild to have more than one glossary file in the wiki source. In that case they will be merged
  2. ^ The search is not case-sensitive
  3. ^ [1] [2] The search is not case-sensitive

See also


Categories: structure

docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.