santiagopg    2002/06/10 14:45:16

  Modified:    java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
  Log:
  Fixed problem in the implementation of setOutputProperties().
  
  Revision  Changes    Path
  1.44      +13 -7     
xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerImpl.java
  
  Index: TransformerImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerImpl.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- TransformerImpl.java      5 Jun 2002 11:32:59 -0000       1.43
  +++ TransformerImpl.java      10 Jun 2002 21:45:16 -0000      1.44
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: TransformerImpl.java,v 1.43 2002/06/05 11:32:59 tmiller Exp $
  + * @(#)$Id: TransformerImpl.java,v 1.44 2002/06/10 21:45:16 santiagopg Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -236,10 +236,10 @@
           }
   
        _tohFactory = TransletOutputHandlerFactory.newInstance();
  -     _tohFactory.setEncoding(_encoding);
  -
  -     // Is _method already set? TODO
  -     _tohFactory.setOutputMethod(_translet._method);
  +     _tohFactory.setEncoding(
  +         (String) _properties.getProperty(OutputKeys.ENCODING));
  +     _tohFactory.setOutputMethod(
  +         (String) _properties.getProperty(OutputKeys.METHOD));
   
        // Return the content handler for this Result object
        try {
  @@ -790,8 +790,14 @@
        * @throws IllegalArgumentException Never, errors are ignored
        */
       public void setOutputProperties(Properties properties)
  -     throws IllegalArgumentException {
  -     _properties.putAll(properties);
  +     throws IllegalArgumentException 
  +    {
  +     // Notice that _properties.putAll() will not copy default props
  +     final Enumeration propertyNames = properties.propertyNames();
  +     while (propertyNames.hasMoreElements()) {
  +         final String prop = (String) propertyNames.nextElement();
  +         _properties.setProperty(prop, (String) 
properties.getProperty(prop));
  +     }
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to