tmiller     01/06/27 11:46:41

  Modified:    java/src/org/apache/xalan/xsltc/trax
                        TransformerFactoryImpl.java
  Log:
  added a new sys property called 'transletPool'
  to allow user to set the destination directory for generated translets
  
  Revision  Changes    Path
  1.3       +14 -1     
xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java
  
  Index: TransformerFactoryImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TransformerFactoryImpl.java       2001/06/27 13:30:43     1.2
  +++ TransformerFactoryImpl.java       2001/06/27 18:46:40     1.3
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: TransformerFactoryImpl.java,v 1.2 2001/06/27 13:30:43 tmiller 
Exp $
  + * @(#)$Id: TransformerFactoryImpl.java,v 1.3 2001/06/27 18:46:40 tmiller 
Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -80,6 +80,7 @@
   
   import org.apache.xalan.xsltc.Translet;
   import org.apache.xalan.xsltc.compiler.XSLTC;
  +import org.apache.xalan.xsltc.compiler.CompilerException;
   import org.apache.xalan.xsltc.compiler.util.Util;
   import org.apache.xalan.xsltc.runtime.AbstractTranslet;
   
  @@ -254,6 +255,18 @@
       {
        XSLTC xsltc = new XSLTC();
        xsltc.init();
  +
  +     // check if destination has been set with system property
  +     String transletDestDir = System.getProperty("transletPool");
  +     if (transletDestDir != null) {
  +         try {
  +             xsltc.setDestDirectory(transletDestDir);
  +         } catch(CompilerException e)  {
  +             throw new TransformerConfigurationException(
  +                 "System property 'transletPool' was set to  " + 
  +                 transletDestDir + ", " + e );
  +         }
  +     }
   
           // compile stylesheet
           boolean isSuccessful = true;
  
  
  

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

Reply via email to