Element parameters

These are the parameters of the document model elements:

name
You assign a name to the text field or document attribute for each definition. These names enable you to restrict a search query to the content of a specific text field or document attribute.

You can use one of the following variables in a name. The variable is replaced by a string generated from the matching element in the source document.

Variable
Value
$(NAME)
The actual qualified name (QName) of the XML element that matched the XPath.
$(LOCALNAME)
The actual local name (without prefix) of the XML element that matched the XPath.
$(PATH)
The actual absolute path as a sequence of slashes and tags of the XML element that matched the XPath.
type
The type of document attribute must be "NUMBER". The parameter does not apply to field definitions.
locator
Expressions in the XPath language that select the parts of the source documents to be used as search fields.

When writing a XML Document Model file, the qualified names, known as QNames, inside a locator must be identical to some tags in the XML document, otherwise no fields will be recognized and the queries on fields will not return a result.

The following are examples of locators. For further information, see the syntax in The semantics of locator (XPath) expressions.

purchaseOrder | salesOrder
All purchaseOrder elements and salesOrder elements
shipAddress
All shipAddress elements
*
All elements (this is the abbreviation of child::* - see the syntax for further information)
name/item
All item elements that have a name parent
purchaseOrder//item
All item elements that have a purchaseOrder ancestor
/
The root node
comment()
All comment nodes
processing-instruction()
All processing instructions
attribute::* (or @*)
All attribute nodes

A literal is a string enclosed either in single or double quotes. For an exact definition of terminal tokens see the XML recommendations.

The XPath locators are similar to XML Stylesheet Language Transformation (XSLT) patterns. They comprise exactly the subset of XSLT patterns that do not contain any predicates nor the functions 'id' and 'key' nor the node tests 'text()' and 'node()'.

ignore
YES or NO. Use the parameter to make exceptions to the locator.

Sometimes you may want to specify a general locator, such as *, to match the nodes you want to index. But you may also specify that some nodes matching a more specific locator should not be indexed.

To formulate this, include a field definition with the more specific locator for the nodes to be ignored during indexing. You then give this locator a higher priority than the one with the general locator, and specify ignore="yes". This indicates to the indexer that it must not generate field information for the matching nodes.

Note that when such an ignored node is embedded in a field-generating node, the content of the ignored node gets indexed, because it also belongs to the contents of the field-generating node.

priority
A real number between -1 and +1 that specifies the priority to be given to a definition found by a particular locator.

If you do not specify a priority, the default priorities are used:

Note that the more specific the locator is, the higher the default priority. For example, the unspecific locator * gives a low priority to the found definition, whereas a name is a more specific locator and gives a higher priority.

Also note that when a node is matched by more than one locator, you can determine which of the definitions are chosen by assigning priorities to them. The definition with the highest priority is chosen. If two definitions have the same priority, the latest is chosen.

This conflict resolution is the same as that used in XML Stylesheet Language Transformation (XSLT).

exclude
YES or NO. A parameter that determines whether the text in a field definition should be excluded and therefore, not indexed. This parameter does not apply to attribute definitions.

In the example, the field definition "customerName" would be excluded, but definition "addresses" included.

Restrictions: