You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by nb...@apache.org on 2008/06/25 00:47:16 UTC
svn commit: r671375 - in /velocity/tools/trunk/xdocs: generic.xml site.dvsl
struts.xml view.xml
Author: nbubna
Date: Tue Jun 24 15:47:16 2008
New Revision: 671375
URL: http://svn.apache.org/viewvc?rev=671375&view=rev
Log:
make it easier to create javadoc links in documents
Modified:
velocity/tools/trunk/xdocs/generic.xml
velocity/tools/trunk/xdocs/site.dvsl
velocity/tools/trunk/xdocs/struts.xml
velocity/tools/trunk/xdocs/view.xml
Modified: velocity/tools/trunk/xdocs/generic.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/xdocs/generic.xml?rev=671375&r1=671374&r2=671375&view=diff
==============================================================================
--- velocity/tools/trunk/xdocs/generic.xml (original)
+++ velocity/tools/trunk/xdocs/generic.xml Tue Jun 24 15:47:16 2008
@@ -67,50 +67,50 @@
</section>
<section name="Tools">
<ul>
- <li><a href="javadoc/org/apache/velocity/tools/generic/AlternatorTool.html">AlternatorTool</a>
- - For creating <a href="javadoc/org/apache/velocity/tools/generic/Alternator.html">Alternator</a>s
+ <li><javadoc package="generic" name="AlternatorTool"/>
+ - For creating <javadoc package="generic" name="Alternator"/>s
to easily alternate over a set of values.</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/ClassTool.html">ClassTool</a>
+ <li><javadoc package="generic" name="ClassTool"/>
- For simplifying reflective lookup of information about
Classes and their fields, methods and constructors.</li>
- <li><a href="javadoc/org/apache/velocity/tools/view/ContextTool.html">ContextTool</a>
+ <li><javadoc package="generic" name="ContextTool"/>
- For convenient access to Context data and meta-data.</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/ConversionTool.html">ConversionTool</a>
+ <li><javadoc package="generic" name="ConversionTool"/>
- For converting String values to richer object types.</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/DateTool.html">DateTool</a>
+ <li><javadoc package="generic" name="DateTool"/>
&
- <a href="javadoc/org/apache/velocity/tools/generic/ComparisonDateTool.html">ComparisonDateTool</a>
+ <javadoc package="generic" name="ComparisonDateTool"/>
- For manipulating, formatting, and comparing dates.</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/DisplayTool.html">DisplayTool</a>
+ <li><javadoc package="generic" name="DisplayTool"/>
- For controlling display of references (e.g. truncating values,
"pretty printing" lists, and displaying alternates when a reference is null).</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/EscapeTool.html">EscapeTool</a>
+ <li><javadoc package="generic" name="EscapeTool"/>
- For common escaping needs in Velocity templates (e.g. escaping
html, xml, javascript etc.)</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/FieldTool.html">FieldTool</a>
+ <li><javadoc package="generic" name="FieldTool"/>
- For (easy) access to static fields in a class, such as string
constants.</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/LoopTool.html">LoopTool</a>
+ <li><javadoc package="generic" name="LoopTool"/>
- A convenience tool to use with #foreach loops. It wraps a list
with a custom iterator to provide greater control, allowing loops
to end early, skip ahead and more.</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/LinkTool.html">LinkTool</a>
+ <li><javadoc package="generic" name="LinkTool"/>
- For creating and manipulating URIs and URLs. The API for this tool is
designed to closely resemble that of the VelocityView tool of the same name.</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/ListTool.html">ListTool</a>
+ <li><javadoc package="generic" name="ListTool"/>
- For working with arrays and lists, treats both transparently
the same.</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/MathTool.html">MathTool</a>
+ <li><javadoc package="generic" name="MathTool"/>
- For performing math functions.</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/NumberTool.html">NumberTool</a>
+ <li><javadoc package="generic" name="NumberTool"/>
- For formatting and converting numbers.</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/RenderTool.html">RenderTool</a>
+ <li><javadoc package="generic" name="RenderTool"/>
- To evaluate and render arbitrary strings of VTL, including
recursive rendering.</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/ResourceTool.html">ResourceTool</a>
+ <li><javadoc package="generic" name="ResourceTool"/>
- For simplified access to ResourceBundles for
internationalization or other dynamic content needs.</li>
- <li><a href="javadoc/org/apache/velocity/tools/generic/SortTool.html">SortTool</a>
+ <li><javadoc package="generic" name="SortTool"/>
- Used to sort collections (or arrays, iterators, etc) on
any arbitary set of properties exposed by the objects contained
within the collection.</li>
Modified: velocity/tools/trunk/xdocs/site.dvsl
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/xdocs/site.dvsl?rev=671375&r1=671374&r2=671375&view=diff
==============================================================================
--- velocity/tools/trunk/xdocs/site.dvsl (original)
+++ velocity/tools/trunk/xdocs/site.dvsl Tue Jun 24 15:47:16 2008
@@ -283,8 +283,8 @@
*#
#match( "todo" )
<p class="note">
- This is still unfinished.
- <a href="index.html#Contribution">Help is welcome!</a><br>
+ This is unfinished.
+ <a href="index.html#Contribution">You can help fix that!</a><br>
#set( $todo = "$!node.copy()" )
#if( $todo != '<todo/>' )
TODO: $todo
@@ -292,7 +292,6 @@
</p>
#end
-
#*
* process a 'sourcecode' block.
*#
@@ -326,7 +325,50 @@
</th>
#end
-#match("*")
-$node.copy()
+#*
+ * process a javadoc element
+ *#
+#match( 'javadoc' )##
+#if( $attrib.package )
+ #set( $package = $attrib.package )
+ #if( !$package.startsWith('org.apache.velocity.tools') )
+ #set( $package = "org.apache.velocity.tools.$package" )
+ #end
+#else
+ #set( $package = 'org.apache.velocity.tools' )
+#end
+#set( $href = "javadoc/$package.replace('.','/')/${attrib.name}.html" )
+#set( $content = "$!node.value()" )
+#if( $content == '' )
+ #if( $attrib.full )
+ #set( $content = $package + '.' + $attrib.name )
+ #else
+ #set( $content = $attrib.name )
+ #end
+#end
+<a href="$href">$content</a>
+#end
+
+#*
+ * macro to navigate document and replace <javadoc> tags
+ *#
+#macro( digFor $name $tag )
+#set( $kids = $tag.children() )
+#if( "$!tag.name()" == $name )
+ $context.applyTemplates($tag)
+#elseif( $kids.isEmpty() )
+ $tag.copy()
+#elseif( $tag.selectNodes("$name|*//$name").isEmpty() )
+ $tag.copy()
+#else
+ <$tag.name()#foreach( $key in $attrib.keySet() ) $key="$!attrib.get($key)"#end>
+ #foreach( $kid in $kids )
+ #digFor( $name $kid )
+ #end
+ </$tag.name()>
+#end
#end
+#match("*")
+#digFor( 'javadoc' $node )
+#end
Modified: velocity/tools/trunk/xdocs/struts.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/xdocs/struts.xml?rev=671375&r1=671374&r2=671375&view=diff
==============================================================================
--- velocity/tools/trunk/xdocs/struts.xml (original)
+++ velocity/tools/trunk/xdocs/struts.xml Tue Jun 24 15:47:16 2008
@@ -99,7 +99,7 @@
</p>
<ul>
<li>
- <a href="javadoc/org/apache/velocity/tools/struts/ActionMessagesTool.html">ActionMessagesTool</a>
+ <javadoc package="struts" name="ActionMessagesTool"/>
- For accessing/displaying Struts action messages.
</li>
<li>
@@ -107,41 +107,41 @@
- For accessing/displaying Struts error messages.
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/struts/FormTool.html">FormTool</a>
+ <javadoc package="struts" name="FormTool"/>
- For working with HTML forms in Struts apps.
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/struts/MessageResourcesTool.html">MessageResourcesTool</a>
+ <javadoc package="struts" name="MessageResourcesTool"/>
- Abstract view tool that provides access to Struts
message resources.
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/struts/MessageTool.html">MessageTool</a>
+ <javadoc package="struts" name="MessageTool"/>
- Provides methods to render Struts application resources
(for i18n and other textual content access).
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/struts/SecureLinkTool.html">SecureLinkTool</a>
+ <javadoc package="struts" name="SecureLinkTool"/>
- For using Struts SSL Extensions. It has the same
interface as
- <a href="javadoc/org/apache/velocity/tools/struts/StrutsLinkTool.html">StrutsLinkTool</a>
+ <javadoc package="struts" name="StrutsLinkTool"/>
and can function as a substitute if Struts 1.x
and SSL Ext are installed.
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/struts/StrutsLinkTool.html">StrutsLinkTool</a>
+ <javadoc package="struts" name="StrutsLinkTool"/>
- Subclass of
- <a href="javadoc/org/apache/velocity/tools/view/LinkTool.html">LinkTool</a>
+ <javadoc package="view" name="LinkTool"/>
for creating URI links in Struts by adding support
for Struts actions and forwards.
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/struts/TilesTool.html">TilesTool</a>
+ <javadoc package="struts" name="TilesTool"/>
- For using Struts-Tiles (not for Tiles 2!)
in Velocity.
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/struts/ValidatorTool.html">ValidatorTool</a>
+ <javadoc package="struts" name="ValidatorTool"/>
- Uses Struts-Validator to produce client side
javascript validation for your forms.
</li>
Modified: velocity/tools/trunk/xdocs/view.xml
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/xdocs/view.xml?rev=671375&r1=671374&r2=671375&view=diff
==============================================================================
--- velocity/tools/trunk/xdocs/view.xml (original)
+++ velocity/tools/trunk/xdocs/view.xml Tue Jun 24 15:47:16 2008
@@ -76,7 +76,7 @@
<section name="VelocityView Object">
<p>
- The <a href="javadoc/org/apache/velocity/tools/view/VelocityView.html">VelocityView</a>
+ The <javadoc package="view" name="VelocityView"/>
object forms the core of the VelocityView infrastructure. In particular,
it serves as the base class for the following:
</p>
@@ -84,7 +84,7 @@
<subsection name="VelocityViewServlet" href="view.servlet.html">
<p>
The
- <a href="javadoc/org/apache/velocity/tools/view/VelocityViewServlet.html">VelocityViewServlet</a>
+ <javadoc package="view" name="VelocityViewServlet"/>
class is a standalone servlet that renders Velocity
templates. It can be invoked directly from web client's
requests, or via servlet forwarding similar to how JSP files
@@ -139,50 +139,40 @@
</p>
<ul>
<li>
- <a href="javadoc/org/apache/velocity/tools/view/AbstractSearchTool.html">AbstractSearchTool</a>
+ <javadoc package="view" name="AbstractSearchTool"/>
- For doing "searching" and robust pagination of search
results. Requires you to create a subclass.
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/view/BrowserTool.html">BrowserTool</a>
+ <javadoc package="view" name="BrowserTool"/>
- For identifying the browser and features thereof requesting
the template.
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/view/CookieTool.html">CookieTool</a>
+ <javadoc package="view" name="CookieTool"/>
- For convenient cookie access and creation.
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/view/ImportTool.html">ImportTool</a>
+ <javadoc package="view" name="ImportTool"/>
- For pulling down textual content from a URL.
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/view/LinkTool.html">LinkTool</a>
+ <javadoc package="view" name="LinkTool"/>
- For easy building of URLs (both relative or absolute).
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/view/PagerTool.html">PagerTool</a>
+ <javadoc package="view" name="PagerTool"/>
- For doing request-based pagination of items in an
arbitrary list.
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/view/ParameterTool.html">ParameterTool</a>
+ <javadoc package="view" name="ParameterTool"/>
- For easy retrieval and parsing of ServletRequest parameters.
</li>
<li>
- <a href="javadoc/org/apache/velocity/tools/view/ViewContextTool.html">ViewContextTool</a>
+ <javadoc package="view" name="ViewContextTool"/>
- For convenient access to ViewContext data and meta-data.
</li>
- <li>
- <a href="javadoc/org/apache/velocity/tools/view/ViewRenderTool.html">ViewRenderTool</a>
- - To evaluate and render arbitrary strings of VTL,
- including recursive rendering.
- </li>
- <li>
- <a href="javadoc/org/apache/velocity/tools/view/ViewResourceTool.html">ViewResourceTool</a>
- - For simplified access to ResourceBundles for
- internationalization or other dynamic content needs.
- </li>
</ul>
</section>