maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r417004 - in /maven/doxia/trunk/doxia-sandbox/doxia-book: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/maven/ src/main/java/org/apache/maven/doxia/ src/main/java/org/apache/maven/dox...
Date Sun, 25 Jun 2006 10:50:11 GMT
Author: trygvis
Date: Sun Jun 25 03:50:10 2006
New Revision: 417004

URL: http://svn.apache.org/viewvc?rev=417004&view=rev
Log:
o Adding some code to make books in Doxia.

Added:
    maven/doxia/trunk/doxia-sandbox/doxia-book/   (with props)
    maven/doxia/trunk/doxia-sandbox/doxia-book/pom.xml
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/BookDoxia.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/BookDoxiaException.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/DefaultBookDoxia.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/context/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/context/BookContext.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/context/TOCEntry.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/BookIndexer.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/BookIndexingSink.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/DefaultBookIndexer.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/BookRenderer.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/ITextBookRenderer.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/XHtmlBookRenderer.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/BookValidator.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/DefaultBookValidator.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/ValidationResult.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/modello/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/modello/book.mdo
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/resources/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/java/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/java/org/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/java/org/apache/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/java/org/apache/maven/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/java/org/apache/maven/doxia/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/java/org/apache/maven/doxia/book/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/java/org/apache/maven/doxia/book/BookRendererTest.java
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1.xml
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-1.apt
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-2.apt
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-3.apt
    maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-4.apt

