xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bha...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java
Date Thu, 13 May 2004 23:34:12 GMT
bhakti      2004/05/13 16:34:12

  Modified:    java/src/org/apache/xalan/xsltc/runtime
                        AbstractTranslet.java
  Log:
  In xsltc currently with the extension redirect the output file is created only if the parent
dir exists. Making the behaviour similar to that of xalan wherein the parent directory is
also created.
  
  Revision  Changes    Path
  1.53      +8 -1      xml-xalan/java/src/org/apache/xalan/xsltc/runtime/AbstractTranslet.java
  
  Index: AbstractTranslet.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/AbstractTranslet.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- AbstractTranslet.java	16 Feb 2004 22:55:55 -0000	1.52
  +++ AbstractTranslet.java	13 May 2004 23:34:12 -0000	1.53
  @@ -19,6 +19,7 @@
   
   package org.apache.xalan.xsltc.runtime;
   
  +import java.io.File;
   import java.io.FileWriter;
   import java.text.DecimalFormat;
   import java.text.DecimalFormatSymbols;
  @@ -527,6 +528,12 @@
   	try {
   	    final TransletOutputHandlerFactory factory 
   		= TransletOutputHandlerFactory.newInstance();
  +
  +            String dirStr = new File(filename).getParent();
  +            if ((null != dirStr) && (dirStr.length() > 0)) {
  +               File dir = new File(dirStr);
  +               dir.mkdirs();
  +            }
   
   	    factory.setEncoding(_encoding);
   	    factory.setOutputMethod(_method);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message