Manually migrate to Jet tags

You can manually migrate the Design Pattern Toolkit (DPTK) tags to the equivalent JET tags.
To manually migrate DPTK tags to the equivalent JET tags:
  1. Import the appropriate JET tag library.
  2. Determine the equivalent JET tag and map the DPTK tag attribute names to the equivalent JET attribute names.
  3. Convert DPTK node language expressions and dynamic attribute expressions to XPath expressions.
Note: JET provides two mechanisms for importing tag libraries. One method imports the tag libraries into all templates in the project, while the other method imports tags into a single template.
The following is an example of how to manually import the JET control and format tags into all templates.
Project-wide tag library imports are done in the plugin.xml file in the project root. The JET control tags are assigned the namespace prefix "c", while the format tags use the prefix "f". This means all control tags names will start with c: and all format tags will start with f:.
Note: The DPTK tags are also imported and have an empty prefix specified.
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
   <extension
         id=""
         name=""
         point="org.eclipse.jet.transform">
      <transform 
            startTemplate="bean.generator/control.pat" 
            templateLoaderClass="org.eclipse.jet.compiled._jet_transformation" >
         <description>bean generator</description>
         <tagLibraries>
             <importLibrary id="com.ibm.xtools.jet.dptk.dptk" 
                 usePrefix="" autoImport="true"/>
             <importLibrary id="org.eclipse.jet.controlTags"
                usePrefix="c" autoImport="true"/>
             <importLibrary id="org.eclipse.jet.formatTags"
                 usePrefix="f" autoImport="true"/>
         </tagLibraries>
      </transform>
   </extension>
</plugin>

The following example imports the JET workspace tags into a template.

To import a JET tag library into a particular template, or to change the namespace prefix associated with the tag library in a particular template, the @taglib directive must be used. The @taglib directive is usually placed at the beginning of a template.

<%@taglib prefix="ws" id="org.eclipse.jet.workspaceTags"%>

Feedback