bgi = FileUtil.getAbsolutePath( rootPath, bgi );
if( FileUtil.isLocalResource( bgi ) ) { URL url = report.findResource( bgi, IResourceLocator.IMAGE ); if ( url != null ) { String fileName = url.getFile( ); if ( fileName != null ) { bgi = fileName; } } } else { bgi = "url(" + bgi + ")"; }
	public void execute( Element ele, HashMap styles)	{				StyleDeclaration style = null;		StringBuffer strStyle = new StringBuffer(); 				//FOR HTML 4.0 COMPATIBILITY		if ( "b".equals( ele.getTagName( ) ) ) //$NON-NLS-1$		{			appendStyle(strStyle, "font-weight", "bold");  //$NON-NLS-1$//$NON-NLS-2$			//Re-points to the element node in the tree			ele = replaceElement( ele, "span" ); //$NON-NLS-1$		}		else if ( "center".equals( ele.getTagName( ) ) ) //$NON-NLS-1$		{			appendStyle(strStyle, "text-align", "center");  //$NON-NLS-1$//$NON-NLS-2$			ele = replaceElement( ele, "div" ); //$NON-NLS-1$		}		else if ( "font".equals( ele.getTagName( ) ) ) //$NON-NLS-1$		{			appendStyle(strStyle, "color", ele.getAttribute( "color" )); //$NON-NLS-1$ //$NON-NLS-2$			appendStyle(strStyle, "font-family", ele.getAttribute( "face" ));  //$NON-NLS-1$//$NON-NLS-2$			if ( ele.hasAttribute( "size" ) ) //$NON-NLS-1$			{				try				{					//FIXME					int size = Integer.parseInt( ele.getAttribute( "size" ) ); //$NON-NLS-1$					appendStyle(strStyle, "font-size", FONT_SIZE[size - 1]); //$NON-NLS-1$				}				catch ( Exception e )				{				    logger.log(Level.SEVERE, "There is a invalid value for property SIZE of element FONT in the HTML." ); //$NON-NLS-1$				}			}			//Removes these attributes to avoid for being copied again.			ele.removeAttribute( "color" ); //$NON-NLS-1$			ele.removeAttribute( "face" ); //$NON-NLS-1$			ele.removeAttribute( "size" ); //$NON-NLS-1$			ele = replaceElement( ele, "span" ); //$NON-NLS-1$		}				try		{			String inlineStyle = ele.getAttribute("style"); //$NON-NLS-1$			if(null!=inlineStyle && !"".equals(inlineStyle)) //$NON-NLS-1$			{				strStyle.append(inlineStyle);			}			if(strStyle.length()>0)			{				style = (StyleDeclaration)cssEngine.parseStyleDeclaration(strStyle.toString());				styles.put(ele, style);			}					}		catch ( Exception e )		{			logger.log(Level.SEVERE,"The css statement is:" //$NON-NLS-1$					+ ele.getAttribute( "style" ), e ); //$NON-NLS-1$		}		ele.removeAttribute( "style" ); //$NON-NLS-1$				//handle background image		if(style!=null)		{						CSSValue value = (CSSValue)style.getProperty(StyleConstants.STYLE_BACKGROUND_IMAGE);			if(value!=null && value instanceof URIValue)			{				String bgi = ((URIValue)value).getStringValue();				if((null!=bgi )&&( !"".equals(bgi))) //$NON-NLS-1$				{					if ( FileUtil.isLocalResource( bgi ) )					{						bgi = FileUtil.getAbsolutePath( rootPath, bgi );					}					if ( bgi != null )					{						//Puts the modified URI of the resource						style.setBackgroundImage( bgi ); 					}					else					{						//If the resource does not exist, then removes this item.						style.removeProperty("background-image"); //$NON-NLS-1$					}				}			}		}					if(style!=null)		{			styles.put(ele, style);		}		//Walks on its children nodes recursively		for ( int i = 0; i < ele.getChildNodes( ).getLength( ); i++ )		{			Node child = ele.getChildNodes( ).item( i );			if ( child.getNodeType( ) == Node.ELEMENT_NODE )			{				execute( (Element) child, styles );			}		}	}