DPTK and JET differences

The Design Pattern Toolkit (DPTK) tags and JET tags differ in that the JET tags belong to a namespace and have a namespace prefix.

JET uses XPath expressions instead of the DPTK node language. JET tags use a select attribute to indicate an XPath expression that returns a collection of objects or a value, and a test attribute for an XPath expression expected to return a Boolean result. DPTK typically uses node or nodes attributes for this purpose. JET consistently uses the attribute var in tags that define a variable. DPTK typically uses name, but sometimes uses it in other contexts, too, and it sometimes uses useName for variable definition.

JET has the following four standard tag libraries:
  • Control tags for general template and transformation control. The default tag prefix is "c".
  • Workspace tags for creating Eclipse artifacts. The default tag prefix is "ws".
  • Java tags for creating and manipulating Eclipse Java artifacts. The default tag prefix is "java".
  • Format tags for formatting template content. The default tag prefix is "f".

The DPTK .pattern file provides pattern metadata. In JET, metadata is stored in the META-INF/MANIFEST.MF file and the plugin.xml file. Opening either of these files will open the standard Eclipse Plug-in Manifest Editor. This editor lets you edit far more information than is contained in the .pattern file. Information equivalent to that in the .pattern file is found on the Overview and Extensions tabs.

The Overview tab lets you define the unique ID of the JET transformation, as well as the version number and descriptive name. The fields circled in the screen capture below determine these values. The Provider field allows you to insert your organization name in the transformation.

Overview tab of the Plug-in Manifest Editor's Overview

Embedding model references in attribute values example

In tag attributes not expecting XPath expressions, you can include an XPath expression by enclosing it in braces: { and }.
  • For example, DPTK might have:
    <start resource="%foo(name)%.txt" .../>
  • For JET, the example would be:
    <ws:file path="{$foo/@name}.txt .../>

Feedback