Author: ltheussl
Date: Sat Mar 5 20:36:14 2011
New Revision: 1078346
URL: http://svn.apache.org/viewvc?rev=1078346&view=rev
Log:
split up developer docs, add docs about using the sink API
Added:
maven/doxia/site/src/site/apt/developers/macros.apt
maven/doxia/site/src/site/apt/developers/modules.apt
maven/doxia/site/src/site/apt/developers/sink.apt
Modified:
maven/doxia/site/src/site/apt/developers/index.apt
maven/doxia/site/src/site/apt/modules/index.apt
maven/doxia/site/src/site/pdf.xml
maven/doxia/site/src/site/site.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=1078346&r1=1078345&r2=1078346&view=diff
==
--- maven/doxia/site/src/site/apt/developers/index.apt (original)
+++ maven/doxia/site/src/site/apt/developers/index.apt Sat Mar 5 20:36:14 2011
@@ -30,196 +30,11 @@ Doxia Developers Centre
This documentation centre is for those that are developing Doxia modules or
macro.
-%{toc|section=1|fromDepth=2|toDepth=2}
+ Currently you can find information on the following topics:
-* {Create a New Doxia Module}
+ * {{{./modules.html}Creating Doxia Modules}}
- First, you need to create a POM with as parent:
+ * {{{./macros.html}Creating Doxia Macros}}
-+
-
-
-org.apache.maven.doxia
-doxia-modules
-1.0
-
- 4.0.0
- doxia-module-my
- Doxia :: MY Module
-
- ...
-
-+
-
- Secondly, you should implement some Doxia classes:
-
- * class
-
-+
-import org.apache.maven.doxia.parser.AbstractParser;
-
-/**
- * @plexus.component role="org.apache.maven.doxia.parser.Parser" role-hint="my"
- */
-public class MyParser
-extends AbstractParser
-{
-...
-}
-+
-
- * class (optional)
-
-+
-import org.apache.maven.doxia.parser.ParseException;
-
-public class MyParseException
-extends ParseException
-{
-...
-}
-+
-
- * class (optional, will be used by doxia-sitetools)
-
-+
-import org.apache.maven.doxia.module.site.AbstractSiteModule;
-
-/**
- * @plexus.component role="org.apache.maven.doxia.module.site.SiteModule"
role-hint="my"
- */
-public class MySiteModule
-extends AbstractSiteModule
-{
-...
-}
-+
-
- * class
-
-+
-import org.apache.maven.doxia.sink.SinkAdapter;
-
-public class MySink
-extends SinkAdapter
-{
-...
-}
-+
-
- * class
-
-+
-import org.apache.maven.doxia.sink.SinkFactory;
-
-/**
- * @plexus.component role="org.apache.maven.doxia.sink.SinkFactory"
role-hint="my"
- */
-public class MySinkFactory
-extends SinkFactory
-{
-...
-}
-+
-
- []
-
-* {Create a New Doxia Macro}
-
- You need to add the following plugin configuration to generate the correct
Plexus file
- for the project containing your macro:
-
-+
-
- ...
-
-...
-
-
-org.codehaus.plexus
-plexus-maven-plugin
-
-
-
- descriptor
-
-
-
-
- ...
-
- ...
-
- ...
-
-+
-
- You should implement the class:
-
-+
-import org.apache.maven.doxia.macro.AbstractMacro;
-
-/**
- * @plexus.component role="org.apache.maven.doxia.macro.Macro" role-hint="my"
- */
-public class MyMacro
-extends AbstractMacro
-{
-...
-public void execute( Sink sink, MacroRequest request )
-throws MacroExecutionException
-{
-String myValue = (String) request.getParameter( "myParam" );
-...
-}
-...
-}
-+
-
- To use it, you need to write the following markups:
-
- * APT
-
-+
-%{my|myParam=myValue}
-+
-
- * XDoc
-
-+
-
-
-
-+
-
- []
-
-* {Passing attributes to Sink events}
-
- 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
- names that sinks are expected to recognize, and parsers are expected to use
- preferably when emitting events.
-
-
-* {References}
-
- * {{{../modules/index.html}Doxia Modules Guide}}
+ * {{{./sink.html}Using the Doxia Sink API}}
- * {{{../macros/index.html}Doxia Macros Guide}}
-
- * {{{../doxia/apidocs/index.html}Doxia API Reference}}
-
- * {{{../doxia-sitetools/apidocs/index.html}Doxia Sitetools API Reference}}
-
- []
Added: maven/doxia/site/src/site/apt/developers/macros.apt
URL:
http://svn.apache.org/viewvc/maven/doxia/site/src/site/apt/developers/macros.apt?rev=1078346&view=auto
==
--- maven/doxia/site/src/site/apt/developers/macros.apt (added)
+++ maven/doxia/site/src