private static void convertToHTML40(AttributeSet from,MutableAttributeSet to){
  Enumeration keys=from.getAttributeNames();
  String value="";
  while (keys.hasMoreElements()) {
    Object key=keys.nextElement();
    if (key instanceof CSS.Attribute) {
      value=value + " " + key+ "="+ from.getAttribute(key)+ ";";
    }
 else {
      to.addAttribute(key,from.getAttribute(key));
    }
  }
  if (value.length() > 0) {
    to.addAttribute(HTML.Attribute.STYLE,value);
  }
}

private static void convertToHTML40 ( AttributeSet from , MutableAttributeSet to ) { Enumeration keys = from . getAttributeNames ( ) ; String value = "" ; while ( keys . hasMoreElements ( ) ) { Object key = keys . nextElement ( ) ; if ( key instanceof CSS . Attribute ) { value = value + " " + key + "=" + from . getAttribute ( key ) + ";" ; } else { to . addAttribute ( key , from . getAttribute ( key ) ) ; } } if ( value . length ( ) > 0 ) { to . addAttribute ( HTML . Attribute . STYLE , value ) ; } }
copies the given attributeset to a new set , converting any css attributes found to arguments of an html style attribute .
