Author: ltheussl
Date: Sun May 31 19:45:32 2009
New Revision: 780498
URL: http://svn.apache.org/viewvc?rev=780498&view=rev
Log:
adjust the site to build with doxia 1.1
Modified:
maven/doxia/site/src/site/apt/developers/index.apt
maven/doxia/site/src/site/apt/issues/index.apt
maven/doxia/site/src/site/apt/macros/index.apt
maven/doxia/site/src/site/apt/macros/swf-macro.apt
maven/doxia/site/src/site/apt/modules/index.apt
maven/doxia/site/src/site/apt/references/doxia-apt.apt
maven/doxia/site/src/site/xdoc/overview.xml
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?rev=780498&r1=780497&r2=780498&view=diff
==============================================================================
--- maven/doxia/site/src/site/apt/developers/index.apt (original)
+++ maven/doxia/site/src/site/apt/developers/index.apt Sun May 31 19:45:32 2009
@@ -30,13 +30,13 @@
This documentation centre is for those that are developing Doxia modules or
macro.
-%{toc|section=1|fromDepth=1|toDepth=1}
+%{toc|section=1|fromDepth=2|toDepth=2}
* {Create a New Doxia Module}
First, you need to create a POM with <doxia-modules> as parent:
------
++----
<project>
<parent>
<groupId>org.apache.maven.doxia</groupId>
@@ -49,13 +49,13 @@
...
</project>
------
++----
Secondly, you should implement some Doxia classes:
* <MyParser> class
------
++----
import org.apache.maven.doxia.parser.AbstractParser;
/**
@@ -66,11 +66,11 @@
{
...
}
------
++----
* <MyParseException> class (optional)
------
++----
import org.apache.maven.doxia.parser.ParseException;
public class MyParseException
@@ -78,11 +78,11 @@
{
...
}
------
++----
* <MySiteModule> class (optional, will be used by doxia-sitetools)
------
++----
import org.apache.maven.doxia.module.site.AbstractSiteModule;
/**
@@ -93,11 +93,11 @@
{
...
}
------
++----
* <MySink> class
------
++----
import org.apache.maven.doxia.sink.SinkAdapter;
public class MySink
@@ -105,11 +105,11 @@
{
...
}
------
++----
* <MySinkFactory> class
------
++----
import org.apache.maven.doxia.sink.SinkFactory;
/**
@@ -120,7 +120,7 @@
{
...
}
------
++----
[]
@@ -129,7 +129,7 @@
You need to add the following plugin configuration to generate the correct
Plexus <component.xml> file
for the project containing your macro:
------
++----
<project>
...
<build>
@@ -152,11 +152,11 @@
</build>
...
</project>
------
++----
You should implement the <AbstractMacro> class:
------
++----
import org.apache.maven.doxia.macro.AbstractMacro;
/**
@@ -174,23 +174,23 @@
}
...
}
------
++----
To use it, you need to write the following markups:
* APT
------
++----
%{my|myParam=myValue} <!-- my is the macro name defined by role-hint -->
------
++----
* XDoc
------
++----
<macro name="my"> <!-- my is the required macro name defined by role-hint -->
<param name="myParam" value="myValue"/>
</macro>
------
++----
[]
@@ -199,12 +199,12 @@
With Doxia 1.1 a number of methods have been added to the Sink API that
allow to pass a set of attributes to many sink events. A typical use case
would be:
------
++----
SinkEventAttributeSet atts = new SinkEventAttributeSet();
atts.addAttribute( SinkEventAttributes.ALIGN, "center" );
sink.paragraph( atts );
------
++----
What kind of attributes are supported depends on the event and the sink
implementation. The sink API specifies a list of suggested attribute
Modified: maven/doxia/site/src/site/apt/issues/index.apt
URL:
http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/issues/index.apt?rev=780498&r1=780497&r2=780498&view=diff
==============================================================================
--- maven/doxia/site/src/site/apt/issues/index.apt (original)
+++ maven/doxia/site/src/site/apt/issues/index.apt Sun May 31 19:45:32 2009
@@ -31,7 +31,7 @@
This document collects some infos about specific issues and 'gotchas' when
working with Doxia.
Please check also the {{{../faq.apt}Frequently Asked Questions}}.
-%{toc|section=1|fromDepth=1|toDepth=1}
+%{toc|section=1|fromDepth=2|toDepth=2}
* {Apt anchors and links}
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?rev=780498&r1=780497&r2=780498&view=diff
==============================================================================
--- maven/doxia/site/src/site/apt/macros/index.apt (original)
+++ maven/doxia/site/src/site/apt/macros/index.apt Sun May 31 19:45:32 2009
@@ -37,66 +37,66 @@
A macro in an APT source file is a <<non-indented>> line that looks like this:
------
++----
%{macro_name|param1=value1|param2=value2|...}
------
++----
An Xdoc macro has the following syntax:
------
++----
<macro name="macro_name">
<param name="param1" value="value1"/>
<param name="param2" value="value2"/>
...
</macro>
------
++----
As of Doxia 1.1, the following macros are available:
-%{toc|section=1|fromDepth=1|toDepth=2}
+%{toc|section=1|fromDepth=2|toDepth=2}
* {Echo Macro}
The <Echo> macro is a very simple macro: it prints out the key and value of
any supplied parameters.
For instance, in an APT file, you could write:
------
++----
%{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
------
++----
param1 ---> value1
param2 ---> value2
------
++----
* {Snippet Macro}
The <Snippet> macro is a very useful macro: it prints out the content of a
file or a URL.
For instance, in an APT file, you could write:
------
++----
%{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>
------
++----
The <<<id>>> parameter is not required if you want to include the entire file.
If you want to include only a part of a file, you should add start and end
demarcators:
@@ -106,7 +106,7 @@
* Start and end snippets in a Java file
------
++----
public class MyClass
{
// START SNIPPET: myid
@@ -116,11 +116,11 @@
}
// END SNIPPET: myid
}
------
++----
* Start and end snippets in a XML file
------
++----
<project>
...
<build>
@@ -133,7 +133,7 @@
</plugins>
</build>
</project>
------
++----
[]
@@ -157,9 +157,9 @@
The <TOC> macro prints a Table Of Content of a document. It is useful if you
have several sections and
subsections in your document. For instance, in an APT file, you could write:
------
++----
%{toc|section=2|fromDepth=2|toDepth=3}
------
++----
This displays a TOC for the second section in the document, including all
subsections (depth 2) and sub-subsections (depth 3).
@@ -170,13 +170,13 @@
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 |
@@ -191,9 +191,9 @@
From <<Doxia 1.1.1>> on you may also specify any of the html base attributes
(<i.e.> any of <<<id>>>, <<<class>>>, <<<style>>>, <<<lang>>>, <<<title>>>)
as parameters, e.g.:
------
++----
%{toc|class=myTOC}
------
++----
This can be used for styling the TOC via css.
@@ -202,20 +202,20 @@
The <Swf> macro prints Shockwave Flash assets in the documentation. For
instance, in an APT file,
you could write:
------
++----
%{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>
------
++----
*-----------+--------------+
|| Parameter || Description |
Modified: maven/doxia/site/src/site/apt/macros/swf-macro.apt
URL:
http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/macros/swf-macro.apt?rev=780498&r1=780497&r2=780498&view=diff
==============================================================================
--- maven/doxia/site/src/site/apt/macros/swf-macro.apt (original)
+++ maven/doxia/site/src/site/apt/macros/swf-macro.apt Sun May 31 19:45:32 2009
@@ -30,7 +30,7 @@
Flash assets typically need to be wrappered in <<<object>>> and <<<embed>>>
tags and can have
a variety of parameters. Below is a typical example:
------
++----
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0'
width='400' height='400' id='MyMovie'>
@@ -42,22 +42,22 @@
pluginspage='http://www.macromedia.com/go/getflashplayer'
type='application/x-shockwave-flash' menu='false'></embed>
</object>
------
++----
In order to use a *.swf in your APT file, use the basic syntax:
------
++----
%{swf|src=swf/myfile.swf|id=MyMovie|width=600|height=200}
------
++----
For which <<<src>>> is the required parameter. Make sure to put your *.swf
file into
the <</resources>> folder so that it will get copied to /target when running
the <<<mvn site>>> task.
You can use more advanced parameters to control the output, as per below:
------
++----
%{swf|src=swf/myfile.swf|id=MyMovie|width=600|height=200|version=9|allowScript=always}
------
++----
For a full listing of parameters and their values see the Adobe knowledge
base:
Modified: maven/doxia/site/src/site/apt/modules/index.apt
URL:
http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/modules/index.apt?rev=780498&r1=780497&r2=780498&view=diff
==============================================================================
--- maven/doxia/site/src/site/apt/modules/index.apt (original)
+++ maven/doxia/site/src/site/apt/modules/index.apt Sun May 31 19:45:32 2009
@@ -32,8 +32,8 @@
see the {{{../references/index.html}References}} page for an overview. The
following
is just a collection of reference links for the individual formats.
-%{toc|section=1|fromDepth=1|toDepth=1}
-%{toc|section=2|fromDepth=0|toDepth=0}
+%{toc|section=1|fromDepth=2|toDepth=2}
+%{toc|section=2|fromDepth=1|toDepth=1}
* {APT}
@@ -173,7 +173,7 @@
The following snippet shows how to use a Doxia <Parser> to transform an apt
file to html:
------
++----
File userDir = new File( System.getProperty ( "user.dir" ) );
File inputFile = new File( userDir, "test.apt" );
File outputFile = new File( userDir, "test.html" );
@@ -187,7 +187,7 @@
Reader reader = ReaderFactory.newReader( inputFile, "UTF-8" );
parser.parse( reader, sink );
------
++----
It is recommended that you use plexus to look up the parser. In principle
you could instantiate the parser directly ( <<<Parser parser = new
AptParser();>>> )
Modified: maven/doxia/site/src/site/apt/references/doxia-apt.apt
URL:
http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/references/doxia-apt.apt?rev=780498&r1=780497&r2=780498&view=diff
==============================================================================
--- maven/doxia/site/src/site/apt/references/doxia-apt.apt (original)
+++ maven/doxia/site/src/site/apt/references/doxia-apt.apt Sun May 31 19:45:32
2009
@@ -40,7 +40,7 @@
be a valid Doxia input file and lead to identical results when processed
by a Doxia parser.
-%{toc|section=1|fromDepth=1|toDepth=1}
+%{toc|section=1|fromDepth=2|toDepth=2}
* {Paragraphs in list items}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified: maven/doxia/site/src/site/xdoc/overview.xml
URL:
http://svn.apache.org/viewvc/maven/doxia/site/src/site/xdoc/overview.xml?rev=780498&r1=780497&r2=780498&view=diff
==============================================================================
--- maven/doxia/site/src/site/xdoc/overview.xml (original)
+++ maven/doxia/site/src/site/xdoc/overview.xml Sun May 31 19:45:32 2009
@@ -31,12 +31,7 @@
The following figure represents the main components of the Doxia
Framework.
</p>
<p>
- <!-- workaround for DOXIA-227: usemap attribute is stripped (fixed in
Doxia 1.1, was 1.0-beta-1) -->
- <script type="text/javascript">
- tag='<img src="images/architecture.png" width="574" height="439"
border="0" usemap="#Doxia_Framework" />';
- tag=tag.substring(0,tag.length-2)+'
usemap=\'#Doxia_Framework\''+tag.substring(tag.length-2);
- document.write(tag);
- </script>
+ <img src="images/architecture.png" width="574" height="439" border="0"
usemap="#Doxia_Framework" alt="Doxia Framework"/>
<map id="Doxia_Framework" name="Doxia_Framework">
<area shape="rect" coords="87,45,172,99" alt="Sink API"
href="http://maven.apache.org/doxia/doxia/doxia-sink-api/" />