Skip to main content
blob: 5f69af3732832e74e50a26f8d4b4fb4fdff56c9c (plain) (tree)

<?xml version='1.0'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">


    <title>JET XML Tag Syntax Reference</title>

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



    <h2>JET XML Tag Syntax Reference</h2>

    <p>JET XML Tags are of two forms:</p>


      <li>Empty elements: &lt;<i>tagname</i> 

      <li>Content elements: &lt;<i>tagname</i> 


    <p>Attributes are of the form: <i>name</i>=&quot;<i>value</i>&quot; 
    or <i>name</i>=&apos;<i>value</i>&apos;. Attribute values may 
    contain any character other than the enclosing quote characters.</p>

    <p>Typically, JET XML tag names include a namespace and a tag name 
    (<i>namespace</i>:<i>name</i>). JET will recognize an XML elements 
    if it recognizes the namespace. If it does not recognize the 
    namespace, or if the tag has no namespace, and the tagname is not 
    recognized, then JET will treat the tag as text.</p>

    <h3>Standard JET Tags</h3>

    <p>JET includes standard tag libraries for the following 


      <a href="PLUGINS_ROOT/org.eclipse.jet.doc/references/taglibs/controlTags/overview.html"
      >Control tags</a> - used for template control</li>

      <a href="PLUGINS_ROOT/org.eclipse.jet.doc/references/taglibs/workspaceTags/overview.html"
      >Workspace tags</a> - used to create workspace elements such as 
      projects, folders and files</li>

      <a href="PLUGINS_ROOT/org.eclipse.jet.doc/references/taglibs/javaTags/overview.html"
      >Java tags</a> - used for created Java workspace elements such as 
      Java classes and resources</li>

      <a href="PLUGINS_ROOT/org.eclipse.jet.doc/references/taglibs/formatTags/overview.html"
      >Format tags</a> - used for reformatting text.</li>


    <h3>Defining and changing Tag namespace prefixes</h3>

    <p>The standard tags have default namespace prefixes of 
    <code>c</code>, <code>ws</code>, <code>java</code> and 
    <code>format</code> for the control, workspace, java and format 
    tags, respectively. By default, the control, java and format tags 
    are imported into every template.</p>

    <p>Tag namespace prefixes may be changed for a single template by 
    using the <a href="jetSyntaxDirectives.xhtml#taglib">@taglib</a> 
    directive. For example, the following directive changes the 
    namespace prefix for the control tags to cc:</p>

    <pre>&lt;%@taglib id=&quot;org.eclipse.jet.controlTags&quot; prefix=&quot;cc&quot;%&gt;</pre>
    <p>Individual templates may change a tag libraries namespace to 
    avoid conflicts with static text being generated by the 

    <p>To change the default prefixes for a transform requires editing 
    the JET Transformations plugin.xml file. See the 
    <a href="PLUGINS_ROOT/org.eclipse.jet.doc/references/extensionpoints/org_eclipse_jet_transform.html"
    ><code>org.eclipse.jet.transform</code></a> extension point 
    documentation for details.</p>

    <h3>Importing Tag namespaces</h3>

    <p>Tag namespaces may be imported by the &lt;%@taglib%&gt; 
    directive on individual templates, or in plugin.xml for all 
    transformation templates.</p>

    <h3>Declaring custom tags</h3>

    <p>Users may define custom tags by creating an Eclipse plug-in 
    project, adding a dependency to the <code>org.eclipse.jet</code> 
    plug-in, and then implementing the 
    <a href="PLUGINS_ROOT/org.eclipse.jet.doc/references/extensionpoints/org_eclipse_jet_tagLibraries.html"
    ><code>org.elcipse.jet.tagLibrairies</code></a> extension point.</p>



Back to the top