svn commit: r578775 - in /maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo: ./ pom.xml

2007-09-24 Thread ltheussl
Author: ltheussl
Date: Mon Sep 24 05:09:36 2007
New Revision: 578775

URL: http://svn.apache.org/viewvc?rev=578775&view=rev
Log:
Promote the fo module: 
http://www.nabble.com/-vote--promote-doxia-module-fo-tf4488008s177.html

Added:
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/
  - copied from r578664, maven/sandbox/trunk/doxia/doxia-module-fo/
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/pom.xml
  - copied unchanged from r578709, 
maven/sandbox/trunk/doxia/doxia-module-fo/pom.xml



svn commit: r578786 - /maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/pom.xml

2007-09-24 Thread ltheussl
Author: ltheussl
Date: Mon Sep 24 05:27:45 2007
New Revision: 578786

URL: http://svn.apache.org/viewvc?rev=578786&view=rev
Log:
Adjust to new environment

Modified:
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/pom.xml

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/pom.xml?rev=578786&r1=578785&r2=578786&view=diff
==
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/pom.xml Mon Sep 24 
05:27:45 2007
@@ -21,17 +21,14 @@
 
 http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
   
-doxia
+doxia-modules
 org.apache.maven.doxia
 1.0-beta-1-SNAPSHOT
   
   4.0.0
   doxia-module-fo
   Doxia :: FO Module
-
-  
-1.0-beta-1-SNAPSHOT
-  
+  A Doxia module for FO (Formatting Objects) source 
documents.
 
   
 
@@ -48,18 +45,8 @@
   
 
   org.apache.maven.doxia
-  doxia-core
-  ${doxiaVersion}
-
-
-  org.apache.maven.doxia
-  doxia-sink-api
-  ${doxiaVersion}
-
-
-  org.apache.maven.doxia
   doxia-doc-renderer
-  ${doxiaVersion}
+  ${projectVersion}
 
 
   commons-configuration
@@ -70,20 +57,6 @@
   org.apache.xmlgraphics
   fop
   0.93
-
-
-
-  junit
-  junit
-  3.8.1
-  test
-
-
-  org.apache.maven.doxia
-  doxia-core
-  ${doxiaVersion}
-  tests
-  test
 
   
   




svn commit: r578816 - in /maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src: main/java/org/apache/maven/doxia/module/fo/ test/java/org/apache/maven/doxia/module/fo/

2007-09-24 Thread ltheussl
Author: ltheussl
Date: Mon Sep 24 07:09:57 2007
New Revision: 578816

URL: http://svn.apache.org/viewvc?rev=578816&view=rev
Log:
Add pdf bookmarks

Modified:

maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java

maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoMarkup.java

maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java

maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoSinkTest.java

Modified: 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java?rev=578816&r1=578815&r2=578816&view=diff
==
--- 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java
 (original)
+++ 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java
 Mon Sep 24 07:09:57 2007
@@ -26,6 +26,7 @@
 import javax.swing.text.html.HTML.Tag;
 
 import org.apache.maven.doxia.docrenderer.document.DocumentMeta;
+import org.apache.maven.doxia.docrenderer.document.DocumentModel;
 import org.apache.maven.doxia.docrenderer.document.DocumentTOC;
 import org.apache.maven.doxia.docrenderer.document.DocumentTOCItem;
 import org.apache.maven.doxia.util.HtmlTools;
@@ -39,6 +40,8 @@
  */
 public class FoAggregateSink extends FoSink
 {
+/** The document model to be used by this sink. */
+private DocumentModel docModel;
 
 /** Counts the current chapter level. */
 private int chapter = 0;
@@ -171,6 +174,17 @@
 }
 
 /**
+ * Sets the DocumentModel to be used by this sink. The DocumentModel 
provides all the meta-information
+ * required to render a document, eg settings for the cover page, table of 
contents, etc.
+ *
+ * @param model the DocumentModel.
+ */
+public void setDocumentModel( DocumentModel model )
+{
+this.docModel = model;
+}
+
+/**
  * Translates the given name to a usable id.
  * Prepends "./" and strips any extension.
  *
@@ -579,12 +593,22 @@
 }
 
 /**
- * Writes a table of contents.
- *
- * @param toc The DocumentTOC object that contains all information for the 
table of contents.
+ * Writes a table of contents. The DocumentModel has to contain a 
DocumentTOC for this to work.
  */
