summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2006-04-12 13:33:30 (EDT)
committer pelder2006-04-12 13:33:30 (EDT)
commitaa572e820c746df28d187d7b7d99dc5fbe6a5ed4 (patch)
treefb799bd50721df833b2705debb28884e1c6d3131
parent5700b13db598b2fec7e15a3ed3049ec998ce5a9f (diff)
downloadorg.eclipse.jet-aa572e820c746df28d187d7b7d99dc5fbe6a5ed4.zip
org.eclipse.jet-aa572e820c746df28d187d7b7d99dc5fbe6a5ed4.tar.gz
org.eclipse.jet-aa572e820c746df28d187d7b7d99dc5fbe6a5ed4.tar.bz2
[136392] Add DPTK parity XPath functions and tags.
-rw-r--r--doc/org.eclipse.jet.doc/references/.cvsignore1
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/controlTags/dumpTag.html86
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/controlTags/loadContentTag.html92
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/controlTags/nodeAttributesTag.html92
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/controlTags/overview.html35
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/controlTags/replaceStringsTag.html80
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/controlTags/stringTokensTag.html104
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/formatTags/formatNowTag.html70
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/formatTags/millisecondsTag.html66
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/formatTags/overview.html28
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/formatTags/uniqueTag.html66
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/formatTags/uuidTag.html66
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/workspaceTags/overview.html7
-rw-r--r--doc/org.eclipse.jet.doc/references/taglibs/workspaceTags/rebuildWorkspaceTag.html66
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/camelCaseFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/cardinalityFunction.html80
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/classNameFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/escapeJavaWhitespaceFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/lower-caseFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/lower_caseFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/lowercaseFirstFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/overview.html117
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/packageNameFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/removeWhitespaceFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/trimWhitespaceFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/upper-caseFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/upper_caseFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/uppercaseFirstFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/references/xpathFunctions/xmlEncodeFunction.html76
-rw-r--r--doc/org.eclipse.jet.doc/toc.xml1
-rw-r--r--doc/org.eclipse.jet.doc/toccontrolTags.xml5
-rw-r--r--doc/org.eclipse.jet.doc/tocformatTags.xml4
-rw-r--r--doc/org.eclipse.jet.doc/tocworkspaceTags.xml1
-rw-r--r--plugins/org.eclipse.jet/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.jet/plugin.xml160
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/JavaUtil.java95
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/MethodBodyCreator.java42
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2JavaGenerator.java3
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/exceptions/MissingRequiredAttributeException.java47
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/exceptions/NoMatchingNodeException.java47
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java6
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties3
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/DumpTag.java225
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/LoadContentTag.java105
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/NodeAttributesTag.java176
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/ReplaceStringsTag.java203
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/StringTokensTag.java328
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/FormatContextExtender.java92
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/FormatNowTag.java89
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/MillisecondsTag.java67
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/UniqueTag.java60
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/UuidTag.java67
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/RebuildWorkspaceAction.java85
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/RebuildWorkspaceTag.java73
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/CamelCaseFunction.java65
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/CardinalityFunction.java57
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/ClassNameFunction.java56
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/EscapeJavaWhitespaceFunction.java50
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/Lower_caseFunction.java50
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/LowercaseFirstFunction.java50
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/PackageNameFunction.java51
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/RemoveWhitespaceFunction.java55
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/TrimWhitespaceFunction.java50
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/Upper_caseFunction.java50
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/UppercaseFirstFunction.java50
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/XmlEncodeFunction.java59
-rw-r--r--plugins/org.eclipse.jet/templates/jet2java.javajet4
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllTests.java5
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/AllTests.java18
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatContextExtenderTests.java42
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatNowTagTests.java60
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/UuidTagTests.java56
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/AllTests.java28
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/CamelCaseFunctionTests.java42
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/CardinalityFunctionTests.java84
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/ClassNameFunctionTests.java44
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/EscapeJavaWhitespaceFunctionTests.java26
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/LowerCaseFunctionTests.java25
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/LowercaseFirstFunctionTests.java31
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/PackageNameFunctionTests.java44
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/RemoveWhitespaceFunctionTests.java23
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/TrimWhitespaceFunctionTests.java24
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/UpperCaseFirstFunctionTests.java41
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/UpperCaseFunctionTests.java25
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/XMLEncodeFunctionTests.java25
85 files changed, 5276 insertions, 44 deletions
diff --git a/doc/org.eclipse.jet.doc/references/.cvsignore b/doc/org.eclipse.jet.doc/references/.cvsignore
index e69de29..863d673 100644
--- a/doc/org.eclipse.jet.doc/references/.cvsignore
+++ b/doc/org.eclipse.jet.doc/references/.cvsignore
@@ -0,0 +1 @@
+javadoc
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/controlTags/dumpTag.html b/doc/org.eclipse.jet.doc/references/taglibs/controlTags/dumpTag.html
new file mode 100644
index 0000000..6d0cad4
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/taglibs/controlTags/dumpTag.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>&lt;c:dump&gt; - Standard JET2 Control Tags</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left">
+ <P>&lt;c:dump&gt;</P></TH>
+ <TH align="right"><A href="overview.html">Standard JET2 Control Tags</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<P><B>dump</B></P>
+<P>Writes out the DOM subtree under a specified model node.</P>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Tag Summary</TH></TR>
+ <TR>
+ <TD width="10%">required</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;c:dump select=&quot;<I>value</I>&quot;/&gt;<br>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="10%">full tag</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;c:dump select=&quot;<I>value</I>&quot; format=&quot;<I>value</I>&quot; entities=&quot;<I>value</I>&quot;/&gt;<br>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<exists node="tag/attribute use='required'">
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Attributes</TH></TR>
+ <TR>
+ <TD width="10%">select</TD>
+ <TD>A query expression specifying a single node in the model</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+</exists>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Optional Attributes</TH></TR>
+ <TR>
+ <TR>
+ <TD width="10%">format</TD>
+ <TD>A true/false value indicating whether the tag should try to write out whitespace to cause the output to be nicely formatted and indented.</TD>
+ </TR>
+ <TR>
+ <TD width="10%">entities</TD>
+ <TD>A true/false value indicating whether characters that can cause XML parsing problems (left and right angle brackets, quotes, apostrophes, etc) should be written as entities (e.g. "%lt;" for the left angle bracket).</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example</TH></TR>
+ <TR>
+ <TD width="10%"></TD>
+ <TD><SPAN style="font-family: monospace">
+<!-- Begin dump example -->
+
+ &lt;c:dump select=&quot;<I>value</I>&quot;/&gt;<br>
+<!-- End dump example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/controlTags/loadContentTag.html b/doc/org.eclipse.jet.doc/references/taglibs/controlTags/loadContentTag.html
new file mode 100644
index 0000000..034c6f1
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/taglibs/controlTags/loadContentTag.html
@@ -0,0 +1,92 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>&lt;c:loadContent&gt; - Standard JET2 Control Tags</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left">
+ <P>&lt;c:loadContent&gt;</P></TH>
+ <TH align="right"><A href="overview.html">Standard JET2 Control Tags</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<P><B>loadContent</B></P>
+<P>Extends the model by parsing its contents as XML.</P>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Tag Summary</TH></TR>
+ <TR>
+ <TD width="10%">required</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;c:loadContent var=&quot;<I>value</I>&quot;&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<I>content consumed by tag evaluation</I><BR>
+ &lt;/c:loadContent&gt;
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="10%">full tag</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;c:loadContent var=&quot;<I>value</I>&quot; type=&quot;<I>value</I>&quot; loader=&quot;<I>value</I>&quot;&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<I>content consumed by tag evaluation</I><BR>
+ &lt;/c:loadContent&gt;
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<exists node="tag/attribute use='required'">
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Attributes</TH></TR>
+ <TR>
+ <TD width="10%">var</TD>
+ <TD>A name to associate with the document root of the DOM created by the parse. Subsequent template tags can use this name in query expressions to access the data in this DOM.</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+</exists>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Optional Attributes</TH></TR>
+ <TR>
+ <TR>
+ <TD width="10%">type</TD>
+ <TD>A content type with which to search for an appropriate loader for the content. Defaults to "xml" if null.</TD>
+ </TR>
+ <TR>
+ <TD width="10%">loader</TD>
+ <TD>The id of a specific loader which will parse the content and build a model.</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example</TH></TR>
+ <TR>
+ <TD width="10%"></TD>
+ <TD><SPAN style="font-family: monospace">
+<!-- Begin loadContent example -->
+
+ &lt;c:loadContent var=&quot;<I>value</I>&quot;&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<I>content consumed by tag evaluation</I><BR>
+ &lt;/c:loadContent&gt;
+<!-- End loadContent example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/controlTags/nodeAttributesTag.html b/doc/org.eclipse.jet.doc/references/taglibs/controlTags/nodeAttributesTag.html
new file mode 100644
index 0000000..7f44bea
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/taglibs/controlTags/nodeAttributesTag.html
@@ -0,0 +1,92 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>&lt;c:nodeAttributes&gt; - Standard JET2 Control Tags</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left">
+ <P>&lt;c:nodeAttributes&gt;</P></TH>
+ <TH align="right"><A href="overview.html">Standard JET2 Control Tags</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<P><B>nodeAttributes</B></P>
+<P>Iterates over the attributes for a given node.</P>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Tag Summary</TH></TR>
+ <TR>
+ <TD width="10%">required</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;c:nodeAttributes node=&quot;<I>value</I>&quot; name=&quot;<I>value</I>&quot;&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<I>content to be repeated for each iteration</I><BR>
+ &lt;/c:nodeAttributes&gt;
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="10%">full tag</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;c:nodeAttributes node=&quot;<I>value</I>&quot; name=&quot;<I>value</I>&quot; delimiter=&quot;<I>value</I>&quot;&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<I>content to be repeated for each iteration</I><BR>
+ &lt;/c:nodeAttributes&gt;
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<exists node="tag/attribute use='required'">
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Attributes</TH></TR>
+ <TR>
+ <TD width="10%">node</TD>
+ <TD>A query expression that resolves to a single node. The nodeAttributes tag will iterate over this node's attributes.</TD>
+ </TR>
+ <TR>
+ <TD width="10%">name</TD>
+ <TD>The variable name to associate with each temporary node describing an attribute. Once the variable name is assigned to the temporary node, the nodeAttributes tag will process its contents once.</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+</exists>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Optional Attributes</TH></TR>
+ <TR>
+ <TR>
+ <TD width="10%">delimiter</TD>
+ <TD>A string to write out after every iteration except the last.</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example</TH></TR>
+ <TR>
+ <TD width="10%"></TD>
+ <TD><SPAN style="font-family: monospace">
+<!-- Begin nodeAttributes example -->
+
+ &lt;c:nodeAttributes node=&quot;<I>value</I>&quot; name=&quot;<I>value</I>&quot;&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<I>content to be repeated for each iteration</I><BR>
+ &lt;/c:nodeAttributes&gt;
+<!-- End nodeAttributes example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/controlTags/overview.html b/doc/org.eclipse.jet.doc/references/taglibs/controlTags/overview.html
index 5a13eb5..29501f3 100644
--- a/doc/org.eclipse.jet.doc/references/taglibs/controlTags/overview.html
+++ b/doc/org.eclipse.jet.doc/references/taglibs/controlTags/overview.html
@@ -184,6 +184,41 @@
<!-- End invokeTransform description -->
</TD>
</TR>
+ <TR>
+ <TD width="10%"><A href="dumpTag.html">&lt;c:dump&gt;</A></TD>
+ <TD><!-- Begin dump description -->
+ Writes out the DOM subtree under a specified model node
+ <!-- End dump description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="loadContentTag.html">&lt;c:loadContent&gt;</A></TD>
+ <TD><!-- Begin loadContent description -->
+ Extends the model by parsing its contents as XML
+ <!-- End loadContent description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="nodeAttributesTag.html">&lt;c:nodeAttributes&gt;</A></TD>
+ <TD><!-- Begin nodeAttributes description -->
+ Iterates over the attributes for a given node
+ <!-- End nodeAttributes description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="replaceStringsTag.html">&lt;c:replaceStrings&gt;</A></TD>
+ <TD><!-- Begin replaceStrings description -->
+ Replaces one set of strings in its content with another set of strings and writes out the result
+ <!-- End replaceStrings description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="stringTokensTag.html">&lt;c:stringTokens&gt;</A></TD>
+ <TD><!-- Begin stringTokens description -->
+ Parses a string into tokens and iterates over its content for each token
+ <!-- End stringTokens description -->
+ </TD>
+ </TR>
</TBODY>
</TABLE>
<HR>
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/controlTags/replaceStringsTag.html b/doc/org.eclipse.jet.doc/references/taglibs/controlTags/replaceStringsTag.html
new file mode 100644
index 0000000..c7885bc
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/taglibs/controlTags/replaceStringsTag.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>&lt;c:replaceStrings&gt; - Standard JET2 Control Tags</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left">
+ <P>&lt;c:replaceStrings&gt;</P></TH>
+ <TH align="right"><A href="overview.html">Standard JET2 Control Tags</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<P><B>replaceStrings</B></P>
+<P>Replaces one set of strings in its content with another set of strings and writes out the result.</P>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Tag Summary</TH></TR>
+ <TR>
+ <TD width="10%">required</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;c:replaceStrings replace=&quot;<I>value</I>&quot; with=&quot;<I>value</I>&quot;&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<I>content consumed by tag evaluation</I><BR>
+ &lt;/c:replaceStrings&gt;
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="10%">full tag</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;c:replaceStrings replace=&quot;<I>value</I>&quot; with=&quot;<I>value</I>&quot;&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<I>content consumed by tag evaluation</I><BR>
+ &lt;/c:replaceStrings&gt;
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<exists node="tag/attribute use='required'">
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Attributes</TH></TR>
+ <TR>
+ <TD width="10%">replace</TD>
+ <TD>A comma-separated list of strings to be replaced. The backslash ("\") acts as an escape character for special characters</TD>
+ </TR>
+ <TR>
+ <TD width="10%">with</TD>
+ <TD>A comma-separated list of replacement strings corresponding to the strings in the replace attribute.</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+</exists>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example</TH></TR>
+ <TR>
+ <TD width="10%"></TD>
+ <TD><SPAN style="font-family: monospace">
+<!-- Begin replaceStrings example -->
+
+ &lt;c:replaceStrings replace=&quot;<I>value</I>&quot; with=&quot;<I>value</I>&quot;&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<I>content consumed by tag evaluation</I><BR>
+ &lt;/c:replaceStrings&gt;
+<!-- End replaceStrings example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/controlTags/stringTokensTag.html b/doc/org.eclipse.jet.doc/references/taglibs/controlTags/stringTokensTag.html
new file mode 100644
index 0000000..3d9eda7
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/taglibs/controlTags/stringTokensTag.html
@@ -0,0 +1,104 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>&lt;c:stringTokens&gt; - Standard JET2 Control Tags</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left">
+ <P>&lt;c:stringTokens&gt;</P></TH>
+ <TH align="right"><A href="overview.html">Standard JET2 Control Tags</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<P><B>stringTokens</B></P>
+<P>Parses a string into tokens and iterates over its content for each token.</P>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Tag Summary</TH></TR>
+ <TR>
+ <TD width="10%">required</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;c:stringTokens string=&quot;<I>value</I>&quot; name=&quot;<I>value</I>&quot;&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<I>content to be repeated for each iteration</I><BR>
+ &lt;/c:stringTokens&gt;
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="10%">full tag</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;c:stringTokens string=&quot;<I>value</I>&quot; name=&quot;<I>value</I>&quot; delimitedBy=&quot;<I>value</I>&quot; delimiter=&quot;<I>value</I>&quot; reverse=&quot;<I>value</I>&quot; tokenLength=&quot;<I>value</I>&quot;&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<I>content to be repeated for each iteration</I><BR>
+ &lt;/c:stringTokens&gt;
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<exists node="tag/attribute use='required'">
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Attributes</TH></TR>
+ <TR>
+ <TD width="10%">string</TD>
+ <TD>The string to be parsed</TD>
+ </TR>
+ <TR>
+ <TD width="10%">name</TD>
+ <TD>The variable name to be associated with the temporary model nodes describing the tokens. Nested tags can use this variable name to refer to the temporary node.</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+</exists>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Optional Attributes</TH></TR>
+ <TR>
+ <TR>
+ <TD width="10%">delimitedBy</TD>
+ <TD>The tokens that delimit the tokens in the string</TD>
+ </TR>
+ <TR>
+ <TD width="10%">delimiter</TD>
+ <TD>The string to write after every iteration except the last</TD>
+ </TR>
+ <TR>
+ <TD width="10%">reverse</TD>
+ <TD>A true/false value indicating whether the tokens should be iterated over first-to-last (false) or last-to-first (true)</TD>
+ </TR>
+ <TR>
+ <TD width="10%">tokenLength</TD>
+ <TD>Default description for attribute tokenLength</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example</TH></TR>
+ <TR>
+ <TD width="10%"></TD>
+ <TD><SPAN style="font-family: monospace">
+<!-- Begin stringTokens example -->
+
+ &lt;c:stringTokens string=&quot;<I>value</I>&quot; name=&quot;<I>value</I>&quot;&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;<I>content to be repeated for each iteration</I><BR>
+ &lt;/c:stringTokens&gt;
+<!-- End stringTokens example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/formatTags/formatNowTag.html b/doc/org.eclipse.jet.doc/references/taglibs/formatTags/formatNowTag.html
new file mode 100644
index 0000000..8596cb3
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/taglibs/formatTags/formatNowTag.html
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>&lt;f:formatNow&gt; - Standard JET2 Format Tags</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left">
+ <P>&lt;f:formatNow&gt;</P></TH>
+ <TH align="right"><A href="overview.html">Standard JET2 Format Tags</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<P><B>formatNow</B></P>
+<P>Formats and writes out the current date and time</P>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Tag Summary</TH></TR>
+ <TR>
+ <TD width="10%">required</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;f:formatNow pattern=&quot;<I>value</I>&quot;/&gt;<br>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="10%">full tag</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;f:formatNow pattern=&quot;<I>value</I>&quot;/&gt;<br>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<exists node="tag/attribute use='required'">
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Attributes</TH></TR>
+ <TR>
+ <TD width="10%">pattern</TD>
+ <TD>The pattern with which to format the current data and time. See documentation for the Java class java.util.SimpleDateFormat for more details.</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+</exists>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example</TH></TR>
+ <TR>
+ <TD width="10%"></TD>
+ <TD><SPAN style="font-family: monospace">
+<!-- Begin formatNow example -->
+
+ &lt;f:formatNow pattern=&quot;<I>value</I>&quot;/&gt;<br>
+<!-- End formatNow example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/formatTags/millisecondsTag.html b/doc/org.eclipse.jet.doc/references/taglibs/formatTags/millisecondsTag.html
new file mode 100644
index 0000000..7b95b93
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/taglibs/formatTags/millisecondsTag.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>&lt;f:milliseconds&gt; - Standard JET2 Format Tags</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left">
+ <P>&lt;f:milliseconds&gt;</P></TH>
+ <TH align="right"><A href="overview.html">Standard JET2 Format Tags</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<P><B>milliseconds</B></P>
+<P>Writes out a current system milliseconds value.</P>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Tag Summary</TH></TR>
+ <TR>
+ <TD width="10%">required</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;f:milliseconds/&gt;<br>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="10%">full tag</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;f:milliseconds/&gt;<br>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<exists node="tag/attribute use='required'">
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Attributes</TH></TR>
+ </TBODY>
+</TABLE>
+</exists>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example</TH></TR>
+ <TR>
+ <TD width="10%"></TD>
+ <TD><SPAN style="font-family: monospace">
+<!-- Begin milliseconds example -->
+
+ &lt;f:milliseconds/&gt;<br>
+<!-- End milliseconds example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/formatTags/overview.html b/doc/org.eclipse.jet.doc/references/taglibs/formatTags/overview.html
index 738ce68..83de641 100644
--- a/doc/org.eclipse.jet.doc/references/taglibs/formatTags/overview.html
+++ b/doc/org.eclipse.jet.doc/references/taglibs/formatTags/overview.html
@@ -51,6 +51,34 @@
<!-- End lc description -->
</TD>
</TR>
+ <TR>
+ <TD width="10%"><A href="formatNowTag.html">&lt;f:formatNow&gt;</A></TD>
+ <TD><!-- Begin formatNow description -->
+ Formats and writes out the current date and time
+ <!-- End formatNow description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="millisecondsTag.html">&lt;f:milliseconds&gt;</A></TD>
+ <TD><!-- Begin milliseconds description -->
+ Writes out a current system milliseconds value
+ <!-- End milliseconds description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="uniqueTag.html">&lt;f:unique&gt;</A></TD>
+ <TD><!-- Begin unique description -->
+ Writes out a unique integer value
+ <!-- End unique description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="uuidTag.html">&lt;f:uuid&gt;</A></TD>
+ <TD><!-- Begin uuid description -->
+ Default description for tag uuid
+ <!-- End uuid description -->
+ </TD>
+ </TR>
</TBODY>
</TABLE>
<HR>
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/formatTags/uniqueTag.html b/doc/org.eclipse.jet.doc/references/taglibs/formatTags/uniqueTag.html
new file mode 100644
index 0000000..f30cbf6
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/taglibs/formatTags/uniqueTag.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>&lt;f:unique&gt; - Standard JET2 Format Tags</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left">
+ <P>&lt;f:unique&gt;</P></TH>
+ <TH align="right"><A href="overview.html">Standard JET2 Format Tags</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<P><B>unique</B></P>
+<P>Writes out a unique integer value</P>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Tag Summary</TH></TR>
+ <TR>
+ <TD width="10%">required</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;f:unique/&gt;<br>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="10%">full tag</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;f:unique/&gt;<br>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<exists node="tag/attribute use='required'">
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Attributes</TH></TR>
+ </TBODY>
+</TABLE>
+</exists>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example</TH></TR>
+ <TR>
+ <TD width="10%"></TD>
+ <TD><SPAN style="font-family: monospace">
+<!-- Begin unique example -->
+
+ &lt;f:unique/&gt;<br>
+<!-- End unique example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/formatTags/uuidTag.html b/doc/org.eclipse.jet.doc/references/taglibs/formatTags/uuidTag.html
new file mode 100644
index 0000000..2723720
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/taglibs/formatTags/uuidTag.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>&lt;f:uuid&gt; - Standard JET2 Format Tags</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left">
+ <P>&lt;f:uuid&gt;</P></TH>
+ <TH align="right"><A href="overview.html">Standard JET2 Format Tags</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<P><B>uuid</B></P>
+<P>Default description for tag uuid</P>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Tag Summary</TH></TR>
+ <TR>
+ <TD width="10%">required</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;f:uuid/&gt;<br>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="10%">full tag</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;f:uuid/&gt;<br>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<exists node="tag/attribute use='required'">
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Attributes</TH></TR>
+ </TBODY>
+</TABLE>
+</exists>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example</TH></TR>
+ <TR>
+ <TD width="10%"></TD>
+ <TD><SPAN style="font-family: monospace">
+<!-- Begin uuid example -->
+
+ &lt;f:uuid/&gt;<br>
+<!-- End uuid example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/workspaceTags/overview.html b/doc/org.eclipse.jet.doc/references/taglibs/workspaceTags/overview.html
index f8d80de..374d51b 100644
--- a/doc/org.eclipse.jet.doc/references/taglibs/workspaceTags/overview.html
+++ b/doc/org.eclipse.jet.doc/references/taglibs/workspaceTags/overview.html
@@ -51,6 +51,13 @@
<!-- End copyFile description -->
</TD>
</TR>
+ <TR>
+ <TD width="10%"><A href="rebuildWorkspaceTag.html">&lt;ws:rebuildWorkspace&gt;</A></TD>
+ <TD><!-- Begin rebuildWorkspace description -->
+ Causes the Eclipse workspace to process resources that were changed or created by the pattern
+ <!-- End rebuildWorkspace description -->
+ </TD>
+ </TR>
</TBODY>
</TABLE>
<HR>
diff --git a/doc/org.eclipse.jet.doc/references/taglibs/workspaceTags/rebuildWorkspaceTag.html b/doc/org.eclipse.jet.doc/references/taglibs/workspaceTags/rebuildWorkspaceTag.html
new file mode 100644
index 0000000..f833d60
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/taglibs/workspaceTags/rebuildWorkspaceTag.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>&lt;ws:rebuildWorkspace&gt; - Standard JET2 Workspace Tags</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left">
+ <P>&lt;ws:rebuildWorkspace&gt;</P></TH>
+ <TH align="right"><A href="overview.html">Standard JET2 Workspace Tags</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<P><B>rebuildWorkspace</B></P>
+<P>Causes the Eclipse workspace to process resources that were changed or created by the pattern.</P>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Tag Summary</TH></TR>
+ <TR>
+ <TD width="10%">required</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;ws:rebuildWorkspace/&gt;<br>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="10%">full tag</TD>
+ <TD><SPAN style="font-family: monospace">
+ &lt;ws:rebuildWorkspace/&gt;<br>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<exists node="tag/attribute use='required'">
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Attributes</TH></TR>
+ </TBODY>
+</TABLE>
+</exists>
+<HR>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example</TH></TR>
+ <TR>
+ <TD width="10%"></TD>
+ <TD><SPAN style="font-family: monospace">
+<!-- Begin rebuildWorkspace example -->
+
+ &lt;ws:rebuildWorkspace/&gt;<br>
+<!-- End rebuildWorkspace example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/camelCaseFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/camelCaseFunction.html
new file mode 100644
index 0000000..8a8ad60
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/camelCaseFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>camelCase XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>camelCase()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>camelCase</H2>
+<P>Uppercases the first letter in each token and removes all whitespace.</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String camelCase (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String camelCase (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String text</B></TD>
+ <TD>any string</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin camelCase example -->
+ <B>camelCase</B>("abstract business object")<br>
+ <P>returns the string "AbstractBusinessObject"</P>
+<!-- End camelCase example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/cardinalityFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/cardinalityFunction.html
new file mode 100644
index 0000000..a15f312
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/cardinalityFunction.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>cardinality XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>cardinality()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>cardinality</H2>
+<P>Returns whether an XPath expression returns zero, one or more than one node</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ Boolean cardinality (XPath expression , String cardinality)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ Boolean cardinality (XPath expression , String cardinality)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>XPath expression</B></TD>
+ <TD>an XPath expression that returns some number of nodes</TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String cardinality</B></TD>
+ <TD>Contains any combination of the characters '0', '1' and 'M'.</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin cardinality example -->
+ <B>cardinality</B>(/root/plugin , "1M")<br>
+ <P>returns true if there are one or more child elements named "plugin" under the top-level node named "root", or false otherwise.</P>
+<!-- End cardinality example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/classNameFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/classNameFunction.html
new file mode 100644
index 0000000..6966e53
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/classNameFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>className XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>className()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>className</H2>
+<P>Returns the classname from a fully quallified classname</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String className (String fullyQuallified)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String className (String fullyQuallified)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String fullyQuallified</B></TD>
+ <TD>a fully qualified classname</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin className example -->
+ <B>className</B>("java.lang.String")<br>
+ <P>returns the string "String"</P>
+<!-- End className example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/escapeJavaWhitespaceFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/escapeJavaWhitespaceFunction.html
new file mode 100644
index 0000000..14a9aa0
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/escapeJavaWhitespaceFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>escapeJavaWhitespace XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>escapeJavaWhitespace()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>escapeJavaWhitespace</H2>
+<P>Replaces whitespace characters with their escaped java string equivalent strings.</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String escapeJavaWhitespace (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String escapeJavaWhitespace (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String text</B></TD>
+ <TD>any string</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin escapeJavaWhitespace example -->
+ <B>escapeJavaWhitespace</B>("tab separated tokens")<br>
+ <P>returns the string "tab/tseparated/ttokens"</P>
+<!-- End escapeJavaWhitespace example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/lower-caseFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/lower-caseFunction.html
new file mode 100644
index 0000000..b068227
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/lower-caseFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>lower-case XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>lower-case()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>lower-case</H2>
+<P>lowercases the entire string.</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String lower-case (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String lower-case (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String text</B></TD>
+ <TD>any string</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin lower-case example -->
+ <B>lower-case</B>("Abc Def")<br>
+ <P>returns the string "abc def"</P>
+<!-- End lower-case example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/lower_caseFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/lower_caseFunction.html
new file mode 100644
index 0000000..b068227
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/lower_caseFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>lower-case XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>lower-case()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>lower-case</H2>
+<P>lowercases the entire string.</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String lower-case (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String lower-case (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String text</B></TD>
+ <TD>any string</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin lower-case example -->
+ <B>lower-case</B>("Abc Def")<br>
+ <P>returns the string "abc def"</P>
+<!-- End lower-case example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/lowercaseFirstFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/lowercaseFirstFunction.html
new file mode 100644
index 0000000..83c0432
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/lowercaseFirstFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>lowercaseFirst XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>lowercaseFirst()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>lowercaseFirst</H2>
+<P>Lowercases the first charater in the string.</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String lowercaseFirst (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String lowercaseFirst (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String text</B></TD>
+ <TD>any string</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin lowercaseFirst example -->
+ <B>lowercaseFirst</B>("ABC DEF")<br>
+ <P>returns the string "aBC DEF"</P>
+<!-- End lowercaseFirst example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/overview.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/overview.html
new file mode 100644
index 0000000..141d75a
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/overview.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Additional XPath Functions</title>
+</head>
+<body>
+<H2>Additional XPath Functions</H2>
+<P>
+The following functions are included in JET, in addition to the XPath functions specified by the
+<a href="http://www.w3.org/TR/xpath#corelib">XPath 1.0 Core Function Library</a>.
+</P>
+<TABLE border="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary</TH></TR>
+ <TR>
+ <TD width="10%"><A href="camelCaseFunction.html">camelCase</A></TD>
+ <TD>
+ <!-- Begin camelCase description -->
+ Uppercases the first letter in each token and removes all whitespace.
+ <!-- End camelCase description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="cardinalityFunction.html">cardinality</A></TD>
+ <TD>
+ <!-- Begin cardinality description -->
+ Returns whether an XPath expression returns zero, one or more than one node
+ <!-- End cardinality description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="classNameFunction.html">className</A></TD>
+ <TD>
+ <!-- Begin className description -->
+ Returns the classname from a fully quallified classname
+ <!-- End className description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="escapeJavaWhitespaceFunction.html">escapeJavaWhitespace</A></TD>
+ <TD>
+ <!-- Begin escapeJavaWhitespace description -->
+ Replaces whitespace characters with their escaped java string equivalent strings.
+ <!-- End escapeJavaWhitespace description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="lower_caseFunction.html">lower-case</A></TD>
+ <TD>
+ <!-- Begin lower-case description -->
+ lowercases the entire string.
+ <!-- End lower-case description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="lowercaseFirstFunction.html">lowercaseFirst</A></TD>
+ <TD>
+ <!-- Begin lowercaseFirst description -->
+ Lowercases the first charater in the string.
+ <!-- End lowercaseFirst description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="xmlEncodeFunction.html">xmlEncode</A></TD>
+ <TD>
+ <!-- Begin xmlEncode description -->
+ Replaces characters that cause problems when parsing XML streams with the equivalent XML entities.
+ <!-- End xmlEncode description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="packageNameFunction.html">packageName</A></TD>
+ <TD>
+ <!-- Begin packageName description -->
+ Returns the package name from a fully-qualified Java class name
+ <!-- End packageName description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="removeWhitespaceFunction.html">removeWhitespace</A></TD>
+ <TD>
+ <!-- Begin removeWhitespace description -->
+ Removes all whitespace from a string.
+ <!-- End removeWhitespace description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="trimWhitespaceFunction.html">trimWhitespace</A></TD>
+ <TD>
+ <!-- Begin trimWhitespace description -->
+ Removes all leading and trailing whitespace from a string
+ <!-- End trimWhitespace description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="upper_caseFunction.html">upper-case</A></TD>
+ <TD>
+ <!-- Begin upper-case description -->
+ Uppercases all charaters in the string.
+ <!-- End upper-case description -->
+ </TD>
+ </TR>
+ <TR>
+ <TD width="10%"><A href="uppercaseFirstFunction.html">uppercaseFirst</A></TD>
+ <TD>
+ <!-- Begin uppercaseFirst description -->
+ Uppercases the first letter in the string
+ <!-- End uppercaseFirst description -->
+ </TD>
+ </TR>
+ </TBODY>
+</TABLE>
+
+</body>
+</html> \ No newline at end of file
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/packageNameFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/packageNameFunction.html
new file mode 100644
index 0000000..d0c2da1
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/packageNameFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>packageName XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>packageName()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>packageName</H2>
+<P>Returns the package name from a fully-qualified Java class name</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String packageName (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String packageName (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String text</B></TD>
+ <TD>a fully-qualified Java class name</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin packageName example -->
+ <B>packageName</B>("java.lang.String")<br>
+ <P>returns the string "java.lang"</P>
+<!-- End packageName example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/removeWhitespaceFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/removeWhitespaceFunction.html
new file mode 100644
index 0000000..bac57c2
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/removeWhitespaceFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>removeWhitespace XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>removeWhitespace()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>removeWhitespace</H2>
+<P>Removes all whitespace from a string.</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String removeWhitespace (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String removeWhitespace (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String text</B></TD>
+ <TD>any string</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin removeWhitespace example -->
+ <B>removeWhitespace</B>("abc Def ghi")<br>
+ <P>returns the string "abcDefghih"</P>
+<!-- End removeWhitespace example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/trimWhitespaceFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/trimWhitespaceFunction.html
new file mode 100644
index 0000000..a582025
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/trimWhitespaceFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>trimWhitespace XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>trimWhitespace()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>trimWhitespace</H2>
+<P>Removes all leading and trailing whitespace from a string</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String trimWhitespace (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String trimWhitespace (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String text</B></TD>
+ <TD>any string</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin trimWhitespace example -->
+ <B>trimWhitespace</B>(" abcde ")<br>
+ <P>returns the string "abcde"</P>
+<!-- End trimWhitespace example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/upper-caseFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/upper-caseFunction.html
new file mode 100644
index 0000000..24dc94f
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/upper-caseFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>upper-case XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>upper-case()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>upper-case</H2>
+<P>Uppercases all charaters in the string.</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String upper-case (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String upper-case (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String text</B></TD>
+ <TD>any string</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin upper-case example -->
+ <B>upper-case</B>("abc def)<br>
+ <P>returns the string "ABC DEF"</P>
+<!-- End upper-case example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/upper_caseFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/upper_caseFunction.html
new file mode 100644
index 0000000..24dc94f
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/upper_caseFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>upper-case XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>upper-case()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>upper-case</H2>
+<P>Uppercases all charaters in the string.</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String upper-case (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String upper-case (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String text</B></TD>
+ <TD>any string</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin upper-case example -->
+ <B>upper-case</B>("abc def)<br>
+ <P>returns the string "ABC DEF"</P>
+<!-- End upper-case example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/uppercaseFirstFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/uppercaseFirstFunction.html
new file mode 100644
index 0000000..3a00ff2
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/uppercaseFirstFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>uppercaseFirst XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>uppercaseFirst()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>uppercaseFirst</H2>
+<P>Uppercases the first letter in the string</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String uppercaseFirst (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String uppercaseFirst (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String text</B></TD>
+ <TD>any string</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin uppercaseFirst example -->
+ <B>uppercaseFirst</B>("abd def")<br>
+ <P>returns the string "Abc def"</P>
+<!-- End uppercaseFirst example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/references/xpathFunctions/xmlEncodeFunction.html b/doc/org.eclipse.jet.doc/references/xpathFunctions/xmlEncodeFunction.html
new file mode 100644
index 0000000..f275798
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/xpathFunctions/xmlEncodeFunction.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<META name="GENERATOR" content="IBM Software Development Platform">
+<TITLE>xmlEncode XPath function</TITLE>
+</HEAD>
+<BODY>
+<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
+ <TBODY>
+ <TR>
+ <TH align="left"><P>xmlEncode()</P></TH>
+ <TH align="right"><A href="overview.html">Additional XPath Functions</A></TH>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<H2>xmlEncode</H2>
+<P>Replaces characters that cause problems when parsing XML streams with the equivalent XML entities.</P>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Function Summary<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD width="20%" valign="top">minimal arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String xmlEncode (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top">all arguments</TD>
+ <TD><SPAN style="font-family: monospace" valign="top">
+ String xmlEncode (String text)<BR>&nbsp;<BR>
+ </SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Required Arguments<BR>&nbsp;</TH>
+ </TR>
+ <TR>
+ <TD width="20%" valign="top"><B>String text</B></TD>
+ <TD>any string</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">There are no optional arguments<BR>&nbsp;</TD>
+ </TBODY>
+</TABLE>
+<HR>
+<TABLE border="0" width="100%">
+ <TBODY>
+ <TR>
+ <TH colspan="2" align="left">Example<BR>&nbsp;</TH></TR>
+ <TR>
+ <TD colspan="2"><SPAN style="font-family: monospace">
+<!-- Begin xmlEncode example -->
+ <B>xmlEncode</B>("&lt; ' & " >")<br>
+ <P>returns the string "&amp;lt; &amp;apos; &amp;amp; &amp;quot; &amp;gt;"</P>
+<!-- End xmlEncode example -->
+</SPAN></TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR>
+<FONT color="navy" size="-2">&copy; Copyright IBM Corporation 2000,
+2006. All Rights Reserved.</FONT></P></P></BODY>
+</HTML>
diff --git a/doc/org.eclipse.jet.doc/toc.xml b/doc/org.eclipse.jet.doc/toc.xml
index 4981537..df5d62d 100644
--- a/doc/org.eclipse.jet.doc/toc.xml
+++ b/doc/org.eclipse.jet.doc/toc.xml
@@ -17,5 +17,6 @@
<topic label="Reference">
<anchor id="reference"/>
<topic label="Javadoc" href="references/javadoc/index.html"/>
+ <topic label="Additional XPath Functions" href="references/xpathFunctions/overview.html"/>
</topic>
</toc>
diff --git a/doc/org.eclipse.jet.doc/toccontrolTags.xml b/doc/org.eclipse.jet.doc/toccontrolTags.xml
index 847dc2e..46bd9d4 100644
--- a/doc/org.eclipse.jet.doc/toccontrolTags.xml
+++ b/doc/org.eclipse.jet.doc/toccontrolTags.xml
@@ -26,5 +26,10 @@
<topic label="c:marker" href="references/taglibs/controlTags/markerTag.html"/>
<topic label="c:override" href="references/taglibs/controlTags/overrideTag.html"/>
<topic label="c:invokeTransform" href="references/taglibs/controlTags/invokeTransformTag.html"/>
+ <topic label="c:dump" href="references/taglibs/controlTags/dumpTag.html"/>
+ <topic label="c:loadContent" href="references/taglibs/controlTags/loadContentTag.html"/>
+ <topic label="c:nodeAttributes" href="references/taglibs/controlTags/nodeAttributesTag.html"/>
+ <topic label="c:replaceStrings" href="references/taglibs/controlTags/replaceStringsTag.html"/>
+ <topic label="c:stringTokens" href="references/taglibs/controlTags/stringTokensTag.html"/>
</topic>
</toc>
diff --git a/doc/org.eclipse.jet.doc/tocformatTags.xml b/doc/org.eclipse.jet.doc/tocformatTags.xml
index b630a9b..c1bf207 100644
--- a/doc/org.eclipse.jet.doc/tocformatTags.xml
+++ b/doc/org.eclipse.jet.doc/tocformatTags.xml
@@ -7,5 +7,9 @@
<topic label="f:strip" href="references/taglibs/formatTags/stripTag.html"/>
<topic label="f:uc" href="references/taglibs/formatTags/ucTag.html"/>
<topic label="f:lc" href="references/taglibs/formatTags/lcTag.html"/>
+ <topic label="f:formatNow" href="references/taglibs/formatTags/formatNowTag.html"/>
+ <topic label="f:milliseconds" href="references/taglibs/formatTags/millisecondsTag.html"/>
+ <topic label="f:unique" href="references/taglibs/formatTags/uniqueTag.html"/>
+ <topic label="f:uuid" href="references/taglibs/formatTags/uuidTag.html"/>
</topic>
</toc>
diff --git a/doc/org.eclipse.jet.doc/tocworkspaceTags.xml b/doc/org.eclipse.jet.doc/tocworkspaceTags.xml
index 9b1b3f0..b5a14ac 100644
--- a/doc/org.eclipse.jet.doc/tocworkspaceTags.xml
+++ b/doc/org.eclipse.jet.doc/tocworkspaceTags.xml
@@ -7,5 +7,6 @@
<topic label="ws:folder" href="references/taglibs/workspaceTags/folderTag.html"/>
<topic label="ws:file" href="references/taglibs/workspaceTags/fileTag.html"/>
<topic label="ws:copyFile" href="references/taglibs/workspaceTags/copyFileTag.html"/>
+ <topic label="ws:rebuildWorkspace" href="references/taglibs/workspaceTags/rebuildWorkspaceTag.html"/>
</topic>
</toc>
diff --git a/plugins/org.eclipse.jet/META-INF/MANIFEST.MF b/plugins/org.eclipse.jet/META-INF/MANIFEST.MF
index a43c4dd..73a0c8b 100644
--- a/plugins/org.eclipse.jet/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.jet/META-INF/MANIFEST.MF
@@ -24,6 +24,7 @@ Export-Package: org.eclipse.jet,
org.eclipse.jet.internal.builder;x-friends:="org.eclipse.jet.tests",
org.eclipse.jet.internal.compiler;x-friends:="org.eclipse.jet.tests",
org.eclipse.jet.internal.compiler.templates;x-friends:="org.eclipse.jet.tests",
+ org.eclipse.jet.internal.exceptions;x-friends:="org.eclipse.jet.tests",
org.eclipse.jet.internal.extensionpoints;x-internal:=true,
org.eclipse.jet.internal.l10n;x-internal:=true,
org.eclipse.jet.internal.launch;x-friends:="org.eclipse.jet.tests,org.eclipse.jet.ui",
@@ -38,6 +39,7 @@ Export-Package: org.eclipse.jet,
org.eclipse.jet.internal.xpath;x-friends:="org.eclipse.jet.tests",
org.eclipse.jet.internal.xpath.ast;x-friends:="org.eclipse.jet.tests",
org.eclipse.jet.internal.xpath.functions;x-friends:="org.eclipse.jet.tests",
+ org.eclipse.jet.internal.xpath.functions.extras;x-friends:="org.eclipse.jet.tests",
org.eclipse.jet.internal.xpath.inspectors;x-friends:="org.eclipse.jet.tests",
org.eclipse.jet.internal.xpath.parser;x-friends:="org.eclipse.jet.tests",
org.eclipse.jet.runtime.model,
diff --git a/plugins/org.eclipse.jet/plugin.xml b/plugins/org.eclipse.jet/plugin.xml
index 8babde1..4880d33 100644
--- a/plugins/org.eclipse.jet/plugin.xml
+++ b/plugins/org.eclipse.jet/plugin.xml
@@ -666,6 +666,84 @@ The &apos;restoreNames&apos; and &apos;passVariables&apos; options are mutually
</description>
</attribute>
</emptyTag>
+ <emptyTag name="dump" class="org.eclipse.jet.internal.taglib.control.DumpTag" >
+ <attribute
+ name="select"
+ type="xpath"
+ use="required">
+ <description>A query expression specifying a single node in the model</description>
+ </attribute>
+ <attribute
+ name="format"
+ type="boolean"
+ use="optional">
+ <description>A true/false value indicating whether the tag should try to write out whitespace to cause the output to be nicely formatted and indented.</description>
+ </attribute>
+ <attribute
+ name="entities"
+ type="boolean"
+ use="optional">
+ <description>A true/false value indicating whether characters that can cause XML parsing problems (left and right angle brackets, quotes, apostrophes, etc) should be written as entities (e.g. "%lt;" for the left angle bracket).</description>
+ </attribute>
+ <description>Writes out the DOM subtree under a specified model node.</description>
+ </emptyTag>
+ <functionTag name="loadContent" class="org.eclipse.jet.internal.taglib.control.LoadContentTag" >
+ <attribute name="var" use="required">
+ <description>A name to associate with the document root of the DOM created by the parse. Subsequent template tags can use this name in query expressions to access the data in this DOM.</description>
+ </attribute>
+ <attribute name="type" use="optional">
+ <description>A content type with which to search for an appropriate loader for the content. Defaults to "xml" if null.</description>
+ </attribute>
+ <attribute name="loader" use="optional">
+ <description>The id of a specific loader which will parse the content and build a model.</description>
+ </attribute>
+ <description>Extends the model by parsing its contents as XML.</description>
+ </functionTag>
+ <iteratingTag
+ class="org.eclipse.jet.internal.taglib.control.NodeAttributesTag"
+ deprecated="true"
+ name="nodeAttributes">
+ <attribute name="node" use="required">
+ <description>A query expression that resolves to a single node. The nodeAttributes tag will iterate over this node's attributes.</description>
+ </attribute>
+ <attribute name="name" use="required">
+ <description>The variable name to associate with each temporary node describing an attribute. Once the variable name is assigned to the temporary node, the nodeAttributes tag will process its contents once.</description>
+ </attribute>
+ <attribute name="delimiter" use="optional">
+ <description>A string to write out after every iteration except the last.</description>
+ </attribute>
+ <description>Iterates over the attributes for a given node.</description>
+ </iteratingTag>
+ <functionTag name="replaceStrings" class="org.eclipse.jet.internal.taglib.control.ReplaceStringsTag" >
+ <attribute name="replace" use="required">
+ <description>A comma-separated list of strings to be replaced. The backslash ("\") acts as an escape character for special characters</description>
+ </attribute>
+ <attribute name="with" use="required">
+ <description>A comma-separated list of replacement strings corresponding to the strings in the replace attribute.</description>
+ </attribute>
+ <description>Replaces one set of strings in its content with another set of strings and writes out the result.</description>
+ </functionTag>
+ <iteratingTag name="stringTokens" class="org.eclipse.jet.internal.taglib.control.StringTokensTag" >
+ <attribute name="string" use="required">
+ <description>The string to be parsed</description>
+ </attribute>
+ <attribute name="delimitedBy" use="optional">
+ <description>The tokens that delimit the tokens in the string</description>
+ </attribute>
+ <attribute name="name" use="required">
+ <description>The variable name to be associated with the temporary model nodes describing the tokens. Nested tags can use this variable name to refer to the temporary node.</description>
+ </attribute>
+ <attribute name="delimiter" use="optional">
+ <description>The string to write after every iteration except the last</description>
+ </attribute>
+ <attribute name="reverse" use="optional">
+ <description>A true/false value indicating whether the tokens should be iterated over first-to-last (false) or last-to-first (true)</description>
+ </attribute>
+ <attribute name="tokenLength" use="optional">
+ <description>Default description for attribute tokenLength</description>
+ </attribute>
+ <description>Parses a string into tokens and iterates over its content for each token.</description>
+ </iteratingTag>
</tagLibrary>
<tagLibrary
id="workspaceTags"
@@ -841,6 +919,9 @@ When executing, this tag will cause the implicit creation of any folders contain
</description>
</attribute>
</emptyTag>
+ <emptyTag name="rebuildWorkspace" class="org.eclipse.jet.internal.taglib.workspace.RebuildWorkspaceTag" >
+ <description>Causes the Eclipse workspace to process resources that were changed or created by the pattern.</description>
+ </emptyTag>
</tagLibrary>
<tagLibrary
id="javaTags"
@@ -1139,6 +1220,21 @@ if 'length' is specified, convert only the specified number of characters, other
<description>
Standard utility tags that rewrite their content in a different format.
</description>
+ <emptyTag name="formatNow" class="org.eclipse.jet.internal.taglib.format.FormatNowTag" >
+ <attribute name="pattern" use="required">
+ <description>The pattern with which to format the current data and time. See documentation for the Java class java.util.SimpleDateFormat for more details.</description>
+ </attribute>
+ <description>Formats and writes out the current date and time</description>
+ </emptyTag>
+ <emptyTag name="milliseconds" class="org.eclipse.jet.internal.taglib.format.MillisecondsTag" >
+ <description>Writes out a current system milliseconds value.</description>
+ </emptyTag>
+ <emptyTag name="unique" class="org.eclipse.jet.internal.taglib.format.UniqueTag" >
+ <description>Writes out a unique integer value</description>
+ </emptyTag>
+ <emptyTag name="uuid" class="org.eclipse.jet.internal.taglib.format.UuidTag" >
+ <description>Default description for tag uuid</description>
+ </emptyTag>
</tagLibrary>
</extension>
<extension
@@ -1220,5 +1316,69 @@ if 'length' is specified, convert only the specified number of characters, other
point="org.eclipse.core.runtime.preferences">
<initializer class="org.eclipse.jet.internal.JETPreferenceInitializer"/>
</extension>
+ <extension
+ point="org.eclipse.jet.xpathFunctions">
+ <function
+ implementation="org.eclipse.jet.internal.xpath.functions.extras.CamelCaseFunction"
+ maxArgs="1"
+ minArgs="1"
+ name="camelCase"/>
+ <function
+ implementation="org.eclipse.jet.internal.xpath.functions.extras.CardinalityFunction"
+ maxArgs="2"
+ minArgs="2"
+ name="cardinality"/>
+ <function
+ implementation="org.eclipse.jet.internal.xpath.functions.extras.ClassNameFunction"
+ maxArgs="1"
+ minArgs="1"
+ name="className"/>
+ <function
+ implementation="org.eclipse.jet.internal.xpath.functions.extras.EscapeJavaWhitespaceFunction"
+ maxArgs="1"
+ minArgs="1"
+ name="escapeJavaWhitespace"/>
+ <function
+ implementation="org.eclipse.jet.internal.xpath.functions.extras.Lower_caseFunction"
+ maxArgs="1"
+ minArgs="1"
+ name="lower-case"/>
+ <function
+ implementation="org.eclipse.jet.internal.xpath.functions.extras.LowercaseFirstFunction"
+ maxArgs="1"
+ minArgs="1"
+ name="lowercaseFirst"/>
+ <function
+ implementation="org.eclipse.jet.internal.xpath.functions.extras.XmlEncodeFunction"
+ maxArgs="1"
+ minArgs="1"
+ name="xmlEncode"/>
+ <function
+ implementation="org.eclipse.jet.internal.xpath.functions.extras.PackageNameFunction"
+ maxArgs="1"
+ minArgs="1"
+ name="packageName"/>
+ <function
+ implementation="org.eclipse.jet.internal.xpath.functions.extras.RemoveWhitespaceFunction"
+ maxArgs="1"
+ minArgs="1"
+ name="removeWhitespace"/>
+ <function
+ implementation="org.eclipse.jet.internal.xpath.functions.extras.TrimWhitespaceFunction"
+ maxArgs="1"
+ minArgs="1"
+ name="trimWhitespace"/>
+ <function
+ implementation="org.eclipse.jet.internal.xpath.functions.extras.Upper_caseFunction"
+ maxArgs="1"
+ minArgs="1"
+ name="upper-case"/>
+ <function
+ implementation="org.eclipse.jet.internal.xpath.functions.extras.UppercaseFirstFunction"
+ maxArgs="1"
+ minArgs="1"
+ name="uppercaseFirst"/>
+ </extension>
+
</plugin>
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/JavaUtil.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/JavaUtil.java
new file mode 100644
index 0000000..f4e1d8b
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/JavaUtil.java
@@ -0,0 +1,95 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.jet.internal;
+
+
+/**
+ * Utility class for Java related code generation.
+ */
+public class JavaUtil
+{
+
+ /**
+ *
+ */
+ private JavaUtil()
+ {
+ super();
+ }
+
+ public static String escapeJavaString(char[] text)
+ {
+ StringBuffer buffer = new StringBuffer(text.length);
+ JavaUtil.escapeJavaString(text, buffer);
+ return buffer.toString();
+ }
+
+ /**
+ * @param originalText
+ * @param escapedText
+ */
+ public static void escapeJavaString(char[] originalText, StringBuffer escapedText)
+ {
+ for (int i = 0; i < originalText.length; i++)
+ {
+ switch (originalText[i])
+ {
+ case '\b':
+ escapedText.append("\\b"); //$NON-NLS-1$
+ break;
+ case '\f':
+ escapedText.append("\\f"); //$NON-NLS-1$
+ break;
+ case '\t':
+ escapedText.append("\\t"); //$NON-NLS-1$
+ break;
+ case '\r':
+ escapedText.append("\\r"); //$NON-NLS-1$
+ break;
+ case '\n':
+ escapedText.append("\\n"); //$NON-NLS-1$
+ break;
+ case '"':
+ escapedText.append("\\\""); //$NON-NLS-1$
+ break;
+ case '\\':
+ escapedText.append("\\\\"); //$NON-NLS-1$
+ break;
+ default:
+ escapedText.append(originalText[i]);
+ }
+ }
+ }
+
+ /**
+ * Return a Java string, including initial and final double quotes, and inserting
+ * any required Java escape sequences.
+ * @param text the text to quote
+ * @return the quoted Java string
+ */
+ public static String asJavaQuotedString(char[] text)
+ {
+ StringBuffer encoded = new StringBuffer(text.length + 2);
+ encoded.append('"');
+
+ escapeJavaString(text, encoded);
+
+ encoded.append('"');
+ return encoded.toString();
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/MethodBodyCreator.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/MethodBodyCreator.java
index cab4b20..8aa72a9 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/MethodBodyCreator.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/MethodBodyCreator.java
@@ -25,6 +25,7 @@ import org.eclipse.jet.compiler.TextElement;
import org.eclipse.jet.compiler.XMLBodyElement;
import org.eclipse.jet.compiler.XMLElement;
import org.eclipse.jet.compiler.XMLEmptyElement;
+import org.eclipse.jet.internal.JavaUtil;
import org.eclipse.jet.internal.compiler.templates.XMLEndGenerator;
import org.eclipse.jet.internal.compiler.templates.XMLStartGenerator;
@@ -143,49 +144,10 @@ public class MethodBodyCreator extends DefaultJET2ASTVisitor
public void visit(TextElement text)
{
buffer.append(WRITE_STMT_OPENING);
- buffer.append(encodeJavaString(text.getText()));
+ buffer.append(JavaUtil.asJavaQuotedString(text.getText()));
buffer.append(WRITE_STMT_CLOSING);
}
- public static String encodeJavaString(char[] text)
- {
- StringBuffer encoded = new StringBuffer(text.length + 2);
- encoded.append('"');
-
- for (int i = 0; i < text.length; i++)
- {
- switch (text[i])
- {
- case '\b':
- encoded.append("\\b"); //$NON-NLS-1$
- break;
- case '\f':
- encoded.append("\\f"); //$NON-NLS-1$
- break;
- case '\t':
- encoded.append("\\t"); //$NON-NLS-1$
- break;
- case '\r':
- encoded.append("\\r"); //$NON-NLS-1$
- break;
- case '\n':
- encoded.append("\\n"); //$NON-NLS-1$
- break;
- case '"':
- encoded.append("\\\""); //$NON-NLS-1$
- break;
- case '\\':
- encoded.append("\\\\"); //$NON-NLS-1$
- break;
- default:
- encoded.append(text[i]);
- }
- }
-
- encoded.append('"');
- return encoded.toString();
- }
-
/**
* Return the underlying string buffer container the generated contents.
* @return the string buffer
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2JavaGenerator.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2JavaGenerator.java
index 8ad76e9..09dcc7a 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2JavaGenerator.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/compiler/templates/JET2JavaGenerator.java
@@ -2,6 +2,7 @@ package org.eclipse.jet.internal.compiler.templates;
import org.eclipse.jet.internal.compiler.*;
import org.eclipse.jet.compiler.*;
+import org.eclipse.jet.internal.JavaUtil;
import org.eclipse.jet.taglib.TagLibraryReference;
import java.util.Iterator;
import java.util.Map;
@@ -74,7 +75,7 @@ public class JET2JavaGenerator
tagDataDeclarations.append(" new String[] {");
for (Iterator i = element.getAttributes().values().iterator(); i.hasNext();) {
String attrValue = (String) i.next();
- tagDataDeclarations.append(MethodBodyCreator.encodeJavaString(attrValue.toCharArray())).append(", ");
+ tagDataDeclarations.append(JavaUtil.asJavaQuotedString(attrValue.toCharArray())).append(", ");
}
tagDataDeclarations.append("});").append(NL);
}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/exceptions/MissingRequiredAttributeException.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/exceptions/MissingRequiredAttributeException.java
new file mode 100644
index 0000000..e05cad3
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/exceptions/MissingRequiredAttributeException.java
@@ -0,0 +1,47 @@
+package org.eclipse.jet.internal.exceptions;
+
+import java.text.MessageFormat;
+
+import org.eclipse.jet.internal.l10n.JET2Messages;
+import org.eclipse.jet.taglib.JET2TagException;
+
+public class MissingRequiredAttributeException extends JET2TagException {
+
+ private static final long serialVersionUID = -143366914438772236L;
+
+ private String attributeName;
+
+ public MissingRequiredAttributeException(String attributeName) {
+ super();
+ this.attributeName = attributeName;
+ }
+
+ public String getLocalizedMessage() {
+ return buildMessage();
+ }
+
+ public String getMessage() {
+ return buildMessage();
+ }
+
+ public String toString() {
+ return buildMessage();
+ }
+
+ private String buildMessage() {
+ return MessageFormat.format(getPattern(),getArgs());
+ }
+
+ private String getPattern() {
+ return JET2Messages.JET2Compiler_MissingRequiredAttribute;
+ }
+
+ private Object[] getArgs() {
+ String args[] = new String[] {
+ attributeName,
+ };
+ return args;
+ }
+
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/exceptions/NoMatchingNodeException.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/exceptions/NoMatchingNodeException.java
new file mode 100644
index 0000000..b79871a
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/exceptions/NoMatchingNodeException.java
@@ -0,0 +1,47 @@
+package org.eclipse.jet.internal.exceptions;
+
+import java.text.MessageFormat;
+
+import org.eclipse.jet.internal.l10n.JET2Messages;
+import org.eclipse.jet.taglib.JET2TagException;
+
+public class NoMatchingNodeException extends JET2TagException {
+
+ private static final long serialVersionUID = -143366914438772236L;
+
+ private String expression;
+
+ public NoMatchingNodeException(String expression) {
+ super();
+ this.expression = expression;
+ }
+
+ public String getLocalizedMessage() {
+ return buildMessage();
+ }
+
+ public String getMessage() {
+ return buildMessage();
+ }
+
+ public String toString() {
+ return buildMessage();
+ }
+
+ private String buildMessage() {
+ return MessageFormat.format(getPattern(),getArgs());
+ }
+
+ private String getPattern() {
+ return JET2Messages.XPath_NoValueForAttribute;
+ }
+
+ private Object[] getArgs() {
+ String args[] = new String[] {
+ expression,
+ };
+ return args;
+ }
+
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java
index fe2f428..0838ecd 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java
@@ -75,6 +75,12 @@ public class JET2Messages extends NLS
public static String ModelLoaderExtManager_TypeAlreadyDefined;
+ public static String ReplaceStringsTag_BadList;
+
+ public static String ReplaceStringsTag_EmptyList;
+
+ public static String ReplaceStringsTag_ListsNotSameLength;
+
public static String TransformContextExtender_NeedsRebuildForOverride;
public static String XMLElementDelegate_DuplicateAttribute;
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties
index 368ba9d..333a801 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties
@@ -145,3 +145,6 @@ MergeTag_CouldNotRead=Unable to read file {0}
MergeTag_CouldNotCreateURL=Could not create URL({0}, {1})
MarkerHelper_CouldNotCreateMarker=Unable to create marker on file {0}
TransformContextExtender_NeedsRebuildForOverride=Transform {0} needs to be rebuild in order to support override
+ReplaceStringsTag_BadList=Error parsing comma-separated list of strings:
+ReplaceStringsTag_ListsNotSameLength=''Replace'' list and ''With'' list have different lengths.
+ReplaceStringsTag_EmptyList=''Replace'' list contains empty strings.
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/DumpTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/DumpTag.java
new file mode 100644
index 0000000..f90e4f2
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/DumpTag.java
@@ -0,0 +1,225 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.taglib.control;
+
+import java.util.StringTokenizer;
+
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.JET2Writer;
+import org.eclipse.jet.XPathContextExtender;
+import org.eclipse.jet.internal.exceptions.MissingRequiredAttributeException;
+import org.eclipse.jet.internal.exceptions.NoMatchingNodeException;
+import org.eclipse.jet.taglib.AbstractEmptyTag;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+import org.eclipse.jet.xpath.inspector.IElementInspector;
+import org.eclipse.jet.xpath.inspector.INodeInspector;
+import org.eclipse.jet.xpath.inspector.InspectorManager;
+import org.eclipse.jet.xpath.inspector.INodeInspector.NodeKind;
+
+/**
+ * Implement the Contributed Control Tags tag 'dump'.
+ *
+ */
+public class DumpTag extends AbstractEmptyTag {
+
+
+ private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
+ private String _select = null;
+ private Object resolved_node;
+
+ private String _format = null;
+
+ private String _entities = null;
+
+ /*
+ * Begin tag-specific declarations
+ */
+
+ /*
+ * End tag-specific declarations
+ */
+
+ public DumpTag() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.taglib.EmptyTag#doAction(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context, org.eclipse.jet.JET2Writer)
+ */
+ public void doAction(TagInfo tagInfo, JET2Context context, JET2Writer out) throws JET2TagException {
+
+ XPathContextExtender xpathContext = XPathContextExtender.getInstance(context);
+
+ /**
+ * Get the "select" attribute
+.
+ * Use that expression to retrieve a single node.
+ */
+ _select = tagInfo.getAttribute("select"); //$NON-NLS-1$
+ if (_select == null) {
+ throw new MissingRequiredAttributeException("select"); //$NON-NLS-1$
+ }
+ resolved_node = xpathContext.resolveSingle(xpathContext.currentXPathContextObject(), _select);
+ if (resolved_node == null) {
+ throw new NoMatchingNodeException(_select);
+ }
+
+ /**
+ * Get the "format" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _format = tagInfo.getAttribute("format"); //$NON-NLS-1$
+
+ /**
+ * Get the "entities" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _entities = tagInfo.getAttribute("entities"); //$NON-NLS-1$
+
+ /**
+ * Begin doAction logic
+ */
+
+ boolean format = false;
+ if ("true".equalsIgnoreCase(_format)) { format = true; } //$NON-NLS-1$
+ if ("yes".equalsIgnoreCase(_format)) { format = true; } //$NON-NLS-1$
+
+ boolean entities = false;
+ if ("true".equalsIgnoreCase(_entities)) { entities = true; } //$NON-NLS-1$
+ if ("yes".equalsIgnoreCase(_entities)) { entities = true; } //$NON-NLS-1$
+
+ dump(resolved_node,format,entities,1,context,out);
+
+ /**
+ * End doAction logic
+ */
+
+ }
+
+ public void dump(Object node, boolean format, boolean entities, int indent, JET2Context context, JET2Writer out) {
+
+ boolean written = false;
+ boolean writeKids = false;
+ INodeInspector inspector = InspectorManager.getInstance().getInspector(node);
+ if (inspector == null) { return; }
+ if (inspector.getNodeKind(node) == NodeKind.ELEMENT) {
+ IElementInspector elementInspector = (IElementInspector) inspector;
+ out.write("<"+inspector.nameOf(node)); //$NON-NLS-1$
+ Object attr[] = elementInspector.getAttributes(node);
+ for (int i = 0; i < attr.length; i++ ) {
+ INodeInspector ei = InspectorManager.getInstance().getInspector(attr[i]);
+ String key = ei.nameOf(attr[i]);
+ String value = ei.stringValueOf(attr[i]);
+ out.write(" "+key+"="+useRightQuotes(value)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ boolean staticEncountered = false;
+ Object kid[] = elementInspector.getChildren(node);
+ if (kid.length > 0) {
+ out.write(">"); //$NON-NLS-1$
+ for (int index = 0; index < kid.length; index++) {
+ INodeInspector kidInspector = InspectorManager.getInstance().getInspector(kid[index]);
+ if (kidInspector.getNodeKind(kid[index]) == NodeKind.ELEMENT) {
+ if (!staticEncountered && format) {
+ out.write(NL);
+ for (int i = 0; i < indent; i++) { out.write(" "); } //$NON-NLS-1$
+ staticEncountered = false;
+ }
+ } else {
+ staticEncountered = true;
+ }
+ dump(kid[index],format,entities,(indent+1),context,out);
+ }
+ if (!staticEncountered && format) {
+ out.write(NL);
+ for (int i = 1; i < indent; i++) { out.write(" "); } //$NON-NLS-1$
+ staticEncountered = false;
+ }
+ out.write("</"+inspector.nameOf(node)+">"); //$NON-NLS-1$//$NON-NLS-2$
+ } else {
+ out.write("/>"); //$NON-NLS-1$
+ }
+ written = true;
+ }
+ if (inspector.getNodeKind(node) == NodeKind.TEXT) {
+ String buffer = inspector.stringValueOf(node);
+// if (node.isCDataNode()) {
+// out.write("<![CDATA["+buffer+"]]>");
+// written = true;
+// } else {
+ if (entities) { buffer = insertEntities(buffer); }
+ out.write(buffer);
+// }
+ written = true;
+ }
+ if (inspector.getNodeKind(node) == NodeKind.ROOT) {
+// out.write("<?xml version=\""+((Document) node).getVersion()+"\" encoding=\""+((Document) node).getEncoding()+"\"?>\r\n");
+ written = true;
+ writeKids = true;
+ }
+ if (!written) {
+ System.out.println("Did not write type "+inspector.getNodeKind(node)); //$NON-NLS-1$
+ }
+ if (writeKids) {
+ IElementInspector elementInspector = (IElementInspector) inspector;
+ Object kid[] = elementInspector.getChildren(node);
+ for (int index = 0; index < kid.length; index++) {
+ dump(kid[index],format,entities,(indent+1),context,out);
+ }
+ }
+ }
+
+ /**
+ * Method useRightQuotes.
+ * @param string
+ * @return String
+ */
+ private String useRightQuotes(String string) {
+ if (string.indexOf("\"") > -1) { //$NON-NLS-1$
+ return "'"+string+"'"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return "\""+string+"\""; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+
+ /**
+ * Method insertEntities.
+ * @param buffer
+ * @return String
+ */
+ private String insertEntities(String string) {
+ StringBuffer sb = new StringBuffer(string.length() * 2);
+ StringTokenizer st = new StringTokenizer(string,"<>&'\"",true); //$NON-NLS-1$
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ if (token.equals("<")) { token = "&lt;"; } //$NON-NLS-1$ //$NON-NLS-2$
+ if (token.equals(">")) { token = "&gt;"; } //$NON-NLS-1$ //$NON-NLS-2$
+ if (token.equals("&")) { token = "&amp;"; } //$NON-NLS-1$ //$NON-NLS-2$
+ if (token.equals("'")) { token = "&apos;"; } //$NON-NLS-1$ //$NON-NLS-2$
+ if (token.equals("\"")) { token = "&quot;"; } //$NON-NLS-1$//$NON-NLS-2$
+ sb.append(token);
+ }
+ String buffer = sb.toString();
+ return buffer;
+ }
+
+ /**
+ * End custom methods
+ */
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/LoadContentTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/LoadContentTag.java
new file mode 100644
index 0000000..e3db222
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/LoadContentTag.java
@@ -0,0 +1,105 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.taglib.control;
+
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.internal.exceptions.MissingRequiredAttributeException;
+import org.eclipse.jet.taglib.AbstractFunctionTag;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+import org.eclipse.jet.transform.TransformContextExtender;
+
+/**
+ * Implement the Contributed Control Tags tag 'loadContent'.
+ *
+ */
+public class LoadContentTag extends AbstractFunctionTag {
+
+
+ private String _var = null;
+
+ private String _type = null;
+
+ private String _loader = null;
+
+ /**
+ * Begin custom declarations
+ */
+
+ /**
+ * End custom declarations
+ */
+
+ public LoadContentTag() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.taglib.FunctionTag#doFunction(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context, java.lang.String)
+ */
+ public String doFunction(TagInfo tagInfo, JET2Context context, String bodyContent) throws JET2TagException {
+
+ /**
+ * Get the "var" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _var = tagInfo.getAttribute("var"); //$NON-NLS-1$
+ if (_var == null) {
+ throw new MissingRequiredAttributeException("var"); //$NON-NLS-1$
+ }
+
+ /**
+ * Get the "type" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _type = tagInfo.getAttribute("type"); //$NON-NLS-1$
+
+ /**
+ * Get the "loader" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _loader = tagInfo.getAttribute("loader"); //$NON-NLS-1$
+
+ /**
+ * Begin doStart logic
+ */
+
+ try {
+ Object modelRoot = TransformContextExtender.loadModelFromString(bodyContent, _loader , _type);
+ context.setVariable(_var, modelRoot);
+ } catch (Exception e) {
+ throw new JET2TagException(e);
+ }
+
+ return ""; //$NON-NLS-1$
+
+ /**
+ * End doStart logic
+ */
+ }
+
+ /**
+ * Begin tag-specific methods
+ */
+
+ /**
+ * End tag-specific methods
+ */
+
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/NodeAttributesTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/NodeAttributesTag.java
new file mode 100644
index 0000000..187a874
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/NodeAttributesTag.java
@@ -0,0 +1,176 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.taglib.control;
+
+import java.io.IOException;
+
+import org.eclipse.jet.CoreJETException;
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.JET2Writer;
+import org.eclipse.jet.XPathContextExtender;
+import org.eclipse.jet.internal.exceptions.MissingRequiredAttributeException;
+import org.eclipse.jet.internal.exceptions.NoMatchingNodeException;
+import org.eclipse.jet.taglib.AbstractIteratingTag;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+import org.eclipse.jet.transform.TransformContextExtender;
+import org.eclipse.jet.xpath.inspector.INodeInspector;
+import org.eclipse.jet.xpath.inspector.InspectorManager;
+
+
+/**
+ * Implement the Contributed Control Tags tag 'nodeAttributes'.
+ *
+ */
+public class NodeAttributesTag extends AbstractIteratingTag {
+
+
+ private String _node = null;
+ private Object resolved_node;
+
+ private String _name = null;
+
+ private String _delimiter = null;
+
+ /**
+ * Begin custom declarations
+ */
+
+ private int index = -1;
+ private Object attr[];
+ private Object attrNode;
+
+ /**
+ * End custom declarations
+ */
+
+ public NodeAttributesTag() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.taglib.IteratingTag#doEvalLoopCondition(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context)
+ */
+ public boolean doEvalLoopCondition(TagInfo tagInfo, JET2Context context)
+ throws JET2TagException {
+
+ boolean doAnotherIteration = false;
+
+ /**
+ * Begin doEvalLoopCondition logic
+ */
+
+ index++;
+ doAnotherIteration = index < attr.length;
+
+ /**
+ * End doEvalLoopCondition logic
+ */
+
+ return doAnotherIteration;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.taglib.IteratingTag#doInitializeLoop(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context)
+ */
+ public void doInitializeLoop(TagInfo tagInfo, JET2Context context)
+ throws JET2TagException {
+
+ XPathContextExtender xpathContext = XPathContextExtender.getInstance(context);
+
+ /**
+ * Get the "node" attribute
+.
+ * Use that expression to retrieve a single node.
+ */
+ _node = tagInfo.getAttribute("node"); //$NON-NLS-1$
+ if (_node == null) {
+ throw new MissingRequiredAttributeException("node"); //$NON-NLS-1$
+ }
+ resolved_node = xpathContext.resolveSingle(xpathContext.currentXPathContextObject(), _node);
+ if (resolved_node == null) {
+ throw new NoMatchingNodeException(_node);
+ }
+
+ /**
+ * Get the "name" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _name = tagInfo.getAttribute("name"); //$NON-NLS-1$
+ if (_name == null) {
+ throw new MissingRequiredAttributeException("name"); //$NON-NLS-1$
+ }
+
+ /**
+ * Get the "delimiter" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _delimiter = tagInfo.getAttribute("delimiter"); //$NON-NLS-1$
+ setDelimiter(_delimiter);
+
+ /**
+ * Begin doInitializeLoop logic
+ */
+
+ attr = new Object[0];
+ index = -1;
+
+ try {
+ Object modelRoot = TransformContextExtender.loadModelFromString("<attribute/>", null , "xml"); //$NON-NLS-1$ //$NON-NLS-2$
+ attrNode = xpathContext.resolveSingle(modelRoot, "/attribute" ); //$NON-NLS-1$
+
+ attr = xpathContext.resolve(_node, "./@" ); //$NON-NLS-1$
+ } catch (CoreJETException e) {
+ throw new JET2TagException(e);
+ } catch (IOException e) {
+ throw new JET2TagException(e);
+ } catch (JET2TagException e) {
+ throw e;
+ }
+
+ /**
+ * End doInitializeLoop logic
+ */
+
+ }
+
+ /*
+ * Begin tag-specific methods
+ */
+
+ public void doAfterBody(TagInfo td, JET2Context context, JET2Writer out) throws JET2TagException {
+ super.doAfterBody(td, context, out);
+ context.removeVariable(_name);
+ }
+
+ public void doBeforeBody(TagInfo td, JET2Context context, JET2Writer out) throws JET2TagException {
+ super.doBeforeBody(td, context, out);
+ context.setVariable(_name, attrNode);
+ XPathContextExtender xpathContext = XPathContextExtender.getInstance(context);
+ INodeInspector insp = InspectorManager.getInstance().getInspector(attr[index]);
+ xpathContext.setAttribute(attrNode, "name" , insp.nameOf(attr[index])); //$NON-NLS-1$
+ xpathContext.setAttribute(attrNode, "value" , insp.stringValueOf(attr[index])); //$NON-NLS-1$
+ xpathContext.setAttribute(attrNode, "index" , String.valueOf(index)); //$NON-NLS-1$
+ }
+
+ /*
+ * End tag-specific methods
+ */
+
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/ReplaceStringsTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/ReplaceStringsTag.java
new file mode 100644
index 0000000..6912b8e
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/ReplaceStringsTag.java
@@ -0,0 +1,203 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.taglib.control;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.internal.exceptions.MissingRequiredAttributeException;
+import org.eclipse.jet.internal.l10n.JET2Messages;
+import org.eclipse.jet.taglib.AbstractFunctionTag;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+
+
+/**
+ * Implement the Contributed Control Tags tag 'replaceStrings'.
+ *
+ */
+public class ReplaceStringsTag extends AbstractFunctionTag {
+
+
+ private String _replace = null;
+
+ private String _with = null;
+
+ /**
+ * Begin custom declarations
+ */
+
+ /**
+ * End custom declarations
+ */
+
+ public ReplaceStringsTag() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.taglib.FunctionTag#doFunction(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context, java.lang.String)
+ */
+ public String doFunction(TagInfo tagInfo, JET2Context context, String bodyContent) throws JET2TagException {
+
+ /**
+ * Get the "replace" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _replace = tagInfo.getAttribute("replace"); //$NON-NLS-1$
+ if (_replace == null) {
+ throw new MissingRequiredAttributeException("replace"); //$NON-NLS-1$
+ }
+
+ /**
+ * Get the "with" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _with = tagInfo.getAttribute("with"); //$NON-NLS-1$
+ if (_with == null) {
+ throw new MissingRequiredAttributeException("with"); //$NON-NLS-1$
+ }
+
+ /**
+ * Begin doStart logic
+ */
+
+ String[] replace = getStrings(_replace);
+ String[] with = getStrings(_with);
+
+ String buffer = replaceString(bodyContent,replace,with);
+
+ return buffer;
+
+ /**
+ * End doStart logic
+ */
+ }
+
+ /**
+ * Begin tag-specific methods
+ */
+
+ /*
+ * Parse the value of the specified attribute as a string separated list.
+ *
+ * The following escapes are supported: \r \n \t \, \\ \&lt; \&gt; \&amp; \amp; \apos; \quot;
+ */
+ public String[] getStrings(String buffer) throws JET2TagException {
+ List v = new ArrayList();
+ StringBuffer sb = new StringBuffer();
+ int offset = 0;
+ while (offset < buffer.length()) {
+ char c = buffer.charAt(offset);
+ if (c == ',') {
+ v.add(sb.toString());
+ sb = new StringBuffer();
+ offset++;
+ } else if (c == '\\') {
+ try {
+ c = buffer.charAt(offset+1);
+ if (c == 'r') {
+ sb.append("\r"); //$NON-NLS-1$
+ offset = offset + 2;
+ } else if (c == 'n') {
+ sb.append("\n"); //$NON-NLS-1$
+ offset = offset + 2;
+ } else if (c == 't') {
+ sb.append("\t"); //$NON-NLS-1$
+ offset = offset + 2;
+ } else if (c == '\\') {
+ sb.append("\\"); //$NON-NLS-1$
+ offset = offset + 2;
+ } else if (c == ',') {
+ sb.append(","); //$NON-NLS-1$
+ offset = offset + 2;
+ } else if (c == '&') {
+ if (buffer.substring(offset+1).startsWith("&lt;")) { //$NON-NLS-1$
+ sb.append("<"); //$NON-NLS-1$
+ offset = offset + 5;
+ } else if (buffer.substring(offset+1).startsWith("&gt;")) { //$NON-NLS-1$
+ sb.append(">"); //$NON-NLS-1$
+ offset = offset + 5;
+ } else if (buffer.substring(offset+1).startsWith("&amp;")) { //$NON-NLS-1$
+ sb.append("&"); //$NON-NLS-1$
+ offset = offset + 6;
+ } else if (buffer.substring(offset+1).startsWith("&apos;")) { //$NON-NLS-1$
+ sb.append("'"); //$NON-NLS-1$
+ offset = offset + 7;
+ } else if (buffer.substring(offset+1).startsWith("&quot;")) { //$NON-NLS-1$
+ sb.append("\""); //$NON-NLS-1$
+ offset = offset + 7;
+ } else {
+ sb.append("\\&"); //$NON-NLS-1$
+ offset = offset + 2;
+ }
+ } else {
+ sb.append("\\"); //$NON-NLS-1$
+ offset++;
+ }
+ } catch (Exception e) {
+ throw new JET2TagException(JET2Messages.ReplaceStringsTag_BadList+buffer);
+ }
+ } else {
+ sb.append(c);
+ offset++;
+ }
+ }
+ v.add(sb.toString());
+ String[] result = (String[])v.toArray(new String[v.size()]);
+
+ return result;
+ }
+
+ private String replaceString(String buffer, String[] replace, String[] with) throws JET2TagException {
+ if (replace.length != with.length) {
+ throw new JET2TagException(JET2Messages.ReplaceStringsTag_ListsNotSameLength);
+ }
+ for (int i = 0; i < replace.length; i++) {
+ if (replace[i].length() == 0) {
+ throw new JET2TagException(JET2Messages.ReplaceStringsTag_EmptyList);
+ }
+ }
+ StringBuffer sb = new StringBuffer();
+ int offset = 0;
+ while (offset < buffer.length()) {
+ boolean match = false;
+ int i = 0;
+ for (i = 0; (i < replace.length) & !match; i++) {
+ if (buffer.substring(offset).startsWith(replace[i])) {
+ match = true;
+ sb.append(with[i]);
+ offset = offset + replace[i].length();
+ }
+ }
+ if (!match) {
+ sb.append(buffer.charAt(offset));
+ offset++;
+ }
+ }
+
+ return sb.toString();
+ }
+
+ /**
+ * End tag-specific methods
+ */
+
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/StringTokensTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/StringTokensTag.java
new file mode 100644
index 0000000..25908ae
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/control/StringTokensTag.java
@@ -0,0 +1,328 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.taglib.control;
+
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.JET2Writer;
+import org.eclipse.jet.XPathContextExtender;
+import org.eclipse.jet.internal.exceptions.MissingRequiredAttributeException;
+import org.eclipse.jet.taglib.AbstractIteratingTag;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+import org.eclipse.jet.transform.TransformContextExtender;
+
+/**
+ * Implement the Contributed Control Tags tag 'stringTokens'.
+ *
+ */
+public class StringTokensTag extends AbstractIteratingTag {
+
+
+ private String _string = null;
+
+ private String _delimitedBy = null;
+
+ private String _name = null;
+
+ private String _delimiter = null;
+
+ private String _reverse = null;
+
+ private String _tokenLength = null;
+
+ /**
+ * Begin custom declarations
+ */
+
+ private Object tokenNode = null;
+ private StringToken tokens[] = null;
+ private int index = 0;
+
+ /**
+ * End custom declarations
+ */
+
+ public StringTokensTag() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.taglib.IteratingTag#doEvalLoopCondition(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context)
+ */
+ public boolean doEvalLoopCondition(TagInfo tagInfo, JET2Context context)
+ throws JET2TagException {
+
+ boolean doAnotherIteration = false;
+
+ /**
+ * Begin doEvalLoopCondition logic
+ */
+
+ // TODO: stringTokens - implement doEvalLoopCondition()
+
+ /**
+ * End doEvalLoopCondition logic
+ */
+
+ return doAnotherIteration;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.taglib.IteratingTag#doInitializeLoop(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context)
+ */
+ public void doInitializeLoop(TagInfo tagInfo, JET2Context context)
+ throws JET2TagException {
+
+ XPathContextExtender xpathContext = XPathContextExtender.getInstance(context);
+
+ /**
+ * Get the "string" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _string = tagInfo.getAttribute("string"); //$NON-NLS-1$
+ if (_string == null) {
+ throw new MissingRequiredAttributeException("string"); //$NON-NLS-1$
+ }
+
+ /**
+ * Get the "delimitedBy" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _delimitedBy = tagInfo.getAttribute("delimitedBy"); //$NON-NLS-1$
+
+ /**
+ * Get the "name" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _name = tagInfo.getAttribute("name"); //$NON-NLS-1$
+ if (_name == null) {
+ throw new MissingRequiredAttributeException("name"); //$NON-NLS-1$
+ }
+
+ /**
+ * Get the "delimiter" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _delimiter = tagInfo.getAttribute("delimiter"); //$NON-NLS-1$
+
+ /**
+ * Get the "reverse" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _reverse = tagInfo.getAttribute("reverse"); //$NON-NLS-1$
+
+ /**
+ * Get the "tokenLength" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _tokenLength = tagInfo.getAttribute("tokenLength"); //$NON-NLS-1$
+
+ /**
+ * Begin doInitializeLoop logic
+ */
+
+ try {
+ Object modelRoot = TransformContextExtender.loadModelFromString("<token/>", null , "xml"); //$NON-NLS-1$ //$NON-NLS-2$
+ tokenNode = xpathContext.resolveSingle(modelRoot, "/token" ); //$NON-NLS-1$
+
+ boolean reverse = false;
+ if ("true".equalsIgnoreCase(_reverse)) { reverse = true; } //$NON-NLS-1$
+ if ("yes".equalsIgnoreCase(_reverse)) { reverse = true; } //$NON-NLS-1$
+
+ int tokenLength = -1;
+ try { tokenLength = Integer.parseInt(_tokenLength); } catch (Throwable t) {}
+
+ tokens = tokenize(_string,_delimitedBy,tokenLength,reverse);
+
+ setDelimiter(_delimiter);
+ } catch (Exception e) {
+ throw new JET2TagException(e);
+ }
+
+ /**
+ * End doInitializeLoop logic
+ */
+
+ }
+
+ /*
+ * Begin tag-specific methods
+ */
+
+ public void doAfterBody(TagInfo td, JET2Context context, JET2Writer out) throws JET2TagException {
+ super.doAfterBody(td, context, out);
+ context.removeVariable(_name);
+ }
+
+ public void doBeforeBody(TagInfo td, JET2Context context, JET2Writer out) throws JET2TagException {
+ super.doBeforeBody(td, context, out);
+ }
+
+
+ private StringToken[] tokenize(String string, String delimiters, int tokenLength, boolean reverse) {
+ Vector v = new Vector();
+
+ if (tokenLength > 0) {
+ for (int i = 0; i < string.length(); i =i + tokenLength) {
+ StringToken token = new StringToken();
+ token.setToken(string.substring(i,i+tokenLength));
+ token.setDelimiter(""); //$NON-NLS-1$
+ token.setFirst(false);
+ token.setLast(false);
+ v.addElement(token);
+ }
+ } else if (delimiters.length() == 0) {
+ StringTokenizer st = new StringTokenizer(string);
+ while (st.hasMoreTokens()) {
+ StringToken token = new StringToken();
+ token.setToken(st.nextToken());
+ token.setDelimiter(""); //$NON-NLS-1$
+ token.setFirst(false);
+ token.setLast(false);
+ v.addElement(token);
+ }
+ } else {
+ StringTokenizer st = new StringTokenizer(string,delimiters,true);
+ String tok = ""; //$NON-NLS-1$
+ while (st.hasMoreTokens()) {
+ String val = st.nextToken();
+ if ((val.length() == 1) && (delimiters.indexOf(val) > -1)) {
+ StringToken token = new StringToken();
+ token.setToken(tok);
+ token.setDelimiter(val);
+ token.setFirst(false);
+ token.setLast(false);
+ v.addElement(token);
+ tok = ""; //$NON-NLS-1$
+ } else {
+ tok = val;
+ }
+ }
+ if (tok.length() > 0) {
+ StringToken token = new StringToken();
+ token.setToken(tok);
+ token.setDelimiter(""); //$NON-NLS-1$
+ token.setFirst(false);
+ token.setLast(false);
+ v.addElement(token);
+ }
+ }
+
+ StringToken result[] = new StringToken[v.size()];
+ v.copyInto(result);
+ if (reverse) {
+ StringToken backward[] = new StringToken[result.length];
+ for (int i = 0; i < result.length; i++) {
+ backward[i] = result[result.length - 1 - i];
+ }
+ result = backward;
+ }
+ if (result.length > 0) {
+ result[0].setFirst(true);
+ result[result.length - 1].setLast(true);
+ }
+ return result;
+ }
+
+ private class StringToken {
+
+ private String token;
+ private String delimiter;
+ private boolean first;
+ private boolean last;
+ /**
+ * Constructor for StringToken.
+ */
+ public StringToken() {
+ super();
+ }
+
+ /**
+ * Returns the first.
+ * @return boolean
+ */
+ public boolean isFirst() {
+ return first;
+ }
+
+ /**
+ * Returns the last.
+ * @return boolean
+ */
+ public boolean isLast() {
+ return last;
+ }
+
+ /**
+ * Returns the token.
+ * @return String
+ */
+ public String getToken() {
+ return token;
+ }
+
+ /**
+ * Sets the first.
+ * @param first The first to set
+ */
+ public void setFirst(boolean first) {
+ this.first = first;
+ }
+
+ /**
+ * Sets the last.
+ * @param last The last to set
+ */
+ public void setLast(boolean last) {
+ this.last = last;
+ }
+
+ /**
+ * Sets the token.
+ * @param token The token to set
+ */
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ /**
+ * Returns the delimiter.
+ * @return boolean
+ */
+ public String getDelimiter() {
+ return delimiter;
+ }
+
+ /**
+ * Sets the delimiter.
+ * @param delimiter The delimiter to set
+ */
+ public void setDelimiter(String delimiter) {
+ this.delimiter = delimiter;
+ }
+ }
+
+ /*
+ * End tag-specific methods
+ */
+
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/FormatContextExtender.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/FormatContextExtender.java
new file mode 100644
index 0000000..5c0b9a2
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/FormatContextExtender.java
@@ -0,0 +1,92 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.jet.internal.taglib.format;
+
+import org.eclipse.jet.AbstractContextExtender;
+import org.eclipse.jet.JET2Context;
+
+/**
+ * Provide storage for unique and milliseconds tags
+ */
+public class FormatContextExtender extends AbstractContextExtender
+{
+
+ private static final class ContextData {
+
+ private long lastMilliseconds = 0;
+ private int lastUnique = 0;
+
+ public long getMilliseconds() {
+ long next = System.currentTimeMillis();
+ if (next <= lastMilliseconds) {
+ next = lastMilliseconds + 1;
+ }
+ lastMilliseconds = next;
+ return next;
+ }
+
+ public int getUnique() {
+ int unique = lastUnique + 1;
+ lastUnique = unique;
+ return unique;
+ }
+
+ }
+
+ public static FormatContextExtender getInstance(JET2Context context)
+ {
+ return new FormatContextExtender(context);
+ }
+
+ /**
+ * @param context
+ */
+ private FormatContextExtender(JET2Context context)
+ {
+ super(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.AbstractContextExtender#createExtendedData(org.eclipse.jet.JET2Context)
+ */
+ protected Object createExtendedData(JET2Context context)
+ {
+ return new ContextData();
+ }
+
+
+
+ /**
+ * Reurns a unique system time in milliseconds.
+ */
+ public long getMilliseconds() {
+ return getData().getMilliseconds();
+ }
+
+ private ContextData getData()
+ {
+ return (ContextData)getExtendedData();
+ }
+
+ /**
+ * Reurns a unique integer.
+ */
+ public int getUnique() {
+ return getData().getUnique();
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/FormatNowTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/FormatNowTag.java
new file mode 100644
index 0000000..e8f0200
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/FormatNowTag.java
@@ -0,0 +1,89 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.taglib.format;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.JET2Writer;
+import org.eclipse.jet.internal.exceptions.MissingRequiredAttributeException;
+import org.eclipse.jet.taglib.AbstractEmptyTag;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+
+
+
+/**
+ * Implement the Contributed Function Tags tag 'formatNow'.
+ *
+ */
+public class FormatNowTag extends AbstractEmptyTag {
+
+
+ private String _pattern = null;
+
+ /*
+ * Begin tag-specific declarations
+ */
+
+ /*
+ * End tag-specific declarations
+ */
+
+ public FormatNowTag() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.taglib.EmptyTag#doAction(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context, org.eclipse.jet.JET2Writer)
+ */
+ public void doAction(TagInfo tagInfo, JET2Context context, JET2Writer out) throws JET2TagException {
+
+ /**
+ * Get the "pattern" attribute and convert any embedded dynamic attributes
+ * into dynamic XPath expressions.
+ */
+ _pattern = tagInfo.getAttribute("pattern"); //$NON-NLS-1$
+ if (_pattern == null) {
+ throw new MissingRequiredAttributeException("pattern"); //$NON-NLS-1$
+ }
+
+ /**
+ * Begin doAction logic
+ */
+
+ SimpleDateFormat f = new SimpleDateFormat(_pattern);
+ String buf = f.format(new Date());
+ out.write(buf);
+
+ /**
+ * End doAction logic
+ */
+
+ }
+
+ /**
+ * Begin custom methods
+ */
+
+ /**
+ * End custom methods
+ */
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/MillisecondsTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/MillisecondsTag.java
new file mode 100644
index 0000000..dcaed71
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/MillisecondsTag.java
@@ -0,0 +1,67 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.taglib.format;
+
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.JET2Writer;
+import org.eclipse.jet.taglib.AbstractEmptyTag;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+
+/**
+ * Implement the Contributed Function Tags tag 'milliseconds'.
+ *
+ */
+public class MillisecondsTag extends AbstractEmptyTag {
+
+
+ /*
+ * Begin tag-specific declarations
+ */
+
+ /*
+ * End tag-specific declarations
+ */
+
+ public MillisecondsTag() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.taglib.EmptyTag#doAction(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context, org.eclipse.jet.JET2Writer)
+ */
+ public void doAction(TagInfo tagInfo, JET2Context context, JET2Writer out) throws JET2TagException {
+
+ long milliseconds = FormatContextExtender.getInstance(context).getMilliseconds();
+ out.write(milliseconds);
+
+ /**
+ * End doAction logic
+ */
+
+ }
+
+ /**
+ * Begin custom methods
+ */
+
+ /**
+ * End custom methods
+ */
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/UniqueTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/UniqueTag.java
new file mode 100644
index 0000000..bcb4179
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/UniqueTag.java
@@ -0,0 +1,60 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.taglib.format;
+
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.JET2Writer;
+import org.eclipse.jet.taglib.AbstractEmptyTag;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+
+
+/**
+ * Implement the Contributed Function Tags tag 'unique'.
+ *
+ */
+public class UniqueTag extends AbstractEmptyTag {
+
+
+ public UniqueTag() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.taglib.EmptyTag#doAction(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context, org.eclipse.jet.JET2Writer)
+ */
+ public void doAction(TagInfo tagInfo, JET2Context context, JET2Writer out) throws JET2TagException {
+
+ int unique = FormatContextExtender.getInstance(context).getUnique();
+ out.write(unique);
+
+ /**
+ * End doAction logic
+ */
+
+ }
+
+ /**
+ * Begin custom methods
+ */
+
+ /**
+ * End custom methods
+ */
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/UuidTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/UuidTag.java
new file mode 100644
index 0000000..eff6f50
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/format/UuidTag.java
@@ -0,0 +1,67 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.taglib.format;
+
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.JET2Writer;
+import org.eclipse.jet.taglib.AbstractEmptyTag;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+
+/**
+ * Implement the Contributed Function Tags tag 'uuid'.
+ *
+ */
+public class UuidTag extends AbstractEmptyTag {
+
+
+ /*
+ * Begin tag-specific declarations
+ */
+
+ /*
+ * End tag-specific declarations
+ */
+
+ public UuidTag() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.taglib.EmptyTag#doAction(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context, org.eclipse.jet.JET2Writer)
+ */
+ public void doAction(TagInfo tagInfo, JET2Context context, JET2Writer out) throws JET2TagException {
+
+ out.write(EcoreUtil.generateUUID());
+
+ /**
+ * End doAction logic
+ */
+
+ }
+
+ /**
+ * Begin custom methods
+ */
+
+ /**
+ * End custom methods
+ */
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/RebuildWorkspaceAction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/RebuildWorkspaceAction.java
new file mode 100644
index 0000000..24f06ca
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/RebuildWorkspaceAction.java
@@ -0,0 +1,85 @@
+package org.eclipse.jet.internal.taglib.workspace;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+import org.eclipse.jet.taglib.workspace.AbstractWorkspaceAction;
+
+/*
+ * Begin custom imports
+ */
+
+import org.eclipse.core.resources.ResourcesPlugin;
+
+/*
+ * End custom imports
+ */
+
+public class RebuildWorkspaceAction extends AbstractWorkspaceAction {
+
+ /*
+ * Begin custom declarations
+ */
+
+ /*
+ * End custom declarations
+ */
+
+ /*
+ * Begin constructor
+ */
+
+ public RebuildWorkspaceAction(TagInfo tagInfo, String templatePath) {
+ super(tagInfo, templatePath);
+ }
+
+ /*
+ * End constructor
+ */
+
+ public IResource getResource() throws JET2TagException {
+ /*
+ * Begin getResource logic
+ */
+
+ return null;
+
+ /*
+ * End getResource logic
+ */
+ }
+
+ public boolean requiresValidateEdit() throws JET2TagException {
+ /*
+ * Begin requiresValidate logic
+ */
+
+ return false;
+
+ /*
+ * End requiresValidate logic
+ */
+ }
+
+ public void performAction(IProgressMonitor monitor) throws JET2TagException {
+ /*
+ * Begin action logic
+ */
+
+ ResourcesPlugin.getWorkspace().checkpoint(true);
+
+ /*
+ * End action logic
+ */
+ }
+
+ /*
+ * Begin custom logic
+ */
+
+ /*
+ * End custom logic
+ */
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/RebuildWorkspaceTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/RebuildWorkspaceTag.java
new file mode 100644
index 0000000..4975fa5
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/workspace/RebuildWorkspaceTag.java
@@ -0,0 +1,73 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.taglib.workspace;
+
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.JET2Writer;
+import org.eclipse.jet.taglib.AbstractEmptyTag;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+import org.eclipse.jet.taglib.workspace.WorkspaceContextExtender;
+import org.eclipse.jet.transform.TransformContextExtender;
+
+
+/**
+ * Implement the Contributed Workspace Tags tag 'rebuildWorkspace'.
+ *
+ */
+public class RebuildWorkspaceTag extends AbstractEmptyTag {
+
+
+ /*
+ * Begin tag-specific declarations
+ */
+
+ /*
+ * End tag-specific declarations
+ */
+
+ public RebuildWorkspaceTag() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.taglib.EmptyTag#doAction(org.eclipse.jet.taglib.TagInfo, org.eclipse.jet.JET2Context, org.eclipse.jet.JET2Writer)
+ */
+ public void doAction(TagInfo tagInfo, JET2Context context, JET2Writer out) throws JET2TagException {
+
+ TransformContextExtender tce = TransformContextExtender.getInstance(context);
+ String templatePath = tce.getTemplatePath();
+
+ WorkspaceContextExtender wsExtender = WorkspaceContextExtender.getInstance(context);
+ wsExtender.addAction(new RebuildWorkspaceAction(tagInfo, templatePath));
+
+ /**
+ * End doAction logic
+ */
+
+ }
+
+ /**
+ * Begin custom methods
+ */
+
+ /**
+ * End custom methods
+ */
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/CamelCaseFunction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/CamelCaseFunction.java
new file mode 100644
index 0000000..8ae09a6
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/CamelCaseFunction.java
@@ -0,0 +1,65 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.xpath.functions.extras;
+
+import java.util.List;
+
+import org.eclipse.jet.xpath.XPathFunction;
+import org.eclipse.jet.xpath.XPathUtil;
+
+ /*
+ * End custom imports
+ */
+
+public class CamelCaseFunction implements XPathFunction {
+
+ public CamelCaseFunction() {
+ super();
+ }
+
+ public Object evaluate(List args) {
+ /*
+ * Begin function logic
+ */
+
+ String buffer = XPathUtil.xpathString(args.get(0));
+
+ boolean first = true;
+ StringBuffer sb = new StringBuffer(buffer.length());
+ for (int index = 0; index < buffer.length(); index++) {
+ char c = buffer.charAt(index);
+ if (Character.isWhitespace(c)) {
+ first = true;
+ } else if(Character.isJavaIdentifierPart(c)) {
+// } else {
+ if (first) { c = Character.toUpperCase(c); }
+ else { c = Character.toLowerCase(c); }
+ sb.append(c);
+ first = false;
+ }
+ }
+ buffer = sb.toString();
+
+ return sb.toString();
+
+ /*
+ * End function logic
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/CardinalityFunction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/CardinalityFunction.java
new file mode 100644
index 0000000..4e44571
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/CardinalityFunction.java
@@ -0,0 +1,57 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.xpath.functions.extras;
+
+import java.util.List;
+
+import org.eclipse.jet.xpath.NodeSet;
+import org.eclipse.jet.xpath.XPathFunction;
+import org.eclipse.jet.xpath.XPathUtil;
+
+ /*
+ * End custom imports
+ */
+
+public class CardinalityFunction implements XPathFunction {
+
+ public CardinalityFunction() {
+ super();
+ }
+
+ public Object evaluate(List args) {
+ /*
+ * Begin function logic
+ */
+
+ NodeSet list = (NodeSet) args.get(0);
+ int count = list.size();
+ String buffer = XPathUtil.xpathString(args.get(1)).toLowerCase();
+
+ boolean result = false;
+ if ((count == 0) && (buffer.indexOf('0') > -1)) { result = true; }
+ if ((count == 1) && (buffer.indexOf('1') > -1)) { result = true; }
+ if ((count > 1) && (buffer.indexOf('m') > -1)) { result = true; }
+
+ return new Boolean(result);
+
+ /*
+ * End function logic
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/ClassNameFunction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/ClassNameFunction.java
new file mode 100644
index 0000000..ebddf22
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/ClassNameFunction.java
@@ -0,0 +1,56 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.xpath.functions.extras;
+
+
+import java.util.List;
+
+import org.eclipse.jet.xpath.XPathFunction;
+import org.eclipse.jet.xpath.XPathUtil;
+
+
+/*
+ * End custom imports
+ */
+
+public class ClassNameFunction implements XPathFunction
+{
+
+ public ClassNameFunction()
+ {
+ super();
+ }
+
+ public Object evaluate(List args)
+ {
+ /*
+ * Begin function logic
+ */
+
+ String buffer = XPathUtil.xpathString(args.get(0));
+ final int lastDotIndex = buffer.lastIndexOf('.');
+ buffer = lastDotIndex >= 0 ? buffer.substring(lastDotIndex + 1) : buffer;
+
+ return buffer;
+
+ /*
+ * End function logic
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/EscapeJavaWhitespaceFunction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/EscapeJavaWhitespaceFunction.java
new file mode 100644
index 0000000..5481dd2
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/EscapeJavaWhitespaceFunction.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.xpath.functions.extras;
+
+import java.util.List;
+
+import org.eclipse.jet.internal.JavaUtil;
+import org.eclipse.jet.internal.xpath.functions.StringFunction;
+import org.eclipse.jet.xpath.XPathFunction;
+
+ /*
+ * End custom imports
+ */
+
+public class EscapeJavaWhitespaceFunction implements XPathFunction {
+
+ public EscapeJavaWhitespaceFunction() {
+ super();
+ }
+
+ public Object evaluate(List args) {
+ /*
+ * Begin function logic
+ */
+
+ String buffer = StringFunction.evaluate(args.get(0));
+
+ return JavaUtil.escapeJavaString(buffer.toCharArray());
+
+ /*
+ * End function logic
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/Lower_caseFunction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/Lower_caseFunction.java
new file mode 100644
index 0000000..51a1706
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/Lower_caseFunction.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.xpath.functions.extras;
+
+import java.util.List;
+
+import org.eclipse.jet.internal.xpath.functions.StringFunction;
+import org.eclipse.jet.xpath.XPathFunction;
+
+ /*
+ * End custom imports
+ */
+
+public class Lower_caseFunction implements XPathFunction {
+
+ public Lower_caseFunction() {
+ super();
+ }
+
+ public Object evaluate(List args) {
+ /*
+ * Begin function logic
+ */
+
+ String buffer = StringFunction.evaluate(args.get(0));
+ buffer = buffer.toLowerCase();
+
+ return buffer;
+
+ /*
+ * End function logic
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/LowercaseFirstFunction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/LowercaseFirstFunction.java
new file mode 100644
index 0000000..fa06943
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/LowercaseFirstFunction.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.xpath.functions.extras;
+
+import java.util.List;
+
+import org.eclipse.jet.internal.xpath.functions.StringFunction;
+import org.eclipse.jet.xpath.XPathFunction;
+
+ /*
+ * End custom imports
+ */
+
+public class LowercaseFirstFunction implements XPathFunction {
+
+ public LowercaseFirstFunction() {
+ super();
+ }
+
+ public Object evaluate(List args) {
+ /*
+ * Begin function logic
+ */
+
+ String buffer = StringFunction.evaluate(args.get(0));
+ buffer = buffer.length() > 0 ? buffer.substring(0,1).toLowerCase() + buffer.substring(1) : buffer;
+
+ return buffer;
+
+ /*
+ * End function logic
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/PackageNameFunction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/PackageNameFunction.java
new file mode 100644
index 0000000..ae514e0
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/PackageNameFunction.java
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.xpath.functions.extras;
+
+import java.util.List;
+
+import org.eclipse.jet.internal.xpath.functions.StringFunction;
+import org.eclipse.jet.xpath.XPathFunction;
+
+ /*
+ * End custom imports
+ */
+
+public class PackageNameFunction implements XPathFunction {
+
+ public PackageNameFunction() {
+ super();
+ }
+
+ public Object evaluate(List args) {
+ /*
+ * Begin function logic
+ */
+
+ String buffer = StringFunction.evaluate(args.get(0));
+ final int lastDotIndex = buffer.lastIndexOf('.');
+ buffer = lastDotIndex >= 0 ? buffer.substring(0,lastDotIndex) : ""; //$NON-NLS-1$
+
+ return buffer;
+
+ /*
+ * End function logic
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/RemoveWhitespaceFunction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/RemoveWhitespaceFunction.java
new file mode 100644
index 0000000..8a54c64
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/RemoveWhitespaceFunction.java
@@ -0,0 +1,55 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.xpath.functions.extras;
+
+import java.util.List;
+
+import org.eclipse.jet.internal.xpath.functions.StringFunction;
+import org.eclipse.jet.xpath.XPathFunction;
+
+ /*
+ * End custom imports
+ */
+
+public class RemoveWhitespaceFunction implements XPathFunction {
+
+ public RemoveWhitespaceFunction() {
+ super();
+ }
+
+ public Object evaluate(List args) {
+ /*
+ * Begin function logic
+ */
+
+ String buffer = StringFunction.evaluate(args.get(0));
+ StringBuffer sb = new StringBuffer(buffer.length());
+ for (int index = 0; index < buffer.length(); index++) {
+ char c = buffer.charAt(index);
+ if (!Character.isWhitespace(c)) { sb.append(c); }
+ }
+ buffer = sb.toString();
+
+ return buffer;
+
+ /*
+ * End function logic
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/TrimWhitespaceFunction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/TrimWhitespaceFunction.java
new file mode 100644
index 0000000..cdd119a
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/TrimWhitespaceFunction.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.xpath.functions.extras;
+
+import java.util.List;
+
+import org.eclipse.jet.internal.xpath.functions.StringFunction;
+import org.eclipse.jet.xpath.XPathFunction;
+
+ /*
+ * End custom imports
+ */
+
+public class TrimWhitespaceFunction implements XPathFunction {
+
+ public TrimWhitespaceFunction() {
+ super();
+ }
+
+ public Object evaluate(List args) {
+ /*
+ * Begin function logic
+ */
+
+ String buffer = StringFunction.evaluate(args.get(0));
+ buffer = buffer.trim();
+
+ return buffer;
+
+ /*
+ * End function logic
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/Upper_caseFunction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/Upper_caseFunction.java
new file mode 100644
index 0000000..3ebe08e
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/Upper_caseFunction.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.xpath.functions.extras;
+
+import java.util.List;
+
+import org.eclipse.jet.internal.xpath.functions.StringFunction;
+import org.eclipse.jet.xpath.XPathFunction;
+
+ /*
+ * End custom imports
+ */
+
+public class Upper_caseFunction implements XPathFunction {
+
+ public Upper_caseFunction() {
+ super();
+ }
+
+ public Object evaluate(List args) {
+ /*
+ * Begin function logic
+ */
+
+ String buffer = StringFunction.evaluate(args.get(0));
+ buffer = buffer.toUpperCase();
+
+ return buffer;
+
+ /*
+ * End function logic
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/UppercaseFirstFunction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/UppercaseFirstFunction.java
new file mode 100644
index 0000000..d97215c
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/UppercaseFirstFunction.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.xpath.functions.extras;
+
+import java.util.List;
+
+import org.eclipse.jet.internal.xpath.functions.StringFunction;
+import org.eclipse.jet.xpath.XPathFunction;
+
+ /*
+ * End custom imports
+ */
+
+public class UppercaseFirstFunction implements XPathFunction {
+
+ public UppercaseFirstFunction() {
+ super();
+ }
+
+ public Object evaluate(List args) {
+ /*
+ * Begin function logic
+ */
+
+ String buffer = StringFunction.evaluate(args.get(0));
+ buffer = buffer.length() > 0 ? buffer.substring(0,1).toUpperCase() + buffer.substring(1) : ""; //$NON-NLS-1$
+
+ return buffer;
+
+ /*
+ * End function logic
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/XmlEncodeFunction.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/XmlEncodeFunction.java
new file mode 100644
index 0000000..72a1c86
--- /dev/null
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/xpath/functions/extras/XmlEncodeFunction.java
@@ -0,0 +1,59 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id$
+ */
+
+package org.eclipse.jet.internal.xpath.functions.extras;
+
+import java.util.List;
+
+import org.eclipse.jet.internal.xpath.functions.StringFunction;
+import org.eclipse.jet.xpath.XPathFunction;
+
+ /*
+ * End custom imports
+ */
+
+public class XmlEncodeFunction implements XPathFunction {
+
+ public XmlEncodeFunction() {
+ super();
+ }
+
+ public Object evaluate(List args) {
+ /*
+ * Begin function logic
+ */
+
+ String buffer = StringFunction.evaluate(args.get(0));
+
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < buffer.length(); i++) {
+ char c = buffer.charAt(i);
+ if (c == '&') { sb.append("&amp;"); } //$NON-NLS-1$
+ else if (c == '<') { sb.append("&lt;"); } //$NON-NLS-1$
+ else if (c == '>') { sb.append("&gt;"); } //$NON-NLS-1$
+ else if (c == '\'') { sb.append("&apos;"); } //$NON-NLS-1$
+ else if (c == '"') { sb.append("&quot;"); } //$NON-NLS-1$
+ else {sb.append(c); }
+ }
+ return sb.toString();
+
+ /*
+ * End function logic
+ */
+ }
+
+}
diff --git a/plugins/org.eclipse.jet/templates/jet2java.javajet b/plugins/org.eclipse.jet/templates/jet2java.javajet
index c4ba6b0..57ad85e 100644
--- a/plugins/org.eclipse.jet/templates/jet2java.javajet
+++ b/plugins/org.eclipse.jet/templates/jet2java.javajet
@@ -1,6 +1,6 @@
<%@jet package="org.eclipse.jet.internal.compiler.templates"
class="JET2JavaGenerator"
- imports="org.eclipse.jet.internal.compiler.* org.eclipse.jet.compiler.* org.eclipse.jet.taglib.TagLibraryReference java.util.Iterator java.util.Map"
+ imports="org.eclipse.jet.internal.compiler.* org.eclipse.jet.compiler.* org.eclipse.jet.internal.JavaUtil org.eclipse.jet.taglib.TagLibraryReference java.util.Iterator java.util.Map"
%>
<%
JET2CompilationUnit cu = (JET2CompilationUnit)argument;
@@ -45,7 +45,7 @@
tagDataDeclarations.append(" new String[] {");
for (Iterator i = element.getAttributes().values().iterator(); i.hasNext();) {
String attrValue = (String) i.next();
- tagDataDeclarations.append(MethodBodyCreator.encodeJavaString(attrValue.toCharArray())).append(", ");
+ tagDataDeclarations.append(JavaUtil.asJavaQuotedString(attrValue.toCharArray())).append(", ");
}
tagDataDeclarations.append("});").append(NL);
}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllTests.java
index 49684c7..4b2fe16 100644
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllTests.java
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/AllTests.java
@@ -1,5 +1,6 @@
package org.eclipse.jet.tests;
+
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -8,12 +9,14 @@ public class AllTests {
public static Test suite() {
TestSuite suite = new TestSuite("Test for org.eclipse.jet.tests");
suite.addTest(org.eclipse.jet.tests.compiler.AllTests.suite());
- suite.addTest(org.eclipse.jet.tests.runtime.AllTests.suite());
suite.addTest(org.eclipse.jet.tests.xpath.AllTests.suite());
+ suite.addTest(org.eclipse.jet.tests.xpath.functions.extras.AllTests.suite());
suite.addTest(org.eclipse.jet.tests.model.load.AllTests.suite());
suite.addTest(org.eclipse.jet.tests.taglib.AllTests.suite());
suite.addTest(org.eclipse.jet.tests.taglib.control.AllTests.suite());
suite.addTest(org.eclipse.jet.tests.taglib.java.AllTests.suite());
+ suite.addTest(org.eclipse.jet.tests.taglib.format.AllTests.suite());
+ suite.addTest(org.eclipse.jet.tests.runtime.AllTests.suite());
//$JUnit-BEGIN$
//$JUnit-END$
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/AllTests.java
new file mode 100644
index 0000000..96f4996
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/AllTests.java
@@ -0,0 +1,18 @@
+package org.eclipse.jet.tests.taglib.format;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.jet.tests.taglib.format");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(UuidTagTests.class);
+ suite.addTestSuite(FormatContextExtenderTests.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatContextExtenderTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatContextExtenderTests.java
new file mode 100644
index 0000000..cb3ce9c
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatContextExtenderTests.java
@@ -0,0 +1,42 @@
+package org.eclipse.jet.tests.taglib.format;
+
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.internal.taglib.format.FormatContextExtender;
+
+import junit.framework.TestCase;
+
+public class FormatContextExtenderTests extends TestCase {
+
+ private FormatContextExtender fce;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ fce = FormatContextExtender.getInstance(new JET2Context(null));
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /*
+ * Test method for 'org.eclipse.jet.internal.taglib.format.FormatContextExtender.getMilliseconds()'
+ */
+ public void testGetMilliseconds() {
+ final long ms1 = fce.getMilliseconds();
+ assertTrue("positive", ms1 > 0);
+ final long ms2 = fce.getMilliseconds();
+ assertTrue(ms2 > ms1);
+
+ }
+
+ /*
+ * Test method for 'org.eclipse.jet.internal.taglib.format.FormatContextExtender.getUnique()'
+ */
+ public void testGetUnique() {
+ final int unique1 = fce.getUnique();
+ assertEquals(1, unique1);
+ final int unique2 = fce.getUnique();
+ assertEquals(unique1 + 1, unique2);
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatNowTagTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatNowTagTests.java
new file mode 100644
index 0000000..71676a4
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/FormatNowTagTests.java
@@ -0,0 +1,60 @@
+package org.eclipse.jet.tests.taglib.format;
+
+import java.util.Calendar;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jet.BodyContentWriter;
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.JET2Writer;
+import org.eclipse.jet.internal.taglib.format.FormatNowTag;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+
+public class FormatNowTagTests extends TestCase {
+
+ private JET2Writer out;
+ private FormatNowTag tag;
+ private TagInfo tagInfo;
+ private JET2Context context;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ this.out = new BodyContentWriter();
+ this.tag = new FormatNowTag();
+ context = new JET2Context(null);
+ tag.setContext(context);
+ tag.setOut(out);
+ tag.setParent(null);
+ tagInfo = new TagInfo("f:formatNow", 1, 1,
+ new String[] {
+ "format"
+ },
+ new String[] {
+ "yyyy.MM.dd.HH.mm"
+ });
+ tag.setTagInfo(tagInfo);
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /*
+ * Test method for 'org.eclipse.jet.internal.taglib.format.FormatNowTag.doAction(TagInfo, JET2Context, JET2Writer)'
+ */
+ public void testDoAction() throws JET2TagException {
+ final Calendar now = Calendar.getInstance();
+ tag.doAction(tagInfo, context, out);
+
+ String formatted = out.getDocument().get();
+ final String[] parts = formatted.split("\\.");
+ assertNotNull(parts);
+ assertEquals(5, parts.length);
+ assertEquals(String.valueOf(now.get(Calendar.YEAR)), parts[0]);
+ assertEquals(String.valueOf(now.get(Calendar.MONTH)), parts[1]);
+ assertEquals(String.valueOf(now.get(Calendar.DAY_OF_MONTH)), parts[2]);
+ assertEquals(String.valueOf(now.get(Calendar.HOUR_OF_DAY)), parts[3]);
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/UuidTagTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/UuidTagTests.java
new file mode 100644
index 0000000..3426081
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/taglib/format/UuidTagTests.java
@@ -0,0 +1,56 @@
+package org.eclipse.jet.tests.taglib.format;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jet.BodyContentWriter;
+import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.JET2Writer;
+import org.eclipse.jet.internal.taglib.format.UuidTag;
+import org.eclipse.jet.taglib.JET2TagException;
+import org.eclipse.jet.taglib.TagInfo;
+
+public class UuidTagTests extends TestCase {
+
+ private JET2Writer out;
+ private UuidTag tag;
+ private TagInfo tagInfo;
+ private JET2Context context;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ this.out = new BodyContentWriter();
+ this.tag = new UuidTag();
+ context = new JET2Context(null);
+ tag.setContext(context);
+ tag.setOut(out);
+ tag.setParent(null);
+ tagInfo = new TagInfo("f:uuid", 1, 1, new String[0], new String[0]);
+ tag.setTagInfo(tagInfo);
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /*
+ * Test method for 'org.eclipse.jet.internal.taglib.format.UuidTag.doAction(TagInfo, JET2Context, JET2Writer)'
+ */
+ public void testDoAction() throws JET2TagException {
+ tag.doAction(tagInfo, context, out);
+
+ String uuid1 = out.getDocument().get();
+
+ assertNotNull(uuid1);
+ assertEquals(23, uuid1.length()); // all UUIDs returned by this tag are 23 chars
+ out.getDocument().set("");
+
+ tag.doAction(tagInfo, context, out);
+ String uuid2 = out.getDocument().get();
+ assertNotNull(uuid2);
+ assertEquals(23, uuid2.length()); // all UUIDs returned by this tag are 23 chars
+
+ assertTrue("uuid1 != uuid2", !uuid1.equals(uuid2));
+
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/AllTests.java
new file mode 100644
index 0000000..997964b
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/AllTests.java
@@ -0,0 +1,28 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.jet.tests.xpath.functions.extras");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(PackageNameFunctionTests.class);
+ suite.addTestSuite(LowerCaseFunctionTests.class);
+ suite.addTestSuite(CamelCaseFunctionTests.class);
+ suite.addTestSuite(EscapeJavaWhitespaceFunctionTests.class);
+ suite.addTestSuite(UpperCaseFirstFunctionTests.class);
+ suite.addTestSuite(LowercaseFirstFunctionTests.class);
+ suite.addTestSuite(CardinalityFunctionTests.class);
+ suite.addTestSuite(UpperCaseFunctionTests.class);
+ suite.addTestSuite(XMLEncodeFunctionTests.class);
+ suite.addTestSuite(ClassNameFunctionTests.class);
+ suite.addTestSuite(TrimWhitespaceFunctionTests.class);
+ suite.addTestSuite(RemoveWhitespaceFunctionTests.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/CamelCaseFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/CamelCaseFunctionTests.java
new file mode 100644
index 0000000..5daefcd
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/CamelCaseFunctionTests.java
@@ -0,0 +1,42 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import java.util.Collections;
+
+import org.eclipse.jet.internal.xpath.functions.extras.CamelCaseFunction;
+
+import junit.framework.TestCase;
+
+public class CamelCaseFunctionTests extends TestCase {
+
+ /*
+ * Test method for 'org.eclipse.jet.internal.xpath.functions.extras.CamelCaseFunction.evaluate(List)'
+ */
+ public void testEvaluate() {
+ String arg = "hello world";
+ final Object result = doFunction(arg);
+ assertEquals("HelloWorld", result);
+
+ }
+
+ public void testEvaluate_alreadyCC() {
+ String arg = "JETWriter";
+ final Object result = doFunction(arg);
+ assertEquals("Jetwriter", result);
+ }
+
+ public void testEvaluate_withIllegalChars() {
+ String arg = "dots.are.not.allowed";
+ final Object result = doFunction(arg);
+ assertEquals("Dotsarenotallowed", result);
+ }
+
+ /**
+ * @param arg
+ * @return
+ */
+ private Object doFunction(String arg) {
+ final Object result = new CamelCaseFunction().evaluate(Collections.singletonList(arg));
+ return result;
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/CardinalityFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/CardinalityFunctionTests.java
new file mode 100644
index 0000000..807a193
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/CardinalityFunctionTests.java
@@ -0,0 +1,84 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jet.internal.xpath.NodeSetImpl;
+import org.eclipse.jet.internal.xpath.functions.extras.CardinalityFunction;
+import org.eclipse.jet.xpath.NodeSet;
+
+public class CardinalityFunctionTests extends TestCase {
+
+ private final NodeSet emptyNodeSet;
+ private final NodeSet singletonNodeSet;
+ private final NodeSet binaryNodeSet;
+
+ public CardinalityFunctionTests() {
+ emptyNodeSet = new NodeSetImpl();
+
+ singletonNodeSet = new NodeSetImpl();
+ singletonNodeSet.add("one");
+
+ binaryNodeSet = new NodeSetImpl();
+ binaryNodeSet.add("one");
+ binaryNodeSet.add("two");
+ }
+
+ private boolean doFunction(NodeSet nodeSet, String cardTest) {
+ List args = new ArrayList();
+ args.add(nodeSet);
+ args.add(cardTest);
+ return ((Boolean)new CardinalityFunction().evaluate(args)).booleanValue();
+ }
+ /*
+ * Test method for 'org.eclipse.jet.internal.xpath.functions.extras.CardinalityFunction.evaluate(List)'
+ */
+ public void testEvaluate_1() {
+ final String testCardinality = "1";
+ final boolean emptyResult = doFunction(emptyNodeSet, testCardinality);
+ final boolean singletonResult = doFunction(singletonNodeSet, testCardinality);
+ final boolean binaryResult = doFunction(binaryNodeSet, testCardinality);
+
+ assertFalse("emptyResult", emptyResult);
+ assertTrue("singletonResult", singletonResult);
+ assertFalse("binaryResult", binaryResult);
+ }
+
+ public void testEvaluate_0() {
+ final String testCardinality = "0";
+ final boolean emptyResult = doFunction(emptyNodeSet, testCardinality);
+ final boolean singletonResult = doFunction(singletonNodeSet, testCardinality);
+ final boolean binaryResult = doFunction(binaryNodeSet, testCardinality);
+
+ assertTrue("emptyResult", emptyResult);
+ assertFalse("singletonResult", singletonResult);
+ assertFalse("binaryResult", binaryResult);
+ }
+
+ public void testEvaluate_m() {
+ final String testCardinality = "m";
+ final boolean emptyResult = doFunction(emptyNodeSet, testCardinality);
+ final boolean singletonResult = doFunction(singletonNodeSet, testCardinality);
+ final boolean binaryResult = doFunction(binaryNodeSet, testCardinality);
+
+ assertFalse("emptyResult", emptyResult);
+ assertFalse("singletonResult", singletonResult);
+ assertTrue("binaryResult", binaryResult);
+ }
+
+ public void testEvaluate_1m() {
+ final String testCardinality = "1m";
+ final boolean emptyResult = doFunction(emptyNodeSet, testCardinality);
+ final boolean singletonResult = doFunction(singletonNodeSet, testCardinality);
+ final boolean binaryResult = doFunction(binaryNodeSet, testCardinality);
+
+ assertFalse("emptyResult", emptyResult);
+ assertTrue("singletonResult", singletonResult);
+ assertTrue("binaryResult", binaryResult);
+ }
+
+
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/ClassNameFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/ClassNameFunctionTests.java
new file mode 100644
index 0000000..c3846e2
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/ClassNameFunctionTests.java
@@ -0,0 +1,44 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import java.util.Collections;
+
+import org.eclipse.jet.internal.xpath.functions.extras.ClassNameFunction;
+
+import junit.framework.TestCase;
+
+public class ClassNameFunctionTests extends TestCase {
+
+ /*
+ * Test method for 'org.eclipse.jet.internal.xpath.functions.extras.ClassNameFunction.evaluate(List)'
+ */
+ public void testEvaluate() {
+ String arg = "a.b.c.MyClass";
+ final Object result = doFunction(arg);
+
+ assertEquals("MyClass", result);
+ }
+
+ public void testEvaluate_defaultPackage() {
+ String arg = "MyClass";
+ final Object result = doFunction(arg);
+
+ assertEquals("MyClass", result);
+ }
+
+ public void testEvaluate_empty() {
+ String arg = "";
+ final Object result = doFunction(arg);
+
+ assertEquals("", result);
+ }
+
+ /**
+ * @param arg
+ * @return
+ */
+ private Object doFunction(String arg) {
+ final Object result = new ClassNameFunction().evaluate(Collections.singletonList(arg));
+ return result;
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/EscapeJavaWhitespaceFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/EscapeJavaWhitespaceFunctionTests.java
new file mode 100644
index 0000000..cee9ba8
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/EscapeJavaWhitespaceFunctionTests.java
@@ -0,0 +1,26 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import java.util.Collections;
+
+import org.eclipse.jet.internal.xpath.functions.extras.EscapeJavaWhitespaceFunction;
+
+import junit.framework.TestCase;
+
+public class EscapeJavaWhitespaceFunctionTests extends TestCase {
+
+
+ private String doFunction(String arg) {
+ return (String) new EscapeJavaWhitespaceFunction().evaluate(Collections.singletonList(arg));
+ }
+ /*
+ * Test method for 'org.eclipse.jet.internal.xpath.functions.extras.EscapeJavaWhitespaceFunction.evaluate(List)'
+ */
+ public void testEvaluate() {
+ String arg = "r:\r n:\n t:\t b:\b f:\f slash:\\ quote:\"";
+ final String result = doFunction(arg);
+
+ assertEquals("r:\\r n:\\n t:\\t b:\\b f:\\f slash:\\\\ quote:\\\"", result);
+
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/LowerCaseFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/LowerCaseFunctionTests.java
new file mode 100644
index 0000000..90b286d
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/LowerCaseFunctionTests.java
@@ -0,0 +1,25 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import java.util.Collections;
+
+import org.eclipse.jet.internal.xpath.functions.extras.Lower_caseFunction;
+
+import junit.framework.TestCase;
+
+public class LowerCaseFunctionTests extends TestCase {
+
+ private String doFunction(String arg) {
+ return (String)new Lower_caseFunction().evaluate(Collections.singletonList(arg));
+ }
+ /*
+ * Test method for 'org.eclipse.jet.internal.xpath.functions.extras.Lower_caseFunction.evaluate(List)'
+ */
+ public void testEvaluate() {
+ String arg = "AbCdEfGhIjKlMnOpQrStUvWxYz";
+
+ final String result = doFunction(arg);
+ assertEquals("abcdefghijklmnopqrstuvwxyz", result);
+
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/LowercaseFirstFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/LowercaseFirstFunctionTests.java
new file mode 100644
index 0000000..c40d086
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/LowercaseFirstFunctionTests.java
@@ -0,0 +1,31 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import java.util.Collections;
+
+import org.eclipse.jet.internal.xpath.functions.extras.LowercaseFirstFunction;
+
+import junit.framework.TestCase;
+
+public class LowercaseFirstFunctionTests extends TestCase {
+
+ private String doFunction(String arg) {
+ return (String) new LowercaseFirstFunction().evaluate(Collections.singletonList(arg));
+ }
+ /*
+ * Test method for 'org.eclipse.jet.internal.xpath.functions.extras.LowercaseFirstFunction.evaluate(List)'
+ */
+ public void testEvaluate() {
+ String arg = "ABC";
+ final String result = doFunction(arg);
+ assertEquals("aBC", result);
+
+ }
+
+ public void testEvaluate_empty() {
+ String arg = "";
+ final String result = doFunction(arg);
+ assertEquals("", result);
+
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/PackageNameFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/PackageNameFunctionTests.java
new file mode 100644
index 0000000..679412f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/PackageNameFunctionTests.java
@@ -0,0 +1,44 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import java.util.Collections;
+
+import org.eclipse.jet.internal.xpath.functions.extras.PackageNameFunction;
+
+import junit.framework.TestCase;
+
+public class PackageNameFunctionTests extends TestCase {
+
+ private String doFunction(String arg) {
+ return (String) new PackageNameFunction().evaluate(Collections.singletonList(arg));
+ }
+ /*
+ * Test method for 'org.eclipse.jet.internal.xpath.functions.extras.PackageNameFunction.evaluate(List)'
+ */
+ public void testEvaluate() {
+
+ String arg = "a.b.c.d.MyClass";
+
+ final String result = doFunction(arg);
+
+ assertEquals("a.b.c.d", result);
+ }
+
+ public void testEvaluate_defaultPackage() {
+
+ String arg = "MyClass";
+
+ final String result = doFunction(arg);
+
+ assertEquals("", result);
+ }
+
+ public void testEvaluate_empty() {
+
+ String arg = "";
+
+ final String result = doFunction(arg);
+
+ assertEquals("", result);
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/RemoveWhitespaceFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/RemoveWhitespaceFunctionTests.java
new file mode 100644
index 0000000..4044d55
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/RemoveWhitespaceFunctionTests.java
@@ -0,0 +1,23 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import java.util.Collections;
+
+import org.eclipse.jet.internal.xpath.functions.extras.RemoveWhitespaceFunction;
+
+import junit.framework.TestCase;
+
+public class RemoveWhitespaceFunctionTests extends TestCase {
+
+ private String doFunction(String arg) {
+ return (String) new RemoveWhitespaceFunction().evaluate(Collections.singletonList(arg));
+ }
+ /*
+ * Test method for 'org.eclipse.jet.internal.xpath.functions.extras.RemoveWhitespaceFunction.evaluate(List)'
+ */
+ public void testEvaluate() {
+ String arg = " This is a long sentence\t that must be\r\n stripped ";
+ final String result = doFunction(arg);
+ assertEquals("Thisisalongsentencethatmustbestripped", result);
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/TrimWhitespaceFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/TrimWhitespaceFunctionTests.java
new file mode 100644
index 0000000..feab2d5
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/TrimWhitespaceFunctionTests.java
@@ -0,0 +1,24 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import java.util.Collections;
+
+import org.eclipse.jet.internal.xpath.functions.extras.TrimWhitespaceFunction;
+
+import junit.framework.TestCase;
+
+public class TrimWhitespaceFunctionTests extends TestCase {
+
+ private String doFunction(String arg) {
+ return (String) new TrimWhitespaceFunction().evaluate(Collections.singletonList(arg));
+ }
+ /*
+ * Test method for 'org.eclipse.jet.internal.xpath.functions.extras.TrimWhitespaceFunction.evaluate(List)'
+ */
+ public void testEvaluate() {
+ String arg = " \t\r\n First word and last word \r\n\t ";
+ final String result = doFunction(arg);
+
+ assertEquals("First word and last word", result);
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/UpperCaseFirstFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/UpperCaseFirstFunctionTests.java
new file mode 100644
index 0000000..cdac3d1
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/UpperCaseFirstFunctionTests.java
@@ -0,0 +1,41 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import java.util.Collections;
+
+import org.eclipse.jet.internal.xpath.functions.extras.UppercaseFirstFunction;
+
+import junit.framework.TestCase;
+
+public class UpperCaseFirstFunctionTests extends TestCase {
+
+ private String doFunction(String arg) {
+ return (String) new UppercaseFirstFunction().evaluate(Collections.singletonList(arg));
+ }
+ /*
+ * Test method for 'org.eclipse.jet.internal.xpath.functions.extras.UppercaseFirstFunction.evaluate(List)'
+ */
+ public void testEvaluate() {
+
+ String arg = "abc";
+ final String result = doFunction(arg);
+
+ assertEquals("Abc", result);
+ }
+
+ public void testEvaluate_single() {
+
+ String arg = "a";
+ final String result = doFunction(arg);
+
+ assertEquals("A", result);
+ }
+
+ public void testEvaluate_empty() {
+
+ String arg = "";
+ final String result = doFunction(arg);
+
+ assertEquals("", result);
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/UpperCaseFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/UpperCaseFunctionTests.java
new file mode 100644
index 0000000..653a6c6
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/UpperCaseFunctionTests.java
@@ -0,0 +1,25 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import java.util.Collections;
+
+import org.eclipse.jet.internal.xpath.functions.extras.Upper_caseFunction;
+
+import junit.framework.TestCase;
+
+public class UpperCaseFunctionTests extends TestCase {
+
+ private String doFunction(String arg) {
+ return (String) new Upper_caseFunction().evaluate(Collections.singletonList(arg));
+ }
+ /*
+ * Test method for 'org.eclipse.jet.internal.xpath.functions.extras.Upper_caseFunction.evaluate(List)'
+ */
+ public void testEvaluate() {
+ String arg = "a b c d e f g";
+ final String result = doFunction(arg);
+
+ assertEquals("A B C D E F G", result);
+
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/XMLEncodeFunctionTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/XMLEncodeFunctionTests.java
new file mode 100644
index 0000000..e0f3e04
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/functions/extras/XMLEncodeFunctionTests.java
@@ -0,0 +1,25 @@
+package org.eclipse.jet.tests.xpath.functions.extras;
+
+import java.util.Collections;
+
+import org.eclipse.jet.internal.xpath.functions.extras.XmlEncodeFunction;
+
+import junit.framework.TestCase;
+
+public class XMLEncodeFunctionTests extends TestCase {
+
+ private String doFunction(String arg) {
+ return (String) new XmlEncodeFunction().evaluate(Collections.singletonList(arg));
+ }
+ /*
+ * Test method for 'org.eclipse.jet.internal.xpath.functions.extras.XmlEncodeFunction.evaluate(List)'
+ */
+ public void testEvaluate() {
+ String arg = "<a b=\"xxx\" c='xxx'/> &";
+ final String result = doFunction(arg);
+
+ assertEquals("&lt;a b=&quot;xxx&quot; c=&apos;xxx&apos;/&gt; &amp;", result);
+
+ }
+
+}