When using content assist in the XSL editor, or when you
are creating a new XSL file, you can insert predefined XSL code from
a template file into your XSL file You might find it helpful to use
templates if you want to reuse XSL code multiple times.
About this task
A set of templates is available to help you quickly develop
XSL files. You can modify the templates to better meet your needs.
You can also create new templates. To work with XSL templates:
Procedure
- Click . The
Templates preference page opens.
- Edit an existing template, or create a new one:
- To create a new template, click New.
- To edit a template, click the template and then click Edit.
- In the Name field, type the name
of the template, and type the description in the Description field.
- In the Context list, select the context in which the template
is available in the content assist menu:
- For a template that you can insert when creating a new XSL
file, select New.
- For a template that you can insert into an XSL file that you
are editing, select Code.
- In the Pattern field,
type the XSL content of your template. If you want to insert
a variable, click Insert Variable and select
the variable that you want to insert from the list. For example, to
insert a variable for the current date, select date- Current
date.
- To save your changes, click OK.
What to do next
You can use the templates when working with XSL files
- Templates with context set to New can be inserted into a new XSL
file from the Select XSL template page in the New XSL file wizard.
- Templates with context set to Code can be inserted into an XSL
file open in the XSL editor from the content assist (CTRL + space)
menu