Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse JET Guide
Previous Page Home Next Page

JET XML Tag Syntax Reference

JET XML Tags are of two forms:

  • Empty elements: <tagname [attributes]/>
  • Content elements: <tagname [attributes]*>content</tagname>

Attributes are of the form: name="value" or name='value'. Attribute values may contain any character other than the enclosing quote characters.

Typically, JET XML tag names include a namespace and a tag name (namespace:name). 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.

Standard JET Tags

JET includes standard tag libraries for the following purposes:

  • Control tags - used for template control
  • Workspace tags - used to create workspace elements such as projects, folders and files
  • Java tags - used for created Java workspace elements such as Java classes and resources
  • Format tags - used for reformatting text.

Defining and changing Tag namespace prefixes

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

Tag namespace prefixes may be changed for a single template by using the @taglib directive. For example, the following directive changes the namespace prefix for the control tags to cc:

<%@taglib id="org.eclipse.jet.controlTags" prefix="cc"%>

Individual templates may change a tag libraries namespace to avoid conflicts with static text being generated by the template.

To change the default prefixes for a transform requires editing the JET Transformations plugin.xml file. See the org.eclipse.jet.transform extension point documentation for details.

Importing Tag namespaces

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

Declaring custom tags

Users may define custom tags by creating an Eclipse plug-in project, adding a dependency to the org.eclipse.jet plug-in, and then implementing the org.elcipse.jet.tagLibrairies extension point.

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire