Author: hboutemy
Date: Sat Mar 25 21:59:56 2017
New Revision: 1788693

URL: http://svn.apache.org/viewvc?rev=1788693&view=rev
Log:
[DOXIA-544] set document tag on chapter header

Modified:
    
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.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=1788693&r1=1788692&r2=1788693&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
 Sat Mar 25 21:59:56 2017
@@ -262,7 +262,7 @@ public class FoAggregateSink
         }
         else
         {
-            writeStartTag( BLOCK_TAG, "id", docName );
+            writeStartTag( BLOCK_TAG, "" );
         }
 
     }
@@ -864,7 +864,16 @@ public class FoAggregateSink
      */
     protected void chapterHeading( String headerText, boolean chapterNumber )
     {
-        writeStartTag( BLOCK_TAG, "" );
+        if ( docName == null )
+        {
+            getLog().warn( "No document root specified, local links will not 
be resolved correctly!" );
+            writeStartTag( BLOCK_TAG, "" );
+        }
+        else
+        {
+            writeStartTag( BLOCK_TAG, "id", docName );
+        }
+
         writeStartTag( LIST_BLOCK_TAG, "" );
         writeStartTag( LIST_ITEM_TAG, "" );
         writeln( "<fo:list-item-label end-indent=\"6.375in\" 
start-indent=\"-1in\">" );


Reply via email to