The templateProject.xml file configures a project as a JSP template project. A JSP template project defines a set of JSP templates that are added to list of default JSP template options (this list is available at Window > Preferences > File Templates > Default JSP Template).
A template project contains at least one template definition, at least one source file definition used in template processing, and any number of resource definitions (GIF, JPG, etc.) associated with templates.
<template-project>
<template>
<description>
<source-ref>
<resource-ref>
<source>
<resource>
The <description> element is the child element of the <template> element. The template author should describe the properties of the template here.
<template-project>
<template>
<description>
<description> string_value </desciption>
none.
Minimum occurrences: 0
Maximum occurrences: 1
Parents: <template>
Children: none.
Describes the template file that is copied when a template is processed (when a new JSP page is created). String substitution takes place on the file as it is copied into place.
<template-project>
<resource>
<resource id="id_value" path="string_value" />
|
||||||||
Minimum occurrences: 0
Maximum occurrences: unbounded
Parents: <template-project>.
Children: none.
Describes a resource that is to be copied without string substitution when processing a template.
<template-project>
<template>
<resource-ref>
<resource-ref resource="resource_id" outputpath="path_string"/>
|
||||||||
Minimum occurrences: 0
Maximum occurrences: unbounded
Parents: <template>.
Describes a file in the standard Velocity template syntax. See http://jakarta.apache.org/velocity/index.html for details.
<template-project>
<source>
<source id="id_value" type="type_string" />
|
||||||||
Minimum occurrences: unbounded
Maximum occurrences: 1
Parents: <template-project>
Children: none.
Describes a file to be processed for string variable substitution within a template.
<template-project>
<template>
<source-ref>
<source-ref source="id_value" context="context_string" contextAdapter="contextAdapter_string" />
|
||||||||||
Minimum occurrences: 1
Maximum occurrences: unbounded
Parents: none.
Children: <template>, <source>.
A template is the logical set of files that are created when the template is selected for processing. In other words, the template is the definition of what files are output if this template is processed.
<template-project>
<template>
<description>
<source-ref>
<resource-ref>
<template id="" typeClass="" name="" icon=""> templateString </template>
|
||||||||||||
Minimum occurrences: 1
Maximum occurrences: unbounded
Parents: <template-project>.
Children: <description>, <source-ref>, <resource-ref>.
A template-project defines a set of templates that can be used in file generation actions that take advantage of file templates. A template project contains at least one template definition, at least one source file definition used in template processing, and any number of resource definitions used to copy binary resources associated with templates.
<template-project>
<template>
<source>
<resource>
<template-project icon="string_path"> children_elements </template-project>
|
||||||
Parents: none.
Children: <template>, <source>, <resource>.
Controlling Web Application Look and Feel with JSP Templates