Author: ltheussl
Date: Sat May 23 05:49:46 2009
New Revision: 777802
URL: http://svn.apache.org/viewvc?rev=777802&view=rev
Log:
Implement all methods with SinkEventAttributes.
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/FoSink.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=777802&r1=777801&r2=777802&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 May 23 05:49:46 2009
@@ -102,6 +102,12 @@
/** {...@inheritdoc} */
public void head()
{
+ head( null );
+ }
+
+ /** {...@inheritdoc} */
+ public void head( SinkEventAttributes attributes )
+ {
ignoreText = true;
}
@@ -115,6 +121,12 @@
/** {...@inheritdoc} */
public void title()
{
+ title( null );
+ }
+
+ /** {...@inheritdoc} */
+ public void title( SinkEventAttributes attributes )
+ {
// ignored
}
@@ -127,6 +139,12 @@
/** {...@inheritdoc} */
public void author()
{
+ author( null );
+ }
+
+ /** {...@inheritdoc} */
+ public void author( SinkEventAttributes attributes )
+ {
// ignored
}
@@ -139,6 +157,12 @@
/** {...@inheritdoc} */
public void date()
{
+ date( null );
+ }
+
+ /** {...@inheritdoc} */
+ public void date( SinkEventAttributes attributes )
+ {
// ignored
}
@@ -151,6 +175,12 @@
/** {...@inheritdoc} */
public void body()
{
+ body( null );
+ }
+
+ /** {...@inheritdoc} */
+ public void body( SinkEventAttributes attributes )
+ {
chapter++;
resetSectionCounter();
@@ -277,11 +307,15 @@
super.figureGraphics( anchor, attributes );
}
-
-
/** {...@inheritdoc} */
public void anchor( String name )
{
+ anchor( name, null );
+ }
+
+ /** {...@inheritdoc} */
+ public void anchor( String name, SinkEventAttributes attributes )
+ {
if ( name == null )
{
throw new NullPointerException( "Anchor name cannot be null!" );
@@ -306,9 +340,14 @@
writeStartTag( INLINE_TAG, "id", anchor );
}
+ /** {...@inheritdoc} */
+ public void link( String name )
+ {
+ link( name, null );
+ }
/** {...@inheritdoc} */
- public void link( String name )
+ public void link( String name, SinkEventAttributes attributes )
{
if ( name == null )
{
@@ -732,7 +771,7 @@
writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "0.4in" );
writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "0.4in" );
writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "5in" ); // TODO
{$maxBodyWidth - 1.25}in
- writeStartTag( TABLE_BODY_TAG, "" );
+ writeStartTag( TABLE_BODY_TAG );
writeTocItems( toc.getItems(), 1 );
@@ -766,7 +805,7 @@
for ( int i = 0; i < level - 2; i++ )
{
writeStartTag( TABLE_CELL_TAG );
- writeEmptyTag( BLOCK_TAG, "" );
+ writeSimpleTag( BLOCK_TAG );
writeEndTag( TABLE_CELL_TAG );
}
}
@@ -836,7 +875,7 @@
return;
}
- writeStartTag( BOOKMARK_TREE_TAG, "" );
+ writeStartTag( BOOKMARK_TREE_TAG );
renderBookmarkItems( docModel.getToc().getItems() );
@@ -852,7 +891,7 @@
String ref = getIdName( tocItem.getRef() );
writeStartTag( BOOKMARK_TAG, "internal-destination", ref );
- writeStartTag( BOOKMARK_TITLE_TAG, "" );
+ writeStartTag( BOOKMARK_TITLE_TAG );
write( tocItem.getName() );
writeEndTag( BOOKMARK_TITLE_TAG );
@@ -927,7 +966,7 @@
writeln( "<fo:table table-layout=\"fixed\" width=\"100%\" >" );
writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "3.125in" );
writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "3.125in" );
- writeStartTag( TABLE_BODY_TAG, "" );
+ writeStartTag( TABLE_BODY_TAG );
writeCoverHead( compLogo, projLogo );
writeCoverBody( title, version, subtitle, type );
@@ -957,17 +996,17 @@
writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "2.083in" );
writeEmptyTag( TABLE_COLUMN_TAG, "column-width", "2.083in" );
- writeStartTag( TABLE_BODY_TAG, "" );
+ writeStartTag( TABLE_BODY_TAG );
- writeStartTag( TABLE_ROW_TAG, "" );
+ writeStartTag( TABLE_ROW_TAG );
writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", "3" );
- writeEmptyTag( BLOCK_TAG, "" );
+ writeSimpleTag( BLOCK_TAG );
writeEmptyTag( BLOCK_TAG, "space-before", "3.2235in" );
writeEndTag( TABLE_CELL_TAG );
writeEndTag( TABLE_ROW_TAG );
- writeStartTag( TABLE_ROW_TAG, "" );
- writeStartTag( TABLE_CELL_TAG, "" );
+ writeStartTag( TABLE_ROW_TAG );
+ writeStartTag( TABLE_CELL_TAG );
writeEmptyTag( BLOCK_TAG, "space-after", "0.5in" );
writeEndTag( TABLE_CELL_TAG );
@@ -979,9 +1018,9 @@
writeEndTag( TABLE_CELL_TAG );
writeEndTag( TABLE_ROW_TAG );
- writeStartTag( TABLE_ROW_TAG, "" );
- writeStartTag( TABLE_CELL_TAG, "" );
- writeEmptyTag( BLOCK_TAG, "" );
+ writeStartTag( TABLE_ROW_TAG );
+ writeStartTag( TABLE_CELL_TAG );
+ writeSimpleTag( BLOCK_TAG );
writeEndTag( TABLE_CELL_TAG );
@@ -1009,9 +1048,9 @@
writeEndTag( TABLE_CELL_TAG );
writeEndTag( TABLE_ROW_TAG );
- writeStartTag( TABLE_ROW_TAG, "" );
+ writeStartTag( TABLE_ROW_TAG );
writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", "2" );
- writeEmptyTag( BLOCK_TAG, "" );
+ writeSimpleTag( BLOCK_TAG );
writeEmptyTag( BLOCK_TAG, "space-before", "0.2in" );
writeEndTag( TABLE_CELL_TAG );
writeEndTag( TABLE_ROW_TAG );
@@ -1021,7 +1060,7 @@
{
writeStartTag( TABLE_ROW_TAG, "height", "0.3in" );
- writeStartTag( TABLE_CELL_TAG, "" );
+ writeStartTag( TABLE_CELL_TAG );
MutableAttributeSet att = getFoConfiguration().getAttributeSet(
"cover.subtitle" );
att.addAttribute( "height", "0.3in" );
att.addAttribute( "text-align", "left" );
@@ -1030,7 +1069,7 @@
writeEndTag( BLOCK_TAG );
writeEndTag( TABLE_CELL_TAG );
- writeStartTag( TABLE_CELL_TAG, "" );
+ writeStartTag( TABLE_CELL_TAG );
att = getFoConfiguration().getAttributeSet( "cover.subtitle" );
att.addAttribute( "height", "0.3in" );
att.addAttribute( "text-align", "right" );
@@ -1045,7 +1084,7 @@
private void writeCoverHead( String compLogo, String projLogo )
{
writeStartTag( TABLE_ROW_TAG, "height", "1.5in" );
- writeStartTag( TABLE_CELL_TAG, "" );
+ writeStartTag( TABLE_CELL_TAG );
if ( compLogo != null )
{
@@ -1059,9 +1098,9 @@
writeEndTag( BLOCK_TAG );
}
- writeEmptyTag( BLOCK_TAG, "" );
+ writeSimpleTag( BLOCK_TAG );
writeEndTag( TABLE_CELL_TAG );
- writeStartTag( TABLE_CELL_TAG, "" );
+ writeStartTag( TABLE_CELL_TAG );
if ( projLogo != null )
{
@@ -1075,7 +1114,7 @@
writeEndTag( BLOCK_TAG );
}
- writeEmptyTag( BLOCK_TAG, "" );
+ writeSimpleTag( BLOCK_TAG );
writeEndTag( TABLE_CELL_TAG );
writeEndTag( TABLE_ROW_TAG );
}
Modified:
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.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/FoSink.java?rev=777802&r1=777801&r2=777802&view=diff
==============================================================================
---
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
(original)
+++
maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
Sat May 23 05:49:46 2009
@@ -30,12 +30,12 @@
import javax.swing.text.html.HTML.Tag;
import org.apache.maven.doxia.sink.AbstractXmlSink;
-import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.doxia.sink.SinkEventAttributeSet;
import org.apache.maven.doxia.sink.SinkEventAttributes;
import org.apache.maven.doxia.sink.SinkUtils;
import org.apache.maven.doxia.util.DoxiaUtils;
import org.apache.maven.doxia.util.HtmlTools;
+
import org.codehaus.plexus.util.StringUtils;
/**
@@ -162,25 +162,37 @@
}
/** {...@inheritdoc} */
- public void head()
+ public void head( SinkEventAttributes attributes )
{
beginDocument();
startPageSequence( "0", null, null );
}
/** {...@inheritdoc} */
+ public void head()
+ {
+ head( null );
+ }
+
+ /** {...@inheritdoc} */
public void head_()
{
writeEOL();
}
/** {...@inheritdoc} */
- public void title()
+ public void title( SinkEventAttributes attributes )
{
writeStartTag( BLOCK_TAG, "doc.header.title" );
}
/** {...@inheritdoc} */
+ public void title()
+ {
+ title( null );
+ }
+
+ /** {...@inheritdoc} */
public void title_()
{
writeEndTag( BLOCK_TAG );
@@ -188,12 +200,18 @@
}
/** {...@inheritdoc} */
- public void author()
+ public void author( SinkEventAttributes attributes )
{
writeStartTag( BLOCK_TAG, "doc.header.author" );
}
/** {...@inheritdoc} */
+ public void author()
+ {
+ author( null );
+ }
+
+ /** {...@inheritdoc} */
public void author_()
{
writeEndTag( BLOCK_TAG );
@@ -201,12 +219,18 @@
}
/** {...@inheritdoc} */
- public void date()
+ public void date( SinkEventAttributes attributes )
{
writeStartTag( BLOCK_TAG, "doc.header.date" );
}
/** {...@inheritdoc} */
+ public void date()
+ {
+ date( null );
+ }
+
+ /** {...@inheritdoc} */
public void date_()
{
writeEndTag( BLOCK_TAG );
@@ -214,12 +238,18 @@
}
/** {...@inheritdoc} */
- public void body()
+ public void body( SinkEventAttributes attributes )
{
// noop
}
/** {...@inheritdoc} */
+ public void body()
+ {
+ body( null );
+ }
+
+ /** {...@inheritdoc} */
public void body_()
{
writeEOL();
@@ -247,129 +277,163 @@
}
/** {...@inheritdoc} */
- public void section1()
+ public void section( int level, SinkEventAttributes attributes )
{
- section++;
- subsection = 0;
- subsubsection = 0;
+ if ( level == SECTION_LEVEL_1 )
+ {
+ section++;
+ subsection = 0;
+ subsubsection = 0;
+ }
+ else if ( level == SECTION_LEVEL_2 )
+ {
+ subsection++;
+ subsubsection = 0;
+ }
+ else if ( level == SECTION_LEVEL_3 )
+ {
+ subsubsection++;
+ }
+
onSection();
}
/** {...@inheritdoc} */
+ public void section_( int level )
+ {
+ onSection_();
+ }
+
+ /** {...@inheritdoc} */
+ public void sectionTitle( int level, SinkEventAttributes attributes )
+ {
+ onSectionTitle( level );
+ }
+
+ /** {...@inheritdoc} */
+ public void sectionTitle_( int level )
+ {
+ onSectionTitle_();
+ }
+
+ /** {...@inheritdoc} */
+ public void section1()
+ {
+ section( SECTION_LEVEL_1, null );
+ }
+
+ /** {...@inheritdoc} */
public void sectionTitle1()
{
- onSectionTitle( Sink.SECTION_LEVEL_1 );
+ sectionTitle( SECTION_LEVEL_1, null );
}
/** {...@inheritdoc} */
public void sectionTitle1_()
{
- onSectionTitle_();
+ sectionTitle_( SECTION_LEVEL_1 );
}
/** {...@inheritdoc} */
public void section1_()
{
- onSection_();
+ section_( SECTION_LEVEL_1 );
}
/** {...@inheritdoc} */
public void section2()
{
- subsection++;
- subsubsection = 0;
- onSection();
+ section( SECTION_LEVEL_2, null );
}
/** {...@inheritdoc} */
public void sectionTitle2()
{
- onSectionTitle( Sink.SECTION_LEVEL_2 );
+ sectionTitle( SECTION_LEVEL_2, null );
}
/** {...@inheritdoc} */
public void sectionTitle2_()
{
- onSectionTitle_();
+ sectionTitle_( SECTION_LEVEL_2 );
}
/** {...@inheritdoc} */
public void section2_()
{
- onSection_();
+ section_( SECTION_LEVEL_2 );
}
/** {...@inheritdoc} */
public void section3()
{
- subsubsection++;
- onSection();
+ section( SECTION_LEVEL_3, null );
}
/** {...@inheritdoc} */
public void sectionTitle3()
{
- onSectionTitle( Sink.SECTION_LEVEL_3 );
+ sectionTitle( SECTION_LEVEL_3, null );
}
/** {...@inheritdoc} */
public void sectionTitle3_()
{
- onSectionTitle_();
+ sectionTitle_( SECTION_LEVEL_3 );
}
/** {...@inheritdoc} */
public void section3_()
{
- onSection_();
+ section_( SECTION_LEVEL_3 );
}
/** {...@inheritdoc} */
public void section4()
{
- onSection();
+ section( SECTION_LEVEL_4, null );
}
/** {...@inheritdoc} */
public void sectionTitle4()
{
- onSectionTitle( Sink.SECTION_LEVEL_4 );
+ sectionTitle( SECTION_LEVEL_4, null );
}
/** {...@inheritdoc} */
public void sectionTitle4_()
{
- onSectionTitle_();
+ sectionTitle_( SECTION_LEVEL_4 );
}
/** {...@inheritdoc} */
public void section4_()
{
- onSection_();
+ section_( SECTION_LEVEL_4 );
}
/** {...@inheritdoc} */
public void section5()
{
- onSection();
+ section( SECTION_LEVEL_5, null );
}
/** {...@inheritdoc} */
public void sectionTitle5()
{
- onSectionTitle( Sink.SECTION_LEVEL_5 );
+ sectionTitle( SECTION_LEVEL_5, null );
}
/** {...@inheritdoc} */
public void sectionTitle5_()
{
- onSectionTitle_();
+ sectionTitle_( SECTION_LEVEL_5 );
}
/** {...@inheritdoc} */
public void section5_()
{
- onSection_();
+ section_( SECTION_LEVEL_5 );
}
/** Starts a section/subsection. */
@@ -391,25 +455,25 @@
title.append( getChapterString() );
writeEOL();
- if ( depth == Sink.SECTION_LEVEL_1 )
+ if ( depth == SECTION_LEVEL_1 )
{
writeStartTag( BLOCK_TAG, "body.h1" );
title.append( section ).append( " " );
}
- else if ( depth == Sink.SECTION_LEVEL_2 )
+ else if ( depth == SECTION_LEVEL_2 )
{
writeStartTag( BLOCK_TAG, "body.h2" );
title.append( section ).append( "." );
title.append( subsection ).append( " " );
}
- else if ( depth == Sink.SECTION_LEVEL_3 )
+ else if ( depth == SECTION_LEVEL_3 )
{
writeStartTag( BLOCK_TAG, "body.h3" );
title.append( section ).append( "." );
title.append( subsection ).append( "." );
title.append( subsubsection ).append( " " );
}
- else if ( depth == Sink.SECTION_LEVEL_4 )
+ else if ( depth == SECTION_LEVEL_4 )
{
writeStartTag( BLOCK_TAG, "body.h4" );
}
@@ -460,13 +524,19 @@
// -----------------------------------------------------------------------
/** {...@inheritdoc} */
- public void list()
+ public void list( SinkEventAttributes attributes )
{
writeEOL();
writeStartTag( LIST_BLOCK_TAG, "list" );
}
/** {...@inheritdoc} */
+ public void list()
+ {
+ list( null );
+ }
+
+ /** {...@inheritdoc} */
public void list_()
{
writeEndTag( LIST_BLOCK_TAG );
@@ -474,7 +544,7 @@
}
/** {...@inheritdoc} */
- public void listItem()
+ public void listItem( SinkEventAttributes attributes )
{
writeStartTag( LIST_ITEM_TAG, "list.item" );
writeStartTag( LIST_ITEM_LABEL_TAG );
@@ -489,6 +559,12 @@
}
/** {...@inheritdoc} */
+ public void listItem()
+ {
+ listItem( null );
+ }
+
+ /** {...@inheritdoc} */
public void listItem_()
{
writeEndTag( BLOCK_TAG );
@@ -500,7 +576,7 @@
}
/** {...@inheritdoc} */
- public void numberedList( int numbering )
+ public void numberedList( int numbering, SinkEventAttributes attributes )
{
listStack.push( new NumberedListItem( numbering ) );
writeEOL();
@@ -508,6 +584,12 @@
}
/** {...@inheritdoc} */
+ public void numberedList( int numbering )
+ {
+ numberedList( numbering, null );
+ }
+
+ /** {...@inheritdoc} */
public void numberedList_()
{
listStack.pop();
@@ -516,15 +598,17 @@
}
/** {...@inheritdoc} */
- public void numberedListItem()
+ public void numberedListItem( SinkEventAttributes attributes )
{
NumberedListItem current = (NumberedListItem) listStack.peek();
current.next();
writeStartTag( LIST_ITEM_TAG, "list.item" );
- writeStartTag( LIST_ITEM_LABEL_TAG, "" );
- writeStartTag( BLOCK_TAG, "" );
+ writeEOL();
+ writeStartTag( LIST_ITEM_LABEL_TAG );
+ writeEOL();
+ writeStartTag( BLOCK_TAG );
write( current.getListItemSymbol() );
writeEndTag( BLOCK_TAG );
writeEOL();
@@ -532,7 +616,14 @@
writeEOL();
writeStartTag( LIST_ITEM_BODY_TAG, "list.item" );
- writeStartTag( BLOCK_TAG, "" );
+ writeEOL();
+ writeStartTag( BLOCK_TAG );
+ }
+
+ /** {...@inheritdoc} */
+ public void numberedListItem()
+ {
+ numberedListItem( null );
}
/** {...@inheritdoc} */
@@ -547,13 +638,19 @@
}
/** {...@inheritdoc} */
- public void definitionList()
+ public void definitionList( SinkEventAttributes attributes )
{
writeEOL();
writeStartTag( BLOCK_TAG, "dl" );
}
/** {...@inheritdoc} */
+ public void definitionList()
+ {
+ definitionList( null );
+ }
+
+ /** {...@inheritdoc} */
public void definitionList_()
{
writeEndTag( BLOCK_TAG );
@@ -561,24 +658,36 @@
}
/** {...@inheritdoc} */
- public void definitionListItem()
+ public void definitionListItem( SinkEventAttributes attributes )
{
// nop
}
/** {...@inheritdoc} */
+ public void definitionListItem()
+ {
+ definitionListItem( null );
+ }
+
+ /** {...@inheritdoc} */
public void definitionListItem_()
{
// nop
}
/** {...@inheritdoc} */
- public void definedTerm()
+ public void definedTerm( SinkEventAttributes attributes )
{
writeStartTag( BLOCK_TAG, "dt" );
}
/** {...@inheritdoc} */
+ public void definedTerm()
+ {
+ definedTerm( null );
+ }
+
+ /** {...@inheritdoc} */
public void definedTerm_()
{
writeEndTag( BLOCK_TAG );
@@ -586,13 +695,19 @@
}
/** {...@inheritdoc} */
- public void definition()
+ public void definition( SinkEventAttributes attributes )
{
writeEOL();
writeStartTag( BLOCK_TAG, "dd" );
}
/** {...@inheritdoc} */
+ public void definition()
+ {
+ definition( null );
+ }
+
+ /** {...@inheritdoc} */
public void definition_()
{
writeEndTag( BLOCK_TAG );
@@ -600,7 +715,7 @@
}
/** {...@inheritdoc} */
- public void figure()
+ public void figure( SinkEventAttributes attributes )
{
this.inFigure = true;
writeEOL();
@@ -608,6 +723,12 @@
}
/** {...@inheritdoc} */
+ public void figure()
+ {
+ figure( null );
+ }
+
+ /** {...@inheritdoc} */
public void figure_()
{
this.inFigure = false;
@@ -652,12 +773,18 @@
}
/** {...@inheritdoc} */
- public void figureCaption()
+ public void figureCaption( SinkEventAttributes attributes )
{
writeStartTag( BLOCK_TAG, "figure.caption" );
}
/** {...@inheritdoc} */
+ public void figureCaption()
+ {
+ figureCaption( null );
+ }
+
+ /** {...@inheritdoc} */
public void figureCaption_()
{
writeEndTag( BLOCK_TAG );
@@ -692,9 +819,18 @@
}
/** {...@inheritdoc} */
- public void verbatim( boolean boxed )
+ public void verbatim( SinkEventAttributes attributes )
{
this.verbatim = true;
+
+ boolean boxed = false;
+
+ if ( attributes != null && attributes.isDefined(
SinkEventAttributes.DECORATION ) )
+ {
+ boxed =
+ "boxed".equals( attributes.getAttribute(
SinkEventAttributes.DECORATION ).toString() );
+ }
+
if ( boxed )
{
writeStartTag( BLOCK_TAG, "body.source" );
@@ -706,6 +842,12 @@
}
/** {...@inheritdoc} */
+ public void verbatim( boolean boxed )
+ {
+ verbatim( boxed ? SinkEventAttributeSet.BOXED : null );
+ }
+
+ /** {...@inheritdoc} */
public void verbatim_()
{
this.verbatim = false;
@@ -714,7 +856,7 @@
}
/** {...@inheritdoc} */
- public void horizontalRule()
+ public void horizontalRule( SinkEventAttributes attributes )
{
writeEOL();
writeEOL();
@@ -725,6 +867,12 @@
}
/** {...@inheritdoc} */
+ public void horizontalRule()
+ {
+ horizontalRule( null );
+ }
+
+ /** {...@inheritdoc} */
public void pageBreak()
{
writeEmptyTag( BLOCK_TAG, "break-before", "page" );
@@ -732,7 +880,7 @@
}
/** {...@inheritdoc} */
- public void table()
+ public void table( SinkEventAttributes attributes )
{
writeEOL();
writeStartTag( BLOCK_TAG, "table.padding" );
@@ -744,6 +892,12 @@
}
/** {...@inheritdoc} */
+ public void table()
+ {
+ table( null );
+ }
+
+ /** {...@inheritdoc} */
public void table_()
{
String content = tempWriter.toString();
@@ -797,7 +951,8 @@
this.tableGrid = grid;
this.cellJustif = justification;
this.isCellJustif = true;
- writeStartTag( TABLE_BODY_TAG, "" );
+ writeEOL();
+ writeStartTag( TABLE_BODY_TAG );
}
/** {...@inheritdoc} */
@@ -810,7 +965,7 @@
}
/** {...@inheritdoc} */
- public void tableRow()
+ public void tableRow( SinkEventAttributes attributes )
{
// TODO spacer rows
writeStartTag( TABLE_ROW_TAG, "table.body.row" );
@@ -818,6 +973,12 @@
}
/** {...@inheritdoc} */
+ public void tableRow()
+ {
+ tableRow( null );
+ }
+
+ /** {...@inheritdoc} */
public void tableRow_()
{
writeEndTag( TABLE_ROW_TAG );
@@ -825,12 +986,18 @@
}
/** {...@inheritdoc} */
- public void tableCell()
+ public void tableCell( SinkEventAttributes attributes )
{
tableCell( false );
}
/** {...@inheritdoc} */
+ public void tableCell()
+ {
+ tableCell( (SinkEventAttributes) null );
+ }
+
+ /** {...@inheritdoc} */
public void tableCell( String width )
{
// TODO: fop can't handle cell width
@@ -838,12 +1005,18 @@
}
/** {...@inheritdoc} */
- public void tableHeaderCell()
+ public void tableHeaderCell( SinkEventAttributes attributes )
{
tableCell( true );
}
/** {...@inheritdoc} */
+ public void tableHeaderCell()
+ {
+ tableHeaderCell( (SinkEventAttributes) null );
+ }
+
+ /** {...@inheritdoc} */
public void tableHeaderCell( String width )
{
// TODO: fop can't handle cell width
@@ -863,13 +1036,13 @@
{
switch ( cellJustif[Math.min( cellCount, cellJustif.length - 1 )]
)
{
- case Sink.JUSTIFY_LEFT:
+ case JUSTIFY_LEFT:
justif = "left";
break;
- case Sink.JUSTIFY_RIGHT:
+ case JUSTIFY_RIGHT:
justif = "right";
break;
- case Sink.JUSTIFY_CENTER:
+ case JUSTIFY_CENTER:
default:
justif = "center";
break;
@@ -924,7 +1097,7 @@
}
/** {...@inheritdoc} */
- public void tableCaption()
+ public void tableCaption( SinkEventAttributes attributes )
{
// <fo:table-caption> is XSL-FO 1.0 standard but not implemented in
FOP 0.95
//writeStartTag( TABLE_CAPTION_TAG );
@@ -934,6 +1107,12 @@
}
/** {...@inheritdoc} */
+ public void tableCaption()
+ {
+ tableCaption( null );
+ }
+
+ /** {...@inheritdoc} */
public void tableCaption_()
{
// <fo:table-caption> is XSL-FO 1.0 standard but not implemented in
FOP 0.95
@@ -941,7 +1120,7 @@
}
/** {...@inheritdoc} */
- public void anchor( String name )
+ public void anchor( String name, SinkEventAttributes attributes )
{
if ( name == null )
{
@@ -963,13 +1142,19 @@
}
/** {...@inheritdoc} */
+ public void anchor( String name )
+ {
+ anchor( name, null );
+ }
+
+ /** {...@inheritdoc} */
public void anchor_()
{
writeEndTag( INLINE_TAG );
}
/** {...@inheritdoc} */
- public void link( String name )
+ public void link( String name, SinkEventAttributes attributes )
{
if ( name == null )
{
@@ -1008,6 +1193,12 @@
}
/** {...@inheritdoc} */
+ public void link( String name )
+ {
+ link( name, null );
+ }
+
+ /** {...@inheritdoc} */
public void link_()
{
writeEndTag( INLINE_TAG );
@@ -1051,7 +1242,7 @@
}
/** {...@inheritdoc} */
- public void lineBreak()
+ public void lineBreak( SinkEventAttributes attributes )
{
writeEOL();
writeEOL();
@@ -1059,18 +1250,30 @@
}
/** {...@inheritdoc} */
+ public void lineBreak()
+ {
+ lineBreak( null );
+ }
+
+ /** {...@inheritdoc} */
public void nonBreakingSpace()
{
write( " " );
}
/** {...@inheritdoc} */
- public void text( String text )
+ public void text( String text, SinkEventAttributes attributes )
{
content( text );
}
/** {...@inheritdoc} */
+ public void text( String text )
+ {
+ text( text, null );
+ }
+
+ /** {...@inheritdoc} */
public void rawText( String text )
{
write( text );
@@ -1115,6 +1318,18 @@
getLog().warn( "Unknown Sink event in FoSink: " + name + ", ignoring!"
);
}
+ /** {...@inheritdoc} */
+ public void comment( String comment )
+ {
+ StringBuffer buf = new StringBuffer( comment.length() + 9 );
+
+ buf.append( LESS_THAN ).append( BANG ).append( MINUS ).append( MINUS
).append( SPACE );
+ buf.append( comment );
+ buf.append( SPACE ).append( MINUS ).append( MINUS ).append(
GREATER_THAN );
+
+ write( buf.toString() );
+ }
+
/**
* Writes the beginning of a FO document.
*/