Normally an element template is suggested by the Edit tool whatever the parent element where this template is to be inserted. But in some cases, generally with W3C XML schemas and with RELAX NG schemas and not with DTDs, you'll want the template to be usable only in certain contexts.
Example: your schema defines two
title elements: a job title which is a possible child element of
author elements and the optional title (i.e. a caption) of
You intend to define several job title templates. Example: element template "title(arch)" is defined as
Of course, you don't want to see "title(arch)" listed by the Edit tool when you are about to give a title to a
In such case:
Click on the "" radio button.
Type XPath expression "
person|author" in the text field below the radio button.
This means: suggest "title(arch)" but only when the template is to be inserted in a
person or an
Note that a very small subset of XPath is supported here:
This option is best explained by an example.
Out of the box, if you insert a
table element in a DocBook document, in fact, you insert predefined
table template called "table(simple)".
The "table(simple)" template has two rows and two columns which makes it much more useful that the default, automatically generated,
table template which just contains a single cell.
Note that when a single named template such as "table(simple)" replaces the default, automatically generated, element template, the Edit tool does not display its label. For example, in the case of the DocBook
table, the Edit tool displays "table" and not "table(simple)".
Now, what if you prefer to use a
table having 3 rows and 3 columns plus a
thead header as your default table?
Create the table by inserting the rows, cells and header you want.
Select this table.
Use→ → .
The "Existing element templates" list shows you that a predefined template already replaces the default, automatically generated, one. You can see this because "table(simple)" is displayed in italic.
You need to label your own template like the existing one in order to replace it. Therefore specify "simple" in the Label of the element template field.
Click on check box "".
 The default, automatically generated, element template is the simplest, valid, element allowed by the schema.
Most of the time this heuristic gives good results. However in some cases, the default, automatically generated, element template, is, well, too simple to be useful.
 There is no ambiguity and this is shorter to type.