template
This topic describes the template element
Description
The template element can be used to define template content for the element when it is inserted. This may include attributes, child-elements, and default text.
This content can simply be written into the template element:
<x:node match="section">
<x:role>section</x:role>
<x:name xml:lang="en">Section</x:name>
<x:templates>
<x:template color="green">
<title><?start?></title>
<p></p>
</x:template>
</x:templates>
</x:node>
The example will insert a <title> (with the cursor placed at <?start?>) and a <p> element, as well as create a color attribute.
If both <?start?> and <?end?> are used, the range from start to end will be selected.
This feature is especially useful for elements with no required content.
Namespace
http://www.xopus.com/xmlns/config
Parent element
templates