Skip to main content
summaryrefslogtreecommitdiffstats
blob: 8fc6ca19d60502552abd532178851093cd77b11e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<?xml version='1.0'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

  <head>

    <title>JET Derective Syntax Reference</title>

    <link charset="ISO-8859-1" href="../../book.css" rel="STYLESHEET"
     type="text/css"/>

  </head>

  <body>

    <h2>JET Syntax Reference</h2>

    <p>JET has the following directives</p>

    <ul>

      <li><a href="#jet">@jet</a> - affects Java code created by the 
      JET compiler.</li>

      <li><a href="#taglib">@taglib</a> - imports a tag library into 
      the template for use, and assigns it a unique namespace 
      prefix.</li>

    </ul>

    <p>JET recognizes the following &quot;Classic&quot; JET directives, 
    but does not yet implement them. An error message is issued if any 
    of the following directives are recognized:</p>

    <ul>

      <li>@include</li>

      <li>@start</li>

      <li>@end</li>

    </ul>

    <p>To emit the characters <code>&lt;%@</code> in a templates 
    output, enter <code>&lt;\%@</code>. To emit <code>%&gt;</code>, 
    enter <code>%\&gt;</code></p>

    <h3><a name="jet"/>The @jet directive</h3>

    <p>The @jet directive controls the name of the generated Java 
    class, its containing package and the Java classes it imports.</p>

    <p>All attributes are optional.The following tag summarizes the 
    available attributes.</p>

    <table border="1">

      <tbody>

        <tr>

          <th>Attribute</th>

          <th>Usage</th>

        </tr>

      </tbody>

      <tbody>

        <tr>

          <td>package</td>

          <td>Name of package into which the template will be compiled. 
          May be used only once per template.</td>

        </tr>

        <tr>

          <td>class</td>

          <td>Name of Java class to be generated. May be used only once 
          per template.</td>

        </tr>

        <tr>

          <td>imports</td>

          <td>A space separated list of Java import locations.</td>

        </tr>

        <tr>

          <td>startTag</td>

          <td>A two character replacement for &lt;% in subsequent JET 
          elements.</td>

        </tr>

        <tr>

          <td>endTag</td>

          <td>A two character replacement for %&gt; in subsequent JET 
          elements.</td>

        </tr>

      </tbody>

    </table>

    <h3><a name="taglib"/>The @taglib directive</h3>

    <p>The @taglib directive imports an XML tag library, or renames the 
    taglibrary namespace prefix. Example:</p>

    <pre>&lt;%@taglib id=&quot;org.eclipse.jet.controlTags&quot; prefix=&quot;cc&quot;%&gt;</pre>
    <p>The value for prefix must be value XML NCName, namely, it must 
    start with letter or underscore (_), and then contain letters, 
    digits or the characters underscore (_), hyphen (-) or dot (.).</p>

    <p>The id for the Standard JET tag libaries are:</p>

    <table border="1">

      <tbody>

        <tr>

          <th>Tag Library</th>

          <th>ID</th>

        </tr>

        <tr>

          <td>Control Tags</td>

          <td>org.eclipse.jet.controlTags</td>

        </tr>

        <tr>

          <td>Workspace Tags</td>

          <td>org.eclipse.jet.workspaceTags</td>

        </tr>

        <tr>

          <td>Java Tags</td>

          <td>org.eclipse.jet.javaTags</td>

        </tr>

        <tr>

          <td>Format Tags</td>

          <td>org.eclipse.jet.formatTags</td>

        </tr>

      </tbody>

    </table>

  </body>

</html>

Back to the top