Creating custom units

You create custom units in the Index Definition document. To be able to do so, you must check the Index Definition document out and save it on your hard drive.

For conceptual information on units, refer to the TEXTML Server Administration Guide.

To create a custom unit:

  1. Open the Index Definition document with any XML editor.
  2. Under the root element <indexdefinition> add a <units> element, which will hold each defined unit.
  3. Under the <units> element add a <unit> element, which represents one unit. Specify the name of the unit as value to the NAME attribute of <unit>.
  4. Under the <unit> element, add a <unitelements> element, which holds the list of elements you want "joined" in the unit. You may also add an <admindescription> element to enter a description for your unit.
  5. Under the <unitelements> element, add a <unitelement> element, which represents one XML element of your documents. Specify the XPath of the element as value to the XPATH attribute of <unitelement>.
    You may add as many <unitelement> elements as XML elements you want "joined" in the unit.
    <units> 
       <unit NAME = "MyCustomUnit"> 
          <admindescription>A unit joining elements within the node movie
          </admindescription> 
          <unitelements> 
             <unitelement XPATH="//movie"/> 
          </unitelements> 
       </unit> 
    </units>