geirm       02/02/06 21:39:27

  Modified:    xdocs    users-guide.xml
               docs     users-guide.html
  Log:
  Documenting (roughly) the recent additions to using DVSL via Ant
  
  Revision  Changes    Path
  1.3       +68 -2     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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- users-guide.xml   11 Jan 2002 01:39:57 -0000      1.2
  +++ users-guide.xml   7 Feb 2002 05:39:27 -0000       1.3
  @@ -476,11 +476,21 @@
       <td></td><td>$node.children()</td><td>Returns a List of all children of this 
node</td>
     </tr>
     <tr>
  -    <td></td><td>$node.copy()</td><td>Does a 'deep copy' of this node's subtree to 
the output</td>
  +    <td></td>
  +    <td>$node.copy()</td>
  +    <td>Does a 'deep copy' of this node's subtree to the output</td>
     </tr>
     <tr>
  -    <td></td><td>$node.copy( List )</td><td>Does a 'deep copy' of the specified 
nodelist to the output.</td>
  +    <td></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>Returns the result of the specified XPath as a Object</td>
  +  </tr>
  +
     </table>
   
     <p>
  @@ -536,6 +546,62 @@
     </tr>
   
     </table>
  +
  +  </section>
  +
  +  <section name="Using DVSL via Ant">
  +
  +  <p>
  +  Here are some important notes about using DVSL with Ant.  These will be
  +  revised into a more coherant section on using with Ant:
  +  </p>
  +
  +  <strong>Configuring the Velocity Engine</strong>
  +
  +  <p>
  +  It is now possible to configure the Velocity Engine when using DVSL
  +  with Ant (and from your code, of course).  This feature enables you to
  +  set template paths, VelociMacro libraries, loggers, etc.
  +  </p>
  +
  +  <p>
  +  To use, you need to make a public class that implements
  +  <code>java.util.Map</code>.  Then place this class in the classpath, and
  +  set the property 'velocityConfigClass'
  +  to the name of your class :
  +  </p>
  +
  +   <source><![CDATA[
  +     <dvsl
  +           basedir="${docs.src}"
  +           destdir="${docs.dest}/"
  +           extension=".html"
  +           style="${docs.src}/site.dvsl"
  +           excludes="**/project.xml"
  +           toolbox="toolbox.props"
  +           includes="**/*.xml"
  +
  +          velocityConfigClass="ConfigVel"
  +
  +      />
  +
  +  ]]></source>
  +
  +  <p>
  +  Please see <code>examples/simple</code> for an example of this
  +  technique.
  +  </p>
  +
  +  <strong>Input and Output Filename</strong>
  +   <p>
  +     You can now access the name of the input file and the output file
  +     inside the stylesheet.  They can be accessed as
  +   </p>
  +   <source><![CDATA[
  +       $inputfilename
  +       $outputfilename
  +   ]]>
  +   </source>
   
     </section>
   
  
  
  
  1.3       +214 -37   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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- users-guide.html  11 Jan 2002 01:39:57 -0000      1.2
  +++ users-guide.html  7 Feb 2002 05:39:27 -0000       1.3
  @@ -165,10 +165,11 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   $ cd jakarta-velocity-dvsl
   $ ant jar
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -195,7 +196,7 @@
       DVSL is able to be used without any programming.
       </p>
   <p>
  -    The first way is via commandline, where you can use it to transform a single 
file, or as a filter.
  +    The first way is via command line, where you can use it to transform a single 
file, or as a filter.
       The usage is :
       </p>
   <code>
  @@ -227,11 +228,12 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   java org.apache.tools.dvsl.DVSL -STYLE src/stylesheets/site.dvsl -IN 
xdocs/index.xml &gt; out.stuff
   java org.apache.tools.dvsl.DVSL -STYLE src/stylesheets/site.dvsl -OUT out.html &lt; 
