Templates are a chunk of predefined code that you can insert into a DTD
file when it is created. You may find a template useful when
you have a certain piece of code you want to reuse several times, and you do
not want to write it out every time.
To create a new DTD template follow these steps:
- Click
DTD
DTD.
- Click New if you want to create a completely
new template.
- Supply a new template Name and Description.
- Specify the Context for the template. This is the context in which the template is available in the proposal
list when content assist is requested.
- Specify the Pattern for your template using
the appropriate tags, attributes, or attribute values to be inserted by content
assist.
- If you want to insert a variable in your Pattern, click the
Insert Variable button
and select the variable to be inserted. For example, the date variable indicates
the current date will be inserted.
- Click Apply and then
OK to
save your changes.
You can edit, remove, import, or export a template by using the same
preferences page.
If you have a template
that you do not want to remove, but you no longer want the template to appear
in the DTD templates list when you create a file, go to the DTD Templates preferences page and
clear
its check box.