geirm 02/03/17 13:43:43
Modified: xdocs users-guide.xml ant_task_reference.xml
docs users-guide.html ant_task_reference.html
Log:
Added notes on getAppValue()
Revision Changes Path
1.6 +21 -16 jakarta-velocity-dvsl/xdocs/users-guide.xml
Index: users-guide.xml
===================================================================
RCS file: /home/cvs/jakarta-velocity-dvsl/xdocs/users-guide.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- users-guide.xml 14 Mar 2002 16:27:38 -0000 1.5
+++ users-guide.xml 17 Mar 2002 21:43:42 -0000 1.6
@@ -186,7 +186,7 @@
#match("p")
<blockquote>
- $node.copy( $node.children() )
+ $node.copy($node.children())
</blockquote>
#end
]]></source>
@@ -337,9 +337,9 @@
{
List list = new java.util.ArrayList();
- list.add( "red" );
- list.add( "blue" );
- list.add( "green" );
+ list.add("red");
+ list.add("blue");
+ list.add("green");
return list;
}
@@ -383,7 +383,7 @@
</p>
<source>
-#match( <XPath Expression > )
+#match(<XPath Expression >)
< template content >
#end
</source>
@@ -472,13 +472,13 @@
<td></td><td>$node.attrib("name")</td><td>Returns attribute of node if
appropriate. </td>
</tr>
<tr>
- <td></td><td>$node.selectNodes( xpath )</td><td>Returns an iteratable list of
nodes that satisfy the XPath expression</td>
+ <td></td><td>$node.selectNodes(xpathexpr)</td><td>Returns an iteratable list of
nodes that satisfy the XPath expression</td>
</tr>
<tr>
- <td></td><td>$node.selectSingleNode( xpath )</td><td>Returns the first node
that satisfies the XPath expression</td>
+ <td></td><td>$node.selectSingleNode(xpathexpr)</td><td>Returns the first node
that satisfies the XPath expression</td>
</tr>
<tr>
- <td></td><td>$node.get( xpath )</td><td>Returns the first node that satisfies
the XPath expression</td>
+ <td></td><td>$node.get(xpathexpr)</td><td>Returns the first node that satisfies
the XPath expression</td>
</tr>
<tr>
<td></td><td>$node.children()</td><td>Returns a List of all children of this
node</td>
@@ -490,12 +490,12 @@
</tr>
<tr>
<td></td>
- <td>$node.copy( List )</td>
+ <td>$node.copy(List)</td>
<td>Does a 'deep copy' of the specified nodelist to the output.</td>
</tr>
<tr>
<td></td>
- <td>$node.valueOf( xpath )</td>
+ <td>$node.valueOf(xpathexpr)</td>
<td>Returns the result of the specified XPath as a Object</td>
</tr>
@@ -534,24 +534,29 @@
<td></td><td>$context.applyTemplates()</td><td>Applies all templates in the
subtree against the ruleset.</td>
</tr>
<tr>
- <td></td><td>$context.applyTemplates( XPath )</td>
+ <td></td><td>$context.applyTemplates(xpathexpr)</td>
<td>Applies templates to all nodes in the subtree
- that match the given XPath expression. Ex. <code> $context.applyTemplates(
"*|@*" ) </code></td>
+ that match the given XPath expression. Ex. <code>
$context.applyTemplates("*|@*") </code></td>
</tr>
<tr>
- <td></td><td>$context.applyTemplates( Node )</td>
+ <td></td><td>$context.applyTemplates(Node)</td>
<td>Applies templates to the specified node. First match is applied.</td>
</tr>
<tr>
- <td></td><td>$context.applyTemplates( Node, XPath )</td>
+ <td></td><td>$context.applyTemplates(Node, xpathexpr)</td>
<td>Applies the XPath expression to the specified node, and applies
templates to the resulting nodeset.</td>
</tr>
<tr>
- <td></td><td>$context.applyTemplates( Node, XPath )</td>
+ <td></td><td>$context.applyTemplates(Node, xpathexpr)</td>
<td>Applies the XPath expression to the specified node, and applies
templates to the resulting nodeset.</td>
</tr>
+ <tr>
+ <td></td><td>$context.getAppValue(Object key)</td>
+ <td>Returns the application value for this key. For example, Ant will
+ place the current input file name under the key "infilename".</td>
+ </tr>
</table>
@@ -570,7 +575,7 @@
</p>
<source><![CDATA[
-#match( "/" )$context.applyTemplates()#end
+#match("/")$context.applyTemplates()#end
#match("*")$context.applyTemplates()#end
]]></source>
1.4 +22 -0 jakarta-velocity-dvsl/xdocs/ant_task_reference.xml
Index: ant_task_reference.xml
===================================================================
RCS file: /home/cvs/jakarta-velocity-dvsl/xdocs/ant_task_reference.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ant_task_reference.xml 22 Feb 2002 06:05:43 -0000 1.3
+++ ant_task_reference.xml 17 Mar 2002 21:43:42 -0000 1.4
@@ -285,6 +285,28 @@
</section>
+ <section name="Application Values">
+
+ <p>
+ DVSL as of v0.43, supports applications making application specific values
+ available via the $context API. (Please see DVSL Users Guide.) When using
+ Ant and DVSL, the following values are accessable :
+ </p>
+
+ <ul>
+ <li>
+ <b>infilename</b> : the current input file name, sans path. Ex. 'input.xml'.
+ This can be accessed via <code>$context.getAppValue('infilename')</code>
+ </li>
+ <li>
+ <b>outfilename</b> : the current output file name, sans path.
+ Ex. 'output.html'.
+ This can be accessed via <code>$context.getAppValue('outfilename')</code>
+ </li>
+ </ul>
+
+ </section>
+
<section name="Declaring the DVSL Task in the build file">
<p>This task as with any other task not shipped with Ant must be defined
1.6 +35 -16 jakarta-velocity-dvsl/docs/users-guide.html
Index: users-guide.html
===================================================================
RCS file: /home/cvs/jakarta-velocity-dvsl/docs/users-guide.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- users-guide.html 14 Mar 2002 16:27:38 -0000 1.5
+++ users-guide.html 17 Mar 2002 21:43:42 -0000 1.6
@@ -432,7 +432,7 @@
#match("p")
<blockquote>
- $node.copy( $node.children() )
+ $node.copy($node.children())
</blockquote>
#end
</pre></font>
@@ -788,9 +788,9 @@
{
List list = new java.util.ArrayList();
- list.add( "red" );
- list.add( "blue" );
- list.add( "green" );
+ list.add("red");
+ list.add("blue");
+ list.add("green");
return list;
}
@@ -912,7 +912,7 @@
</td>
<td bgcolor="#ffffff" height="1">
<font size="+0"><pre>
-#match( <XPath Expression > )
+#match(<XPath Expression >)
< template content >
#end
</pre></font>
@@ -1162,7 +1162,7 @@
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- $node.selectNodes( xpath )
+ $node.selectNodes(xpathexpr)
</font>
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
@@ -1180,7 +1180,7 @@
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- $node.selectSingleNode( xpath )
+ $node.selectSingleNode(xpathexpr)
</font>
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
@@ -1198,7 +1198,7 @@
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- $node.get( xpath )
+ $node.get(xpathexpr)
</font>
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
@@ -1252,7 +1252,7 @@
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- $node.copy( List )
+ $node.copy(List)
</font>
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
@@ -1270,7 +1270,7 @@
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- $node.valueOf( xpath )
+ $node.valueOf(xpathexpr)
</font>
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
@@ -1400,13 +1400,13 @@
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- $context.applyTemplates( XPath )
+ $context.applyTemplates(xpathexpr)
</font>
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
Applies templates to all nodes in the subtree
- that match the given XPath expression. Ex. <code> $context.applyTemplates(
"*|@*" ) </code>
+ that match the given XPath expression. Ex. <code>
$context.applyTemplates("*|@*") </code>
</font>
</td>
@@ -1419,7 +1419,7 @@
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- $context.applyTemplates( Node )
+ $context.applyTemplates(Node)
</font>
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
@@ -1437,7 +1437,7 @@
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- $context.applyTemplates( Node, XPath )
+ $context.applyTemplates(Node, xpathexpr)
</font>
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
@@ -1456,7 +1456,7 @@
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- $context.applyTemplates( Node, XPath )
+ $context.applyTemplates(Node, xpathexpr)
</font>
</td>
<td bgcolor="#a0ddf0" valign="top" align="left">
@@ -1467,6 +1467,25 @@
</td>
</tr>
+<tr>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+
+ </font>
+</td>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ $context.getAppValue(Object key)
+ </font>
+</td>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ Returns the application value for this key. For example, Ant will
+ place the current input file name under the key "infilename".
+ </font>
+</td>
+
+</tr>
</table>
@@ -1510,7 +1529,7 @@
</td>
<td bgcolor="#ffffff" height="1">
<font size="+0"><pre>
-#match( "/" )$context.applyTemplates()#end
+#match("/")$context.applyTemplates()#end
#match("*")$context.applyTemplates()#end
</pre></font>
1.3 +152 -3 jakarta-velocity-dvsl/docs/ant_task_reference.html
Index: ant_task_reference.html
===================================================================
RCS file: /home/cvs/jakarta-velocity-dvsl/docs/ant_task_reference.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ant_task_reference.html 20 Feb 2002 05:33:02 -0000 1.2
+++ ant_task_reference.html 17 Mar 2002 21:43:42 -0000 1.3
@@ -138,6 +138,85 @@
DVSL supports the use of a <tool> element which is used to pass values
to the DVSL toolbox configuration.
</p>
+<p>All Velocity messages are routed through Ant's logging system but
+ will only be output if their level exceeds that of Ant's current logging
+ level. By default, this means Velocity informational messages are
+ suppressed while warning and error messages are output. The following
+ table shows the mapping between Ant logging options and the corresponding
+ levels of Velocity messages which are output.
+ </p>
+<table>
+<tr>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ <b>Ant Logging Option</b>
+ </font>
+</td>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ <b>Velocity Messages Output</b>
+ </font>
+</td>
+
+</tr>
+<tr>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ <code>-quiet</code>
+ </font>
+</td>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ errors
+ </font>
+</td>
+
+</tr>
+<tr>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ <code>no option</code>
+ </font>
+</td>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ errors, warnings
+ </font>
+</td>
+
+</tr>
+<tr>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ <code>-verbose</code>
+ </font>
+</td>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ errors, warnings, informational
+ </font>
+</td>
+
+</tr>
+<tr>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ <code>-debug</code>
+ </font>
+</td>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ errors, warnings, informational, debug
+ </font>
+</td>
+
+</tr>
+
+</table>
+<p>If the <code>logfile</code> attribute is specified to this task,
+ all Velocity messages are written to the specified log file without
+ regard to any logging option specified to Ant.
+ </p>
</blockquote></td></tr>
@@ -440,6 +519,46 @@
<tr>
<td bgcolor="#a0ddf0" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ outputencoding
+ </font>
+</td>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ encoding to be used for output files. If not
+ specified, the default is UTF-8.
+ </font>
+</td>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ No
+ </font>
+</td>
+
+</tr>
+<tr>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ logfile
+ </font>
+</td>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ log file for Velocity messages. The default is to
+ log through Ant's logging system but limit output based on Ant's
+ logging level. Specifying this attribute causes all Velocity
+ messages to be sent to the specified file instead.
+ </font>
+</td>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ No
+ </font>
+</td>
+
+</tr>
+<tr>
+<td bgcolor="#a0ddf0" valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
toolboxfile
</font>
</td>
@@ -685,6 +804,36 @@
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica.sanserif">
+ <a name="Application Values">
+ <strong>Application Values</strong></a></font>
+ </td></tr>
+
+ <tr><td><blockquote>
+ <p>
+ DVSL as of v0.43, supports applications making application specific values
+ available via the $context API. (Please see DVSL Users Guide.) When using
+ Ant and DVSL, the following values are accessable :
+ </p>
+<ul>
+ <li>
+ <b>infilename</b> : the current input file name, sans path. Ex. 'input.xml'.
+ This can be accessed via <code>$context.getAppValue('infilename')</code>
+ </li>
+ <li>
+ <b>outfilename</b> : the current output file name, sans path.
+ Ex. 'output.html'.
+ This can be accessed via <code>$context.getAppValue('outfilename')</code>
+ </li>
+ </ul>
+
+ </blockquote></td></tr>
+
+ </table>
+
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+
+ <tr><td bgcolor="#525D76">
+ <font color="#ffffff" face="arial,helvetica.sanserif">
<a name="Declaring the DVSL Task in the build file">
<strong>Declaring the DVSL Task in the build file</strong></a></font>
</td></tr>
@@ -715,7 +864,7 @@
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0"
border="0"/>
</td>
<td bgcolor="#ffffff" height="1">
- <font size="0"><pre>
+ <font size="+0"><pre>
<taskdef name="dvsl"
classname="org.apache.tools.dvsl.DVSLTask">
<classpath>
<fileset dir="${lib.dir}">
@@ -779,7 +928,7 @@
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0"
border="0"/>
</td>
<td bgcolor="#ffffff" height="1">
- <font size="0"><pre>
+ <font size="+0"><pre>
<dvsl basedir="doc" destdir="build/doc"
extension=".html" style="style/apache.dvsl" />
</pre></font>
@@ -822,7 +971,7 @@
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0"
border="0"/>
</td>
<td bgcolor="#ffffff" height="1">
- <font size="0"><pre>
+ <font size="+0"><pre>
<dvsl basedir="doc" destdir="build/doc"
extension=".html" style="style/apache.xsl"
classpath=".">
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>