maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r1090154 - /maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/site/xdoc/usage.xml
Date Fri, 08 Apr 2011 08:11:28 GMT
Author: ltheussl
Date: Fri Apr  8 08:11:28 2011
New Revision: 1090154

URL: http://svn.apache.org/viewvc?rev=1090154&view=rev
Log:
ad DOXIA-403: correct embedded use documentation

Modified:
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/site/xdoc/usage.xml

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/site/xdoc/usage.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/site/xdoc/usage.xml?rev=1090154&r1=1090153&r2=1090154&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/site/xdoc/usage.xml (original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/site/xdoc/usage.xml Fri Apr
 8 08:11:28 2011
@@ -140,12 +140,15 @@ public class Apt2FO
 
       <p>
         To compile and run the following example,
-        you need the following jars on your classpath:
-        <code>doxia-core-1.1.1</code>, <code>doxia-module-fo-1.1.1</code>,
-        <code>doxia-sink-api-1.1.1</code>, <code>doxia-logging-api-1.1.1</code>,
-        <code>commons-configuration-1.4</code>, <code>commons-lang-2.4</code>,
-        <code>plexus-utils-1.5.8</code>, <code>commons-collections-3.2</code>,
-        <code>commons-logging-1.1.1</code>.
+        you need the following dependencies on your classpath
+        (numbers in brackets are tested versions).<br/>
+        Compile:
+        <code>doxia-core (1.1.4)</code>, <code>doxia-module-fo (1.1.1)</code>,
+        <code>doxia-sink-api (1.1.4)</code>, <code>doxia-logging-api (1.1.4)</code>.<br/>
+        Run:
+        <code>commons-configuration (1.6)</code>, <code>commons-lang (2.6)</code>,
+        <code>plexus-utils (2.0.5)</code>, <code>commons-collections (3.2.1)</code>,
+        <code>commons-logging (1.1.1)</code>.
       </p>
 
       <source>import java.io.File;
@@ -158,12 +161,16 @@ public class TestPDF
 {
     public static void main( String[] args )
     {
-        Sink sink = null;
+        FoSink sink = null;
 
         try
         {
-            sink = new FoSinkFactory().createSink( new File( "." ), "test.fo" );
+            sink = (FoSink) new FoSinkFactory()
+                .createSink( new File( "." ), "test.fo" );
+
+            sink.beginDocument();
             populateSink( sink );
+            sink.endDocument();
         }
         catch ( IOException ex )
         {
@@ -171,7 +178,10 @@ public class TestPDF
         }
         finally
         {
-            sink.close();
+            if ( sink != null )
+            {
+                sink.close();
+            }
         }
     }
 



Mime
View raw message