Propchange: maven/doxia/trunk/doxia-sandbox/doxia-book/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Jun 25 03:50:10 2006
@@ -0,0 +1,8 @@
+target
+*~
+*.log
+.classpath
+.project
+*.ipr
+*.iws
+*.iml

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/pom.xml
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/pom.xml?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/pom.xml (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/pom.xml Sun Jun 25 03:50:10 2006
@@ -0,0 +1,58 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven.doxia</groupId>
+    <artifactId>doxia</artifactId>
+  <version>1.0-alpha-8-SNAPSHOT</version>
+  </parent>
+  <artifactId>doxia-book</artifactId>
+  <version>1.0-alpha-1-SNAPSHOT</version>
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>doxia-core</artifactId>
+      <version>1.0-alpha-9-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>doxia-module-itext</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-container-default</artifactId>
+      <version>1.0-alpha-8</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.modello</groupId>
+        <artifactId>modello-maven-plugin</artifactId>
+        <configuration>
+          <model>src/main/modello/book.mdo</model>
+          <version>1.0.0</version>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>java</goal>
+              <goal>xpp3-reader</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>descriptor</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/BookDoxia.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/BookDoxia.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/BookDoxia.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/BookDoxia.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,16 @@
+package org.apache.maven.doxia.book;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public interface BookDoxia
+{
+    String ROLE = BookDoxia.class.getName();
+
+    void renderBook( File bookDescriptor, String bookRendererId, List files, File outputDirectory )
+        throws BookDoxiaException;
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/BookDoxiaException.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/BookDoxiaException.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/BookDoxiaException.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/BookDoxiaException.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,19 @@
+package org.apache.maven.doxia.book;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class BookDoxiaException
+    extends Exception
+{
+    public BookDoxiaException( String message )
+    {
+        super( message );
+    }
+
+    public BookDoxiaException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/DefaultBookDoxia.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/DefaultBookDoxia.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/DefaultBookDoxia.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/DefaultBookDoxia.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,146 @@
+package org.apache.maven.doxia.book;
+
+import org.apache.maven.doxia.book.context.BookContext;
+import org.apache.maven.doxia.book.context.TOCEntry;
+import org.apache.maven.doxia.book.model.Book;
+import org.apache.maven.doxia.book.model.io.xpp3.BookXpp3Reader;
+import org.apache.maven.doxia.book.services.indexer.BookIndexer;
+import org.apache.maven.doxia.book.services.renderer.BookRenderer;
+import org.apache.maven.doxia.book.services.validation.BookValidator;
+import org.apache.maven.doxia.book.services.validation.ValidationResult;
+import org.apache.maven.doxia.site.module.SiteModule;
+import org.apache.maven.doxia.site.module.manager.SiteModuleManager;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ * @plexus.component
+ */
+public class DefaultBookDoxia
+    extends AbstractLogEnabled
+    implements BookDoxia
+{
+    /**
+     * @plexus.requirement
+     */
+    private BookValidator bookValidator;
+
+    /**
+     * @plexus.requirement
+     */
+    private BookIndexer bookIndexer;
+
+    /**
+     * @plexus.requirement role="org.apache.maven.doxia.book.services.renderer.BookRenderer"
+     */
+    private Map bookRenderers;
+
+    /**
+     * @plexus.requirement
+     */
+    private SiteModuleManager siteModuleManager;
+
+    // ----------------------------------------------------------------------
+    // BookDoxia Implementation
+    // ----------------------------------------------------------------------
+
+    public void renderBook( File bookDescriptor, String bookRendererId, List files, File outputDirectory )
+        throws BookDoxiaException
+    {
+        Book book;
+
+        try
+        {
+            book = new BookXpp3Reader().read( new FileReader( bookDescriptor ), true );
+        }
+        catch ( IOException e )
+        {
+            throw new BookDoxiaException( "Error while reading book descriptor.", e );
+        }
+        catch ( XmlPullParserException e )
+        {
+            throw new BookDoxiaException( "Error while reading book descriptor.", e );
+        }
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        ValidationResult validationResult = bookValidator.validateBook( book );
+
+        if ( !validationResult.isAllOk() )
+        {
+            throw new BookDoxiaException( "Could not validate the book model." );
+        }
+
+        // ----------------------------------------------------------------------
+        // Create and initialize the context
+        // ----------------------------------------------------------------------
+
+        BookContext context = new BookContext();
+
+        context.setBook( book );
+
+        context.setOutputDirectory( outputDirectory );
+
+        context.setRootTOCEntry( new TOCEntry() );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        Collection siteModules = siteModuleManager.getSiteModules();
+
+        for ( Iterator it = siteModules.iterator(); it.hasNext(); )
+        {
+            SiteModule siteModule = (SiteModule) it.next();
+
+            String extension = siteModule.getExtension();
+
+            for ( Iterator j = files.iterator(); j.hasNext(); )
+            {
+                File file = (File) j.next();
+
+                String name = file.getName();
+
+                if ( name.endsWith( extension ) )
+                {
+                    name = name.substring( 0, name.length() - siteModule.getExtension().length() - 1 );
+
+                    BookContext.BookFile bookFile = new BookContext.BookFile( file, siteModule.getParserId() );
+
+                    context.getFiles().put( name, bookFile );
+                }
+            }
+        }
+
+        // ----------------------------------------------------------------------
+        // Generate indexes
+        // ----------------------------------------------------------------------
+
+        bookIndexer.indexBook( book, context );
+
+        // ----------------------------------------------------------------------
+        // Render the book
+        // ----------------------------------------------------------------------
+
+        BookRenderer bookRenderer = (BookRenderer) bookRenderers.get( bookRendererId );
+
+        if ( bookRenderer == null )
+        {
+            throw new BookDoxiaException( "No such book rendered '" + bookRendererId + "'." );
+        }
+
+        bookRenderer.renderBook( context );
+    }
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/context/BookContext.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/context/BookContext.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/context/BookContext.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/context/BookContext.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,99 @@
+package org.apache.maven.doxia.book.context;
+
+import org.apache.maven.doxia.book.model.Book;
+
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+import java.io.File;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class BookContext
+{
+    private Book book;
+
+    private Map files;
+
+    private File outputDirectory;
+
+    private TOCEntry rootTOCEntry;
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    public static class BookFile
+    {
+        private File file;
+
+        private String parserId;
+
+        public BookFile( File file, String parserId )
+        {
+            this.file = file;
+            this.parserId = parserId;
+        }
+
+        public File getFile()
+        {
+            return file;
+        }
+
+        public String getParserId()
+        {
+            return parserId;
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // Accessors
+    // ----------------------------------------------------------------------
+
+    public Book getBook()
+    {
+        return book;
+    }
+
+    public void setBook( Book book )
+    {
+        this.book = book;
+    }
+
+    public Map getFiles()
+    {
+        if ( files == null )
+        {
+            files = new HashMap();
+        }
+
+        return files;
+    }
+
+    public void setFiles( Map files )
+    {
+        this.files = files;
+    }
+
+    public File getOutputDirectory()
+    {
+        return outputDirectory;
+    }
+
+    public void setOutputDirectory( File outputDirectory )
+    {
+        this.outputDirectory = outputDirectory;
+    }
+
+    public TOCEntry getRootTOCEntry()
+    {
+        return rootTOCEntry;
+    }
+
+    public void setRootTOCEntry( TOCEntry rootTOCEntry )
+    {
+        this.rootTOCEntry = rootTOCEntry;
+    }
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/context/TOCEntry.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/context/TOCEntry.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/context/TOCEntry.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/context/TOCEntry.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,52 @@
+package org.apache.maven.doxia.book.context;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class TOCEntry
+{
+    private String sectionId;
+
+    private String title;
+
+    private List childEntries;
+
+    public String getSectionId()
+    {
+        return sectionId;
+    }
+
+    public void setSectionId( String sectionId )
+    {
+        this.sectionId = sectionId;
+    }
+
+    public String getTitle()
+    {
+        return title;
+    }
+
+    public void setTitle( String title )
+    {
+        this.title = title;
+    }
+
+    public List getChildEntries()
+    {
+        if ( childEntries == null )
+        {
+            childEntries = new ArrayList();
+        }
+
+        return childEntries;
+    }
+
+    public void setChildEntries( List childEntries )
+    {
+        this.childEntries = childEntries;
+    }
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/BookIndexer.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/BookIndexer.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/BookIndexer.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/BookIndexer.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,17 @@
+package org.apache.maven.doxia.book.services.indexer;
+
+import org.apache.maven.doxia.book.model.Book;
+import org.apache.maven.doxia.book.context.BookContext;
+import org.apache.maven.doxia.book.BookDoxiaException;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public interface BookIndexer
+{
+    String ROLE = BookIndexer.class.getName();
+
+    void indexBook( Book book, BookContext bookContext )
+        throws BookDoxiaException;
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/BookIndexingSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/BookIndexingSink.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/BookIndexingSink.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/BookIndexingSink.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,119 @@
+package org.apache.maven.doxia.book.services.indexer;
+
+import org.apache.maven.doxia.sink.SinkAdapter;
+import org.apache.maven.doxia.book.context.BookContext;
+import org.apache.maven.doxia.book.context.TOCEntry;
+import org.apache.maven.doxia.book.BookDoxiaException;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class BookIndexingSink
+    extends SinkAdapter
+{
+    private final static int TYPE_SECTION_1 = 1;
+    private final static int TYPE_SECTION_2 = 2;
+    private final static int TYPE_SECTION_3 = 3;
+    private final static int TYPE_SECTION_4 = 4;
+    private final static int TYPE_SECTION_5 = 5;
+    private final static int TYPE_DEFINED_TERM = 6;
+    private final static int TYPE_FIGURE = 7;
+    private final static int TYPE_TABLE = 8;
+
+    private int type;
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    private BookContext bookContext;
+
+    public BookIndexingSink( BookContext bookContext )
+    {
+        this.bookContext = bookContext;
+    }
+
+    // ----------------------------------------------------------------------
+    // Sink Overrides
+    // ----------------------------------------------------------------------
+
+    public void sectionTitle1_()
+    {
+        type = TYPE_SECTION_1;
+    }
+
+    public void sectionTitle2_()
+    {
+        type = TYPE_SECTION_2;
+    }
+
+    public void sectionTitle3_()
+    {
+        type = TYPE_SECTION_3;
+    }
+
+    public void sectionTitle4_()
+    {
+        type = TYPE_SECTION_4;
+    }
+
+    public void sectionTitle5_()
+    {
+        type = TYPE_SECTION_5;
+    }
+
+    public void definedTerm_()
+    {
+        type = TYPE_DEFINED_TERM;
+    }
+
+    public void figureCaption_()
+    {
+        type = TYPE_FIGURE;
+    }
+
+    public void tableCaption_()
+    {
+        type = TYPE_TABLE;
+    }
+
+    public void text( String text )
+    {
+        if ( bookContext == null )
+        {
+            throw new RuntimeException( new BookDoxiaException( "The book context has to be set first." ) );
+        }
+
+        TOCEntry entry = new TOCEntry();
+        entry.setTitle( text );
+
+        switch( type )
+        {
+            case TYPE_SECTION_1: addSection( 0, entry ); break;
+            case TYPE_SECTION_2: addSection( 1, entry ); break;
+            case TYPE_SECTION_3: addSection( 2, entry ); break;
+            case TYPE_SECTION_4: addSection( 3, entry ); break;
+            case TYPE_SECTION_5: addSection( 4, entry ); break;
+            case TYPE_DEFINED_TERM:
+            case TYPE_FIGURE:
+            case TYPE_TABLE:
+        }
+    }
+
+    private void addSection( int depth, TOCEntry entry )
+    {
+        TOCEntry parent = bookContext.getRootTOCEntry();
+
+        for ( int i = 0; i < depth; i++ )
+        {
+            List entries = parent.getChildEntries();
+
+            parent = (TOCEntry) entries.get( entries.size() );
+        }
+
+        parent.getChildEntries().add( entry );
+    }
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/DefaultBookIndexer.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/DefaultBookIndexer.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/DefaultBookIndexer.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/indexer/DefaultBookIndexer.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,95 @@
+package org.apache.maven.doxia.book.services.indexer;
+
+import org.apache.maven.doxia.book.context.BookContext;
+import org.apache.maven.doxia.book.model.Book;
+import org.apache.maven.doxia.book.model.Chapter;
+import org.apache.maven.doxia.book.model.Section;
+import org.apache.maven.doxia.book.BookDoxiaException;
+import org.apache.maven.doxia.parser.manager.ParserNotFoundException;
+import org.apache.maven.doxia.parser.ParseException;
+import org.apache.maven.doxia.Doxia;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+
+import java.util.Iterator;
+import java.io.FileReader;
+import java.io.FileNotFoundException;
+
+/**
+ * @plexus.component
+ *
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class DefaultBookIndexer
+    extends AbstractLogEnabled
+    implements BookIndexer
+{
+    /**
+     * @plexus.requirement
+     */
+    private Doxia doxia;
+
+    // ----------------------------------------------------------------------
+    // BookIndexer Implementation
+    // ----------------------------------------------------------------------
+
+    public void indexBook( Book book, BookContext bookContext )
+        throws BookDoxiaException
+    {
+        BookIndexingSink sink = new BookIndexingSink( bookContext );
+
+        for ( Iterator it = book.getChapters().iterator(); it.hasNext(); )
+        {
+            Chapter chapter = (Chapter) it.next();
+
+            indexChapter( bookContext, chapter, sink );
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // Private
+    // ----------------------------------------------------------------------
+
+    private void indexChapter( BookContext bookContext, Chapter chapter, BookIndexingSink sink )
+        throws BookDoxiaException
+    {
+        for ( Iterator it = chapter.getSections().iterator(); it.hasNext(); )
+        {
+            Section section = (Section) it.next();
+
+            indexSection( bookContext, section, sink );
+        }
+    }
+
+    private void indexSection( BookContext bookContext, Section section, BookIndexingSink sink )
+        throws BookDoxiaException
+    {
+        BookContext.BookFile bookFile = (BookContext.BookFile) bookContext.getFiles().get( section.getId() );
+
+        if ( bookFile == null )
+        {
+            throw new BookDoxiaException( "No document that matches section with id=" + section.getId() + "." );
+        }
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        try
+        {
+            doxia.parse( new FileReader( bookFile.getFile() ), bookFile.getParserId(), sink );
+        }
+        catch ( ParserNotFoundException e )
+        {
+            throw new BookDoxiaException( "Parser not found: " + bookFile.getParserId() + ".", e );
+        }
+        catch ( ParseException e )
+        {
+            throw new BookDoxiaException( "Error while parsing document: " + bookFile.getFile().getAbsolutePath() + ".", e );
+        }
+        catch ( FileNotFoundException e )
+        {
+            throw new BookDoxiaException( "Could not find document: " + bookFile.getFile().getAbsolutePath() + ".", e );
+        }
+    }
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/BookRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/BookRenderer.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/BookRenderer.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/BookRenderer.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,16 @@
+package org.apache.maven.doxia.book.services.renderer;
+
+import org.apache.maven.doxia.book.context.BookContext;
+import org.apache.maven.doxia.book.BookDoxiaException;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public interface BookRenderer
+{
+    String ROLE = BookRenderer.class.getName();
+
+    void renderBook( BookContext context )
+        throws BookDoxiaException;
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/ITextBookRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/ITextBookRenderer.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/ITextBookRenderer.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/ITextBookRenderer.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,213 @@
+package org.apache.maven.doxia.book.services.renderer;
+
+import org.apache.maven.doxia.book.context.BookContext;
+import org.apache.maven.doxia.book.BookDoxiaException;
+import org.apache.maven.doxia.book.model.Book;
+import org.apache.maven.doxia.book.model.Chapter;
+import org.apache.maven.doxia.book.model.Section;
+import org.apache.maven.doxia.module.itext.ITextSink;
+import org.apache.maven.doxia.module.itext.ITextUtil;
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.Doxia;
+import org.apache.maven.doxia.parser.manager.ParserNotFoundException;
+import org.apache.maven.doxia.parser.ParseException;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.FileReader;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileInputStream;
+import java.util.Iterator;
+import java.util.Date;
+import java.text.DateFormat;
+
+/**
+ * @plexus.component role-hint="itext"
+ *
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class ITextBookRenderer
+    extends AbstractLogEnabled
+    implements BookRenderer
+{
+    /**
+     * @plexus.requirement
+     */
+    private Doxia doxia;
+
+    // ----------------------------------------------------------------------
+    // BookRenderer Implementation
+    // ----------------------------------------------------------------------
+
+    public void renderBook( BookContext context )
+        throws BookDoxiaException
+    {
+        Book book = context.getBook();
+
+        if ( !context.getOutputDirectory().exists() )
+        {
+            if ( !context.getOutputDirectory().mkdirs() )
+            {
+                throw new BookDoxiaException( "Could not make directory: " + context.getOutputDirectory().getAbsolutePath() + "." );
+            }
+        }
+
+        File bookFile = new File( context.getOutputDirectory(), book.getId() + ".xml" );
+
+        FileWriter fileWriter;
+
+        try
+        {
+            fileWriter = new FileWriter( bookFile );
+        }
+        catch ( IOException e )
+        {
+            throw new BookDoxiaException( "Error while opening file.", e );
+        }
+
+        // ----------------------------------------------------------------------
+        // Create the XML File
+        // ----------------------------------------------------------------------
+
+        PrettyPrintXMLWriter writer = new PrettyPrintXMLWriter( fileWriter );
+        writer.startElement( "itext" );
+        writer.addAttribute( "creationdate", DateFormat.getDateTimeInstance().format( new Date() ) );
+        writer.addAttribute( "producer", "Doxia iText" );
+
+        // TODO: Write out TOC
+
+        for ( Iterator it = book.getChapters().iterator(); it.hasNext(); )
+        {
+            Chapter chapter = (Chapter) it.next();
+
+            renderChapter( writer, chapter, context );
+        }
+
+        writer.endElement(); // itext
+
+        try
+        {
+            fileWriter.close();
+        }
+        catch ( IOException e )
+        {
+            throw new BookDoxiaException( "Error while closing file.", e );
+        }
+
+        // ----------------------------------------------------------------------
+        // Render the XML to PDF
+        // ----------------------------------------------------------------------
+
+        File pdfFile = new File( context.getOutputDirectory(), book.getId() + ".pdf" );
+
+        try
+        {
+            ITextUtil.writePdf( new FileInputStream( bookFile ), new FileOutputStream( pdfFile ) );
+        }
+        catch ( FileNotFoundException e )
+        {
+            throw new BookDoxiaException( "Error while rendering file to PDF", e );
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // Private
+    // ----------------------------------------------------------------------
+
+    private void renderChapter( PrettyPrintXMLWriter writer, Chapter chapter, BookContext context )
+        throws BookDoxiaException
+    {
+        writer.startElement( "chapter" );
+        writer.addAttribute( "numberdepth", "1" );
+        writer.addAttribute( "depth", "1" );
+        writer.addAttribute( "indent", "1" );
+
+        startTitle( writer, "36.0", "Helvetica", "24.0", "normal", "255", "0", "0");
+        chunk( writer, chapter.getTitle(), "Helvetica", "24.0", "normal","255", "0", "0" );
+        writer.endElement(); // title
+
+        for ( Iterator it = chapter.getSections().iterator(); it.hasNext(); )
+        {
+            Section section = (Section) it.next();
+
+            renderSection( writer, section, context );
+        }
+
+        writer.endElement(); // chapter
+    }
+
+    private void renderSection( PrettyPrintXMLWriter writer, Section section, BookContext context )
+        throws BookDoxiaException
+    {
+//        writer.startElement( "section" );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        BookContext.BookFile bookFile = (BookContext.BookFile) context.getFiles().get( section.getId() );
+
+        if ( bookFile == null )
+        {
+            throw new BookDoxiaException( "No document that matches section with id=" + section.getId() + "." );
+        }
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        Sink sink = new ITextSink( writer );
+
+        try
+        {
+            doxia.parse( new FileReader( bookFile.getFile() ), bookFile.getParserId(), sink );
+        }
+        catch ( ParserNotFoundException e )
+        {
+            throw new BookDoxiaException( "Parser not found: " + bookFile.getParserId() + ".", e );
+        }
+        catch ( ParseException e )
+        {
+            throw new BookDoxiaException( "Error while parsing document: " + bookFile.getFile().getAbsolutePath() + ".", e );
+        }
+        catch ( FileNotFoundException e )
+        {
+            throw new BookDoxiaException( "Could not find document: " + bookFile.getFile().getAbsolutePath() + ".", e );
+        }
+
+//        writer.endElement(); // section
+    }
+
+    private void startTitle( PrettyPrintXMLWriter writer, String leading, String font, String size, String fontstyle,
+                             String red, String green, String blue )
+    {
+        writer.startElement( "title" );
+        writer.addAttribute( "leading", leading );
+        writer.addAttribute( "font", font );
+        writer.addAttribute( "size", size );
+        writer.addAttribute( "fontstyle", fontstyle );
+        writer.addAttribute( "red", red );
+        writer.addAttribute( "green", green );
+        writer.addAttribute( "blue", blue );
+    }
+
+    private void chunk( PrettyPrintXMLWriter writer, String title, String font, String size, String fontstyle,
+                        String red, String green, String blue )
+    {
+        writer.startElement( "chunk" );
+        writer.addAttribute( "font", font );
+        writer.addAttribute( "size", size );
+        writer.addAttribute( "fontstyle", fontstyle );
+        writer.addAttribute( "red", red );
+        writer.addAttribute( "green", green );
+        writer.addAttribute( "blue", blue );
+        // TODO: Handle empty title
+        writer.writeText( title );
+        writer.endElement(); // chunk
+    }
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/XHtmlBookRenderer.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/XHtmlBookRenderer.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/XHtmlBookRenderer.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/renderer/XHtmlBookRenderer.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,148 @@
+package org.apache.maven.doxia.book.services.renderer;
+
+import org.apache.maven.doxia.Doxia;
+import org.apache.maven.doxia.book.context.BookContext;
+import org.apache.maven.doxia.book.BookDoxiaException;
+import org.apache.maven.doxia.book.model.Book;
+import org.apache.maven.doxia.book.model.Chapter;
+import org.apache.maven.doxia.book.model.Section;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.Iterator;
+
+/**
+ * @plexus.component role-hint="xhtml"
+ *
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class XHtmlBookRenderer
+    extends AbstractLogEnabled
+    implements BookRenderer
+{
+    /**
+     * @plexus.requirement
+     */
+    private Doxia doxia;
+
+    // ----------------------------------------------------------------------
+    // BookRenderer Implementation
+    // ----------------------------------------------------------------------
+
+    public void renderBook( BookContext context )
+        throws BookDoxiaException
+    {
+        Book book = context.getBook();
+
+        if ( !context.getOutputDirectory().exists() )
+        {
+            if ( !context.getOutputDirectory().mkdirs() )
+            {
+                throw new BookDoxiaException( "Could not make directory: " + context.getOutputDirectory().getAbsolutePath() + "." );
+            }
+        }
+
+        File bookFile = new File( context.getOutputDirectory(), book.getId() + ".xhtml" );
+
+        FileWriter fileWriter;
+
+        try
+        {
+            fileWriter = new FileWriter( bookFile );
+        }
+        catch ( IOException e )
+        {
+            throw new BookDoxiaException( "Error while opening file.", e );
+        }
+
+        PrettyPrintXMLWriter writer = new PrettyPrintXMLWriter( fileWriter );
+        writer.writeText( "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">" );
+        writer.startElement( "html" );
+        writer.addAttribute( "xmlns", "http://www.w3.org/1999/xhtml");
+        writer.startElement( "body" );
+
+        for ( Iterator it = book.getChapters().iterator(); it.hasNext(); )
+        {
+            Chapter chapter = (Chapter) it.next();
+
+            renderChapter( writer, chapter, context );
+        }
+
+        writer.endElement(); // body
+        writer.endElement(); // html
+
+        try
+        {
+            fileWriter.close();
+        }
+        catch ( IOException e )
+        {
+            throw new BookDoxiaException( "Error while closing file.", e );
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // Private
+    // ----------------------------------------------------------------------
+
+    private void renderChapter( PrettyPrintXMLWriter writer, Chapter chapter, BookContext context )
+        throws BookDoxiaException
+    {
+        writer.startElement( "chapter" );
+
+        for ( Iterator it = chapter.getSections().iterator(); it.hasNext(); )
+        {
+            Section section = (Section) it.next();
+
+            renderSection( writer, section, context );
+        }
+
+        writer.endElement();
+    }
+
+    private void renderSection( PrettyPrintXMLWriter writer, Section section, BookContext context )
+        throws BookDoxiaException
+    {
+        writer.startElement( "section" );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        BookContext.BookFile bookFile = (BookContext.BookFile) context.getFiles().get( section.getId() );
+
+        if ( bookFile == null )
+        {
+            throw new BookDoxiaException( "No document that matches section with id=" + section.getId() + "." );
+        }
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+//        Sink sink = new XhtmlSink( writer, new RenderingContext( context.getOutputDirectory(), bookFile.getFile().getAbsolutePath() ) );
+
+//        try
+//        {
+//            doxia.parse( new FileReader( bookFile.getFile() ), bookFile.getParserId(), sink );
+//        }
+//        catch ( ParserNotFoundException e )
+//        {
+//            throw new BookDoxiaException( "Parser not found: " + bookFile.getParserId() + ".", e );
+//        }
+//        catch ( ParseException e )
+//        {
+//            throw new BookDoxiaException( "Error while parsing document: " + bookFile.getFile().getAbsolutePath() + ".", e );
+//        }
+//        catch ( FileNotFoundException e )
+//        {
+//            throw new BookDoxiaException( "Could not find document: " + bookFile.getFile().getAbsolutePath() + ".", e );
+//        }
+
+        writer.endElement();
+    }
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/BookValidator.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/BookValidator.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/BookValidator.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/BookValidator.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,14 @@
+package org.apache.maven.doxia.book.services.validation;
+
+import org.apache.maven.doxia.book.model.Book;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public interface BookValidator
+{
+    String ROLE = BookValidator.class.getName();
+
+    ValidationResult validateBook( Book book );
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/DefaultBookValidator.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/DefaultBookValidator.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/DefaultBookValidator.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/DefaultBookValidator.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,43 @@
+package org.apache.maven.doxia.book.services.validation;
+
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.util.StringUtils;
+import org.apache.maven.doxia.book.model.Book;
+
+/**
+ * @plexus.component
+ *
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class DefaultBookValidator
+    extends AbstractLogEnabled
+    implements BookValidator, Initializable
+{
+    // ----------------------------------------------------------------------
+    // BookValidator Implementation
+    // ----------------------------------------------------------------------
+
+    public ValidationResult validateBook( Book book )
+    {
+        ValidationResult result = new ValidationResult();
+
+        if ( StringUtils.isEmpty( book.getId() ) )
+        {
+            result.getErrors().add( "Book is missing id." );
+        }
+
+        return result;
+    }
+
+    // ----------------------------------------------------------------------
+    // Component Lifecycle
+    // ----------------------------------------------------------------------
+
+    public void initialize()
+        throws InitializationException
+    {
+    }
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/ValidationResult.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/ValidationResult.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/ValidationResult.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/java/org/apache/maven/doxia/book/services/validation/ValidationResult.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,42 @@
+package org.apache.maven.doxia.book.services.validation;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class ValidationResult
+{
+    private boolean allOk;
+
+    private List errors;
+
+    private List warnings;
+
+    public boolean isAllOk()
+    {
+        return getErrors().size() == 0 && getWarnings().size() == 0;
+    }
+
+    public List getErrors()
+    {
+        if ( errors == null )
+        {
+            errors = new ArrayList();
+        }
+
+        return errors;
+    }
+
+    public List getWarnings()
+    {
+        if ( warnings == null )
+        {
+            warnings = new ArrayList();
+        }
+
+        return warnings;
+    }
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/modello/book.mdo
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/modello/book.mdo?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/modello/book.mdo (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/main/modello/book.mdo Sun Jun 25 03:50:10 2006
@@ -0,0 +1,455 @@
+<?xml version="1.0"?>
+
+<model>
+  <id>book</id>
+  <name>Book</name>
+  <description>Model for a book in Doxia</description>
+  <defaults>
+    <default>
+      <key>package</key>
+      <value>org.apache.maven.doxia.book.model</value>
+    </default>
+  </defaults>
+  <classes>
+    <class rootElement="true" xml.tagName="project">
+      <name>Book</name>
+      <description></description>
+      <version>1.0.0</version>
+      <fields>
+        <field>
+          <name>id</name>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>name</name>
+          <version>1.0.0</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>chapters</name>
+          <version>1.0.0</version>
+          <association>
+            <type>Chapter</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+<!--
+        <field>
+          <name>bannerLeft</name>
+          <description>Banner logo on the masthead of the site to the left.</description>
+          <version>1.0.0</version>
+          <association>
+            <type>Banner</type>
+          </association>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>bannerRight</name>
+          <description>Banner logo on the masthead of the site to the right.</description>
+          <version>1.0.0</version>
+          <association>
+            <type>Banner</type>
+          </association>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>publishDate</name>
+          <description>Modify the date published display properties.</description>
+          <version>1.0.0</version>
+          <association>
+            <type>PublishDate</type>
+          </association>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>version</name>
+          <description>Modify the version display properties.</description>
+          <version>1.0.0</version>
+          <association>
+            <type>Version</type>
+          </association>
+          <identifier>true</identifier>
+        </field>
+        <field xml.associationTagName="logo">
+          <name>poweredBy</name>
+          <description>Powered by logos.</description>
+          <version>1.0.0</version>
+          <association>
+            <type>Logo</type>
+            <multiplicity>*</multiplicity>
+          </association>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>skin</name>
+          <description>The artifact containing the skin for the site</description>
+          <version>1.0.0</version>
+          <association>
+            <type>Skin</type>
+          </association>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>body</name>
+          <description>The main site content decoration.</description>
+          <version>1.0.0</version>
+          <association>
+            <type>Body</type>
+          </association>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>custom</name>
+          <description>Custom configuration for use with customised velocity templates.</description>
+          <version>1.0.0</version>
+          <type>DOM</type>
+          <identifier>true</identifier>
+        </field>
+-->
+      </fields>
+    </class>
+    <class>
+      <name>Chapter</name>
+      <version>1.0.0</version>
+      <fields>
+        <field>
+          <name>id</name>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>title</name>
+          <version>1.0.0</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>sections</name>
+          <version>1.0.0</version>
+          <association>
+            <type>Section</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Section</name>
+      <version>1.0.0</version>
+      <fields>
+        <field>
+          <name>id</name>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>title</name>
+          <version>1.0.0</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>file</name>
+          <version>1.0.0</version>
+          <type>String</type>
+        </field>
+      </fields>
+    </class>
+<!--
+    <class>
+      <name>Banner</name>
+      <description>A banner logo on the masthead of the site.</description>
+      <version>1.0.0</version>
+      <fields>
+        <field>
+          <name>name</name>
+          <version>1.0.0</version>
+          <description>Description of the banner.</description>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>src</name>
+          <version>1.0.0</version>
+          <description>The href of an image for the banner</description>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>alt</name>
+          <version>1.0.0</version>
+          <description>Alt description for the banner image.</description>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>href</name>
+          <version>1.0.0</version>
+          <description>The href of a link to use for the banner</description>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>PublishDate</name>
+      <description>Modify display properties for date published.</description>
+      <version>1.0.0</version>
+      <fields>
+        <field xml.attribute="true">
+          <name>position</name>
+          <description>Where to place the date published (left, right, navigation-top, navigation-bottom,
+            bottom).</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.attribute="true">
+          <name>format</name>
+          <description>Date format to use. The default is MM/dd/yyyy.</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Version</name>
+      <description>Modify display properties for version.</description>
+      <version>1.0.0</version>
+      <fields>
+        <field xml.attribute="true">
+          <name>position</name>
+          <description>Where to place the date published (left, right, navigation-top, navigation-bottom,
+            bottom).</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Logo</name>
+      <description>Logo.</description>
+      <version>1.0.0</version>
+      <superClass>LinkItem</superClass>
+      <fields>
+        <field xml.attribute="true">
+          <name>img</name>
+          <description>Logo image href.</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Body</name>
+      <description>The main content decoration.</description>
+      <version>1.0.0</version>
+      <fields>
+        <field>
+          <name>head</name>
+          <description>Additional content to include in the HEAD block of the generated pages.</description>
+          <version>1.0.0</version>
+          <type>DOM</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.associationTagName="item">
+          <name>links</name>
+          <description>A list of links to display in the navigation.</description>
+          <version>1.0.0</version>
+          <association>
+            <type>LinkItem</type>
+            <multiplicity>*</multiplicity>
+          </association>
+          <identifier>true</identifier>
+        </field>
+        <field xml.associationTagName="item">
+          <name>breadcrumbs</name>
+          <description>A list of breadcrumbs to display in the navigation.</description>
+          <version>1.0.0</version>
+          <association>
+            <type>LinkItem</type>
+            <multiplicity>*</multiplicity>
+            <identifier>true</identifier>
+          </association>
+          <identifier>true</identifier>
+        </field>
+        <field xml.listStyle="flat">
+          <name>menus</name>
+          <description>Menus to include in the navigation.</description>
+          <version>1.0.0</version>
+          <association>
+            <type>Menu</type>
+            <multiplicity>*</multiplicity>
+          </association>
+          <identifier>true</identifier>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>LinkItem</name>
+      <description>A link in the navigation.</description>
+      <version>1.0.0</version>
+      <fields>
+        <field xml.attribute="true">
+          <name>name</name>
+          <description>The name to use for the link.</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.attribute="true">
+          <name>href</name>
+          <description>The href to use for the link.</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Menu</name>
+      <description>A menu in the navigation.</description>
+      <version>1.0.0</version>
+      <fields>
+        <field xml.attribute="true">
+          <name>name</name>
+          <description>The name to use for the menu.</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.attribute="true">
+          <name>inherit</name>
+          <description>The way in which the menu is inherited.</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.attribute="true">
+          <name>inheritAsRef</name>
+          <description>If this is a reference, setting inheritAsRef means that it will be populated in the project,
+            whereas if it is false it is populated in the parent and then inherited.</description>
+          <version>1.0.0</version>
+          <type>boolean</type>
+        </field>
+        <field xml.attribute="true">
+          <name>ref</name>
+          <description><![CDATA[A reference to a pre-defined menu, such as a <code>reports</code>, <code>modules</code>
+          or <code>parentProject</code>.]]></description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.attribute="true">
+          <name>img</name>
+          <description>Image href.</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.listStyle="flat">
+          <name>items</name>
+          <description>Menu item.</description>
+          <version>1.0.0</version>
+          <association>
+            <type>MenuItem</type>
+            <multiplicity>*</multiplicity>
+          </association>
+          <identifier>true</identifier>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>MenuItem</name>
+      <description>A menu item.</description>
+      <version>1.0.0</version>
+      <superClass>LinkItem</superClass>
+      <fields>
+        <field>
+          <name>description</name>
+          <description>A description of the menu item. This is used on any summary pages for a menu.</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.attribute="true">
+          <name>collapse</name>
+          <description>Whether the item is collapsed by default when it has children elements.</description>
+          <version>1.0.0</version>
+          <type>boolean</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.attribute="true">
+          <name>ref</name>
+          <description><![CDATA[A reference to a pre-defined menu item, such as a report (specified by the report goal
+          name). Any elements explicitly given override those from the pre-defined reference.]]></description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.listStyle="flat">
+          <name>items</name>
+          <description>Menu item.</description>
+          <version>1.0.0</version>
+          <association>
+            <type>MenuItem</type>
+            <multiplicity>*</multiplicity>
+          </association>
+          <identifier>true</identifier>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Skin</name>
+      <description>An skin artifact declaration</description>
+      <version>1.0.0</version>
+      <fields>
+        <field>
+          <name>groupId</name>
+          <description>The group ID</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <required>true</required>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>artifactId</name>
+          <description>The artifact ID</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <required>true</required>
+          <identifier>true</identifier>
+        </field>
+        <field>
+          <name>version</name>
+          <description>The version</description>
+          <version>1.0.0</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+      </fields>
+      <codeSegments>
+        <codeSegment>
+          <version>1.0.0</version>
+          <code>
+            <![CDATA[
+    public static Skin getDefaultSkin()
+    {
+        Skin skin = new Skin();
+        skin.setGroupId( "org.apache.maven.skins" );
+        skin.setArtifactId( "maven-default-skin" );
+        return skin;
+    }
+            ]]>
+          </code>
+        </codeSegment>
+      </codeSegments>
+    </class>
+-->
+  </classes>
+</model>

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/java/org/apache/maven/doxia/book/BookRendererTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/java/org/apache/maven/doxia/book/BookRendererTest.java?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/java/org/apache/maven/doxia/book/BookRendererTest.java (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/java/org/apache/maven/doxia/book/BookRendererTest.java Sun Jun 25 03:50:10 2006
@@ -0,0 +1,31 @@
+package org.apache.maven.doxia.book;
+
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.util.FileUtils;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class BookRendererTest
+    extends PlexusTestCase
+{
+    public void testBasic()
+        throws Exception
+    {
+        BookDoxia doxia = (BookDoxia) lookup( BookDoxia.ROLE );
+
+        File book1 = getTestFile( "src/test/resources/book-1.xml" );
+
+        File itextOutput = getTestFile( "target/book-1-itext" );
+        File xhtmlOutput = getTestFile( "target/book-1-xhtml" );
+
+        List files = FileUtils.getFiles( getTestFile( "src/test/resources/book-1" ), "**/*.apt, **/*.xml", "" );
+
+        doxia.renderBook( book1, "itext", files, itextOutput );
+//        doxia.renderBook( book1, "xhtml", files, xhtmlOutput );
+    }
+}

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1.xml
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1.xml?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1.xml (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1.xml Sun Jun 25 03:50:10 2006
@@ -0,0 +1,29 @@
+<book>
+  <id>plexus-user-guide</id>
+  <chapters>
+    <chapter>
+      <id>chapter-1</id>
+      <title>Chapter 1</title>
+      <sections>
+        <section>
+          <id>section-1</id>
+        </section>
+        <section>
+          <id>section-2</id>
+        </section>
+      </sections>
+    </chapter>
+    <chapter>
+      <id>chapter-2</id>
+      <title>Chapter 2</title>
+      <sections>
+        <section>
+          <id>section-3</id>
+        </section>
+        <section>
+          <id>section-4</id>
+        </section>
+      </sections>
+    </chapter>
+  </chapters>
+</book>

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-1.apt
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-1.apt?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-1.apt (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-1.apt Sun Jun 25 03:50:10 2006
@@ -0,0 +1,54 @@
+ -----
+ Section 1
+ -----
+ Trygve
+ -----
+
+Paragraph 1
+
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec sagittis malesuada nisi. Aliquam orci eros, vestibulum
+ eu, placerat et, pretium sed, nisi. Proin consequat. Praesent faucibus sem id arcu hendrerit nonummy. Aliquam blandit
+ accumsan pede. Vivamus aliquet lacinia nunc. Praesent dapibus orci eu magna. Cras nonummy, pede nec facilisis semper,
+ sem nibh vestibulum massa, sed ornare tortor elit non lectus. Nullam mauris turpis, luctus et, vulputate vitae, commodo
+ sit amet, purus. Fusce erat. Proin ullamcorper imperdiet est. Morbi sit amet dui. Fusce bibendum auctor augue. Sed leo
+ sapien, vehicula ac, nonummy id, cursus at, nulla. Ut sed purus.
+
+Paragraph 2
+
+ Duis eget libero aliquet quam ultrices malesuada. Donec molestie dignissim nunc. Curabitur turpis. Suspendisse a nibh
+ ut elit vulputate ultrices. Etiam nulla erat, nonummy vel, fringilla at, scelerisque non, ante. Suspendisse adipiscing
+ rhoncus purus. Nulla in augue. Ut ac nisi eu nisi cursus elementum. Pellentesque habitant morbi tristique senectus et
+ netus et malesuada fames ac turpis egestas. Donec et turpis. Donec nec mi. Mauris malesuada congue sem. Maecenas et
+ urna in nisi sagittis facilisis. Cras nibh. Aliquam purus. Donec convallis congue libero. Nulla feugiat. Nulla massa
+ libero, consectetuer ac, aliquet ac, consequat eu, purus. Pellentesque eleifend pretium augue.
+
+Paragraph 3
+
+ Integer auctor, nisi ut convallis imperdiet, ligula diam sollicitudin dolor, porttitor mattis urna sapien at velit.
+ Fusce vestibulum, neque nec malesuada tempor, tortor nisi accumsan purus, quis faucibus metus elit ac urna. Aliquam
+ commodo velit vel ipsum. Donec blandit diam blandit eros. Aliquam pretium fermentum neque. Sed nec tellus eu orci
+ ullamcorper facilisis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
+ Nulla sed leo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Fusce
+ suscipit. Sed sit amet diam ac ante tincidunt ornare. Sed sodales vestibulum quam. Fusce accumsan. Ut ut mi.
+
+Paragraph 4
+
+ Maecenas tincidunt lobortis nunc. Phasellus euismod diam sit amet felis. Donec lorem metus, vulputate vitae, ornare
+ vel, molestie sit amet, pede. In erat velit, adipiscing sed, varius in, interdum cursus, enim. Quisque dolor ante,
+ tincidunt vel, congue eget, consectetuer id, nunc. Suspendisse hendrerit. Proin egestas, massa eget egestas
+ ullamcorper, nisl elit gravida magna, vitae dignissim odio velit ut tortor. Fusce lobortis consequat nulla.
+ Vestibulum pretium justo at metus. Sed lorem velit, elementum eget, pellentesque ac, ornare id, mi. Pellentesque vel
+ ligula et erat dictum commodo. Integer malesuada lacus nec metus. Aliquam id purus ac neque mattis venenatis. Aenean
+ lobortis accumsan massa. Donec dui ante, facilisis vel, hendrerit ut, vehicula in, eros. Suspendisse potenti. Sed
+ fringilla. Suspendisse vel nibh. Sed sit amet lacus quis massa tincidunt elementum. Ut ut augue vitae ligula dapibus
+ aliquam.
+
+Paragraph 5
+
+ Fusce non eros non lectus venenatis bibendum. Nullam pharetra. Nunc commodo pede et metus. Pellentesque habitant morbi
+ tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum imperdiet nisl nec nulla. Morbi congue
+ dictum pede. Aliquam ligula. In pede nulla, varius a, blandit ut, pulvinar vitae, mauris. Suspendisse sit amet magna.
+ Curabitur cursus placerat justo. Vivamus imperdiet magna commodo mi. Vestibulum eget metus quis sem sollicitudin
+ consectetuer. Morbi metus augue, elementum rutrum, luctus quis, porttitor a, est. Phasellus quis sapien et augue
+ adipiscing fermentum. Sed fermentum tristique dui. Vivamus aliquam, tortor at ultricies commodo, urna ipsum fringilla
+ neque, sit amet congue purus enim a justo.

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-2.apt
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-2.apt?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-2.apt (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-2.apt Sun Jun 25 03:50:10 2006
@@ -0,0 +1,10 @@
+Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC
+
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam,
+ eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
+ voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione
+ voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci
+ velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim
+ ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
+ consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur,
+ vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-3.apt
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-3.apt?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-3.apt (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-3.apt Sun Jun 25 03:50:10 2006
@@ -0,0 +1,11 @@
+1914 translation by H. Rackham
+
+ But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will
+ give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the
+ master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but
+ because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.
+ Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because
+ occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial
+ example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who
+ has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who
+ avoids a pain that produces no resultant pleasure?

Added: maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-4.apt
URL: http://svn.apache.org/viewvc/maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-4.apt?rev=417004&view=auto
==============================================================================
--- maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-4.apt (added)
+++ maven/doxia/trunk/doxia-sandbox/doxia-book/src/test/resources/book-1/section-4.apt Sun Jun 25 03:50:10 2006
@@ -0,0 +1,10 @@
+Section 1.10.33 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC
+
+ At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque
+ corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa
+ qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita
+ distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime
+ placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut
+ officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae.
+ Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut
+ perferendis doloribus asperiores repellat.



Mime
View raw message