public void setParameters ( Properties params ) { clearParameters ( ) ; Enumeration names = params . propertyNames ( ) ; while ( names . hasMoreElements ( ) ) { String name = params . getProperty ( ( String ) names . nextElement ( ) ) ; StringTokenizer tokenizer = new StringTokenizer ( name , "{}" , false ) ; try { // The first string might be the namespace, or it might be // the local name, if the namespace is null. String s1 = tokenizer . nextToken ( ) ; String s2 = tokenizer . hasMoreTokens ( ) ? tokenizer . nextToken ( ) : null ; if ( null == s2 ) setParameter ( s1 , null , params . getProperty ( name ) ) ; else setParameter ( s2 , s1 , params . getProperty ( name ) ) ; } catch ( java . util . NoSuchElementException nsee ) { // Should throw some sort of an error. } } }
Set a bag of parameters for the transformation . Note that these will not be additive they will replace the existing set of parameters .