-public void toc( DocumentTOC toc )
+public void toc()
 {
+if ( this.docModel == null )
+{
+return;
+}
+
+DocumentTOC toc = docModel.getToc();
+
+if ( toc == null )
+{
+return;
+}
+
 writeln( "" );
 regionBefore( toc.getName() );
 regionAfter( getFooterText() );
@@ -636,12 +660,61 @@
 }
 
 /**
- * Writes a cover page.
- *
- * @param meta The DocumentMeta object that contains all information for 
the cover page.
+ * Writes a fo:bookmark-tree. The DocumentModel has to contain a 
DocumentTOC for this to work.
+ */
+protected void pdfBookmarks()
+{
+if ( this.docModel == null )
+{
+return;
+}
+
+DocumentTOC toc = docModel.getToc();
+
+if ( toc == null )
+{
+return;
+}
+
+writeStartTag( BOOKMARK_TREE_TAG, "" );
+
+for ( Iterator k = toc.getItems().iterator(); k.hasNext(); )
+{
+DocumentTOCItem tocItem = (DocumentTOCItem) k.next();
+
+String ref = getIdName( tocItem.getRef() );
+
+writeStartTag( BOOKMARK_TAG, "internal-destination", ref );
+
+writeStartTag( BOOKMARK_TITLE_TAG, "" );
+
+write( tocItem.getName() );
+
+writeEndTag( BOOKMARK_TITLE_TAG );
+
+writeEndTag( BOOKMARK_TAG );
+}
+
+writeEndTag( BOOKMARK_TREE_TAG );
+}
+
+/**
+ * Writes a cover page. The DocumentModel has to contain a DocumentMeta 
for this to work.
  */
-public void coverPage( DocumentMeta meta )
+public void coverPage()
 {
+if ( this.docModel == null )
+{
+return;
+}
+
+DocumentMeta meta = docModel.getMeta();
+
+if ( meta == null )
+{
+return;
+}
+
 String title = meta.getTitle();
 String author = meta.getAuthor();
 

Modified: 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoMarkup.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java

svn commit: r578889 - /maven/doxia/doxia/trunk/doxia-modules/pom.xml

2007-09-24 Thread ltheussl
Author: ltheussl
Date: Mon Sep 24 10:53:07 2007
New Revision: 578889

URL: http://svn.apache.org/viewvc?rev=578889&view=rev
Log:
Add fo to modules

Modified:
maven/doxia/doxia/trunk/doxia-modules/pom.xml

Modified: maven/doxia/doxia/trunk/doxia-modules/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/pom.xml?rev=578889&r1=57&r2=578889&view=diff
==
--- maven/doxia/doxia/trunk/doxia-modules/pom.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/pom.xml Mon Sep 24 10:53:07 2007
@@ -47,6 +47,7 @@
 doxia-module-itext
 doxia-module-apt
 doxia-module-fml
+doxia-module-fo
 doxia-module-latex
 doxia-module-rtf
 doxia-module-xdoc




svn propchange: r578418 - svn:log

2007-09-24 Thread vsiveton
Author: vsiveton
Revision: 578418
Modified property: svn:log

Modified: svn:log at Mon Sep 24 15:15:03 2007
--
--- svn:log (original)
+++ svn:log Mon Sep 24 15:15:03 2007
@@ -1 +1 @@
-o using the doxia:1.0-beta-1-SNAPSHOT instead of the release
+o using the doxia:1.0-beta-1-SNAPSHOT instead of the release (due to r577691)