xdocs/index.html
   java org.apache.tools.dvsl.DVSL -STYLE src/stylesheets/site.dvsl &lt; 
xdocs/index.xml
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -272,6 +274,7 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   &lt;target name=&quot;docs&quot;&gt;
   
      &lt;taskdef name=&quot;dvsl&quot; 
classname=&quot;org.apache.tools.dvsl.DVSLTask&quot;&gt;
  @@ -291,8 +294,8 @@
      includes=&quot;**/*.xml&quot;
    /&gt;
   &lt;/target&gt;
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -353,6 +356,7 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   
   &lt;?xml version=&quot;1.0&quot;?&gt;
   
  @@ -368,8 +372,8 @@
           &lt;/p&gt;
       &lt;/section&gt;
   &lt;/document&gt;
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -410,6 +414,7 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   #match(&quot;document&quot;)
   &lt;html&gt;
     &lt;body&gt;
  @@ -429,8 +434,8 @@
     $node.copy( $node.children() )
     &lt;/blockquote&gt;
   #end
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -471,6 +476,7 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   &lt;html&gt;
     &lt;body&gt;
       &lt;hr&gt;
  @@ -491,8 +497,8 @@
   
     &lt;/body&gt;
   &lt;/html&gt;
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -542,12 +548,13 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   toolbox.contextname = toolbox
   toolbox.tool.footool = Footool
   toolbox.string.mystring = Hello there!
   toolbox.integer.myint = 7
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -613,6 +620,7 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   &lt;dvsl
       basedir=&quot;${docs.src}&quot;
       destdir=&quot;${docs.dest}/&quot;
  @@ -622,8 +630,8 @@
       toolbox=&quot;toolbox.props&quot;
       includes=&quot;**/*.xml
   /&gt;
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -664,6 +672,7 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   #match(&quot;document&quot;)
   
       Hello from the document node.
  @@ -678,8 +687,8 @@
           Item $velocityCount : $data
       #end
   #end
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -720,6 +729,7 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   &lt;?xml version=&quot;1.0&quot;?&gt;
   
   &lt;document value=&quot;5&quot;&gt;
  @@ -727,8 +737,8 @@
      Data in &amp;lt;document&amp;gt; node
   
   &lt;/document&gt;
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -769,6 +779,7 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   import java.util.List;
   
   public class Footool
  @@ -789,8 +800,8 @@
           return list;
       }
   }
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -831,6 +842,7 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   Hello from the document node.
   
   From the toolbox :
  @@ -842,8 +854,8 @@
       Item 1 : red
       Item 2 : blue
       Item 3 : green
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -906,11 +918,12 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   #match( &lt;XPath Expression &gt; )
       &lt; template content &gt;
   #end
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -972,6 +985,7 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   &lt;?xml version=&quot;1.0&quot;?&gt;
   &lt;document&gt;
     &lt;section name=&quot;first&quot;&gt;
  @@ -983,8 +997,8 @@
      &lt;/p&gt;
     &lt;/section&gt;
   &lt;/document&gt;
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -1034,9 +1048,10 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   $node.section.children()
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -1322,6 +1337,30 @@
   </td>
   
   </tr>
  +<tr>
  +
  +
  +<td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
  +    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  +       
  +    </font>
  +</td>
  +
  +
  +<td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
  +    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  +       $node.valueOf( xpath )
  +    </font>
  +</td>
  +
  +
  +<td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
  +    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  +       Returns the result of the specified XPath as a Object
  +    </font>
  +</td>
  +
  +</tr>
   
   </table>
   <p>
  @@ -1352,9 +1391,10 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   $attrib.name
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -1562,6 +1602,141 @@
   
         <tr><td bgcolor="#525D76">
             <font color="#ffffff" face="arial,helvetica.sanserif">
  +          <a name="Using DVSL via Ant">
  +          <strong>Using DVSL via Ant</strong></a></font>
  +      </td></tr>
  +
  +      <tr><td><blockquote>
  +        <p>
  +  Here are some important notes about using DVSL with Ant.  These will be
  +  revised into a more coherant section on using with Ant:
  +  </p>
  +<strong>Configuring the Velocity Engine</strong>
  +<p>
  +  It is now possible to configure the Velocity Engine when using DVSL
  +  with Ant (and from your code, of course).  This feature enables you to
  +  set template paths, VelociMacro libraries, loggers, etc.
  +  </p>
  +<p>
  +  To use, you need to make a public class that implements
  +  <code>java.util.Map</code>.  Then place this class in the classpath, and
  +  set the property 'velocityConfigClass'
  +  to the name of your class :
  +  </p>
  +
  +    <div align="left">
  +      <table cellspacing="4" cellpadding="0" border="0">
  +        <tr>
  +          <td bgcolor="#023264" width="1" height="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +          <td bgcolor="#023264" height="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +          <td bgcolor="#023264" width="1" height="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +        </tr>
  +        <tr>
  +          <td bgcolor="#023264" width="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +          <td bgcolor="#ffffff" height="1">
  +          <pre>
  +          
  +     &lt;dvsl
  +           basedir=&quot;${docs.src}&quot;
  +           destdir=&quot;${docs.dest}/&quot;
  +           extension=&quot;.html&quot;
  +           style=&quot;${docs.src}/site.dvsl&quot;
  +           excludes=&quot;**/project.xml&quot;
  +           toolbox=&quot;toolbox.props&quot;
  +           includes=&quot;**/*.xml&quot;
  +
  +          velocityConfigClass=&quot;ConfigVel&quot;
  +
  +      /&gt;
  +
  +  
  +          </pre></td>
  +          <td bgcolor="#023264" width="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +        </tr>
  +        <tr>
  +          <td bgcolor="#023264" width="1" height="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +          <td bgcolor="#023264" height="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +          <td bgcolor="#023264" width="1" height="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +        </tr>
  +      </table>
  +    </div>
  +<p>
  +  Please see <code>examples/simple</code> for an example of this
  +  technique.
  +  </p>
  +<strong>Input and Output Filename</strong>
  +<p>
  +     You can now access the name of the input file and the output file
  +     inside the stylesheet.  They can be accessed as
  +   </p>
  +
  +    <div align="left">
  +      <table cellspacing="4" cellpadding="0" border="0">
  +        <tr>
  +          <td bgcolor="#023264" width="1" height="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +          <td bgcolor="#023264" height="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +          <td bgcolor="#023264" width="1" height="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +        </tr>
  +        <tr>
  +          <td bgcolor="#023264" width="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +          <td bgcolor="#ffffff" height="1">
  +          <pre>
  +          
  +       $inputfilename
  +       $outputfilename
  +   
  +   
  +          </pre></td>
  +          <td bgcolor="#023264" width="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +        </tr>
  +        <tr>
  +          <td bgcolor="#023264" width="1" height="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +          <td bgcolor="#023264" height="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +          <td bgcolor="#023264" width="1" height="1">
  +            <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
  +          </td>
  +        </tr>
  +      </table>
  +    </div>
  +
  +      </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="Default Template Rules">
             <strong>Default Template Rules</strong></a></font>
         </td></tr>
  @@ -1594,11 +1769,12 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   #match( &quot;/&quot; )$context.applyTemplates()#end
   
   #match(&quot;*&quot;)$context.applyTemplates()#end
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  @@ -1652,11 +1828,12 @@
             </td>
             <td bgcolor="#ffffff" height="1">
             <pre>
  +          
   #match(&quot;text()&quot;)$node.value()#end
   
   #match(&quot;@*&quot;)$node.value()#end
  -</pre>
  -          </td>
  +
  +          </pre></td>
             <td bgcolor="#023264" width="1">
               <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" 
border="0"/>
             </td>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to