if ( !hasStyle ) { hasStyle = true; writer.openTag( "style" ); writer.attribute( "type", "text/css" ); }
	public void startReport( Report report )	{		if ( logger.isTraceEnabled( ) )		{			logger.trace( "[HTMLReportEmitter] Start emitter." ); //$NON-NLS-1$		}		this.report = report;		OutputStream out = this.resourceManager.openOutputStream( REPORT_FILE );		writer.open( out, "UTF-8" ); //$NON-NLS-1$		writer.openTag( "!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"" ); //$NON-NLS-1$		writer.closeNoEndTag( );		writer.openTag( "html" ); //$NON-NLS-1$		writer.openTag( "META" ); //$NON-NLS-1$		writer.attribute( "http-equiv", "Content-Type" ); //$NON-NLS-1$		writer.attribute( "content", "text/html; charset=UTF-8" ); //$NON-NLS-1$		writer.closeNoEndTag( );		writer.openTag( "head" ); //$NON-NLS-1$		StyleDesign style;		boolean hasStyle = false;		StringBuffer styleBuffer = new StringBuffer( );		if ( report == null )		{			if ( logger.isWarnEnabled( ) )			{				logger.warn( "[HTMLReportEmitter] Report object is null." ); //$NON-NLS-1$			}		}		else		{			ArrayList styleList = new ArrayList( );			int styleNum = 0;			int m;			for ( int n = 0; n < report.getStyleCount( ); n++ )			{				styleBuffer.delete( 0, styleBuffer.capacity( ) );				style = report.getStyle( n );				if ( style != null )				{					if ( style.entrySet( ).size( ) == 0 )					{						styleNameMapping.put( style.getName( ), null );					}					else					{						StyleDesign tempStyle;						for ( m = 0; m < styleNum; m++ )						{							tempStyle = (StyleDesign) styleList.get( m );							if ( style.isSameStyle( tempStyle ) )							{								styleNameMapping.put( style.getName( ),										tempStyle.getName( ) );								break;							}						}						if ( m == styleNum )						{							AttributeBuilder.buildStyle( styleBuffer, style,									this );							if ( styleBuffer.length( ) > 0 )							{								styleList.add( style );								styleNum++;								styleNameMapping.put( style.getName( ), style										.getName( ) );								if ( !hasStyle )								{									hasStyle = true;									writer.openTag( "style" ); //$NON-NLS-1$									writer.attribute( "type", //$NON-NLS-1$											"text/css" ); //$NON-NLS-1$								}								writer.style( style.getName( ), styleBuffer										.toString( ) );							}							else							{								styleNameMapping.put( style.getName( ), null );							}						}					}				}			}		}		if ( hasStyle )		{			writer.closeTag( "style" ); //$NON-NLS-1$		}		writer.closeTag( "head" ); //$NON-NLS-1$	}