Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'doc/org.eclipse.jet.doc/references/syntax/jetSyntaxDirectives.xhtml')
-rw-r--r--doc/org.eclipse.jet.doc/references/syntax/jetSyntaxDirectives.xhtml184
1 files changed, 184 insertions, 0 deletions
diff --git a/doc/org.eclipse.jet.doc/references/syntax/jetSyntaxDirectives.xhtml b/doc/org.eclipse.jet.doc/references/syntax/jetSyntaxDirectives.xhtml
new file mode 100644
index 0000000..8fc6ca1
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/syntax/jetSyntaxDirectives.xhtml
@@ -0,0 +1,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