public String process(String to_process){
  if (to_process == null || to_process.length() == 0)   return "";
  String tmp="";
  StringTokenizer st=new StringTokenizer(to_process," ",true);
  StringBuffer newValue=new StringBuffer(to_process.length() + 50);
  while (st.hasMoreTokens()) {
    tmp=st.nextToken();
    if (hasAttribute(tmp))     newValue.append((String)get(tmp));
 else     newValue.append(tmp);
  }
  return newValue.toString();
}

public String process ( String to_process ) { if ( to_process == null || to_process . length ( ) == 0 ) return "" ; String tmp = "" ; StringTokenizer st = new StringTokenizer ( to_process , " " , true ) ; StringBuffer newValue = new StringBuffer ( to_process . length ( ) + 50 ) ; while ( st . hasMoreTokens ( ) ) { tmp = st . nextToken ( ) ; if ( hasAttribute ( tmp ) ) newValue . append ( ( String ) get ( tmp ) ) ; else newValue . append ( tmp ) ; } return newValue . toString ( ) ; }
this method actually performs the filtering .
