You are viewing a plain text version of this content. The canonical link for it is here.
Posted to doxia-commits@maven.apache.org by vs...@apache.org on 2007/07/31 14:41:41 UTC

svn commit: r561313 - in /maven/doxia/site/src/site/apt: developers/index.apt macros/index.apt

Author: vsiveton
Date: Tue Jul 31 05:41:35 2007
New Revision: 561313

URL: http://svn.apache.org/viewvc?view=rev&rev=561313
Log:
DOXIA-130: Macro renaming

o updated doc

Modified:
    maven/doxia/site/src/site/apt/developers/index.apt
    maven/doxia/site/src/site/apt/macros/index.apt

Modified: maven/doxia/site/src/site/apt/developers/index.apt
URL: http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/developers/index.apt?view=diff&rev=561313&r1=561312&r2=561313
==============================================================================
--- maven/doxia/site/src/site/apt/developers/index.apt (original)
+++ maven/doxia/site/src/site/apt/developers/index.apt Tue Jul 31 05:41:35 2007
@@ -155,7 +155,7 @@
     public void execute( Sink sink, MacroRequest request )
         throws MacroExecutionException
     {
-        String paramValue = (String) request.getParameter( "param" );
+        String myValue = (String) request.getParameter( "myParam" );
 ...
     }
 ...
@@ -167,13 +167,15 @@
   * APT
 
 -----
-%{my|param=value}
+%{my|myParam=myValue} <!-- my is the macro name defined by role-hint -->
 -----
 
   * XDoc
 
 -----
-<macro name="my" param="value" />
+<macro name="my"> <!-- my is the required macro name defined by role-hint -->
+  <param name="myParam" value="myValue"/>
+</macro>
 -----
 
   []

Modified: maven/doxia/site/src/site/apt/macros/index.apt
URL: http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/macros/index.apt?view=diff&rev=561313&r1=561312&r2=561313
==============================================================================
--- maven/doxia/site/src/site/apt/macros/index.apt (original)
+++ maven/doxia/site/src/site/apt/macros/index.apt Tue Jul 31 05:41:35 2007
@@ -36,13 +36,22 @@
  For instance, in an APT file, you could write:
 
 -----
-%{echo|param=value|param2=value2}
+%{echo|param1=value1|param2=value2}
+-----
+
+ Similarly, it will be for xdoc file:
+
+-----
+<macro name="echo">
+  <param name="param1" value="value1"/>
+  <param name="param2" value="value2"/>
+</macro>
 -----
 
   and it will output
 
 -----
-  param ---> value
+  param1 ---> value1
   param2 ---> value2
 -----
 
@@ -55,6 +64,15 @@
 %{snippet|id=myid|url=http://myserver/path/to/file.txt}
 -----
 
+ In a xdoc file, it will be:
+
+-----
+<macro name="snippet">
+  <param name="id" value="myid"/>
+  <param name="url" value="http://myserver/path/to/file.txt"/>
+</macro>
+-----
+
  If you need to include only a part of a file, you could add a start and end snippets.
 
   * Start and end snippets in a Java file
@@ -93,7 +111,7 @@
 *-----------+--------------+
 || Parameter || Description  |
 *-----------+--------------+
-| id        | The id of the snippet.
+| id        | The id of the snippet (required).
 *-----------+--------------+
 | url       | The path of the URL to include.
 *-----------+--------------+
@@ -109,6 +127,16 @@
 %{toc|section=2|fromDepth=0|toDepth=4}
 -----
 
+ In a xdoc file, it will be:
+
+-----
+<macro name="toc">
+  <param name="section" value="2"/>
+  <param name="fromDepth" value="0"/>
+  <param name="toDepth" value="4"/>
+</macro>
+-----
+
 *-----------+--------------+
 || Parameter || Description  |
 *-----------+--------------+
@@ -126,6 +154,17 @@
 
 -----
 %{swf|src=swf/myfile.swf|id=MyMovie|width=600|height=200}
+-----
+
+ In a xdoc file, it will be:
+
+-----
+<macro name="swf">
+  <param name="src" value="swf/myfile.swf"/>
+  <param name="id" value="MyMovie"/>
+  <param name="width" value="600"/>
+  <param name="height" value="200"/>
+</macro>
 -----
 
 *-----------+--------------+