tmiller     01/12/11 12:46:13

  Modified:    java/src/org/apache/xalan/xsltc/trax
                        SmartTransformerFactoryImpl.java
  Log:
  look for xsltc specific attributes
  
  Revision  Changes    Path
  1.3       +29 -11    
xml-xalan/java/src/org/apache/xalan/xsltc/trax/SmartTransformerFactoryImpl.java
  
  Index: SmartTransformerFactoryImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/SmartTransformerFactoryImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SmartTransformerFactoryImpl.java  2001/12/11 16:25:56     1.2
  +++ SmartTransformerFactoryImpl.java  2001/12/11 20:46:13     1.3
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: SmartTransformerFactoryImpl.java,v 1.2 2001/12/11 16:25:56 
tmiller Exp $
  + * @(#)$Id: SmartTransformerFactoryImpl.java,v 1.3 2001/12/11 20:46:13 
tmiller Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -163,19 +163,38 @@
       }
   
       public Object getAttribute(String name) 
  -     throws IllegalArgumentException { 
  -     // GTM: look at name, if one of ours, get attr from xsltc fact
  -     // else default to xalan
  -     return _currFactory.getAttribute(name);
  +     throws IllegalArgumentException 
  +    {
  +     // GTM: NB: 'debug' should change to something more unique... 
  +     if ((name.equals("translet-name")) || (name.equals("debug"))) { 
  +         if (_xsltcFactory == null) {
  +                createXSLTCTransformerFactory();
  +            }
  +            return _xsltcFactory.getAttribute(name); 
  +        }
  +        else {
  +         if (_xalanFactory == null) {
  +             createXalanTransformerFactory();
  +         } 
  +         return _xalanFactory.getAttribute(name);
  +        }
       }
   
       public void setAttribute(String name, Object value) 
        throws IllegalArgumentException { 
  -     // GTM: look at name arg, if it is an xsltc attr (debug,defaulttransfor)
  -     // then create an xsltc factory and set attr
  -     // else default to xalan factory and set attr
  -     _xsltcFactory.setAttribute(name, value);
  -     _xalanFactory.setAttribute(name, value);
  +     // GTM: NB: 'debug' should change to something more unique... 
  +     if ((name.equals("translet-name")) || (name.equals("debug"))) { 
  +         if (_xsltcFactory == null) {
  +                createXSLTCTransformerFactory();
  +            }
  +            _xsltcFactory.setAttribute(name, value); 
  +        }
  +        else {
  +         if (_xalanFactory == null) {
  +             createXalanTransformerFactory();
  +         } 
  +         _xalanFactory.setAttribute(name, value);
  +        }
       }
   
       public boolean getFeature(String name) { 
  @@ -365,5 +384,4 @@
               throw e1;
           }
       }
  -
   }
  
  
  

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

Reply via email to