You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by jo...@apache.org on 2005/08/06 07:53:03 UTC

cvs commit: xml-xalan/java/samples/extensions/sql/ext-connection ExternalConnection.java

johng       2005/08/05 22:53:03

  Modified:    java/samples/extensions/sql/ext-connection
                        ExternalConnection.java
  Log:
  
  PR: XALANJ-2183	
  Obtained from:
  Submitted by:	John Gentilin
  Reviewed by:	Yash Talwar
  CVS: ----------------------------------------------------------------------
  CVS: This fixed a problem with freeUnused connections
  
  Revision  Changes    Path
  1.8       +12 -2     xml-xalan/java/samples/extensions/sql/ext-connection/ExternalConnection.java
  
  Index: ExternalConnection.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/samples/extensions/sql/ext-connection/ExternalConnection.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ExternalConnection.java	28 Jul 2005 00:33:49 -0000	1.7
  +++ ExternalConnection.java	6 Aug 2005 05:53:03 -0000	1.8
  @@ -67,11 +67,21 @@
     // org.apache.xalan.transformer.TransformerImpl.
   	TransformerFactory tFactory = TransformerFactory.newInstance();
   
  +  // Grab the Name of the Stylesheet from the commad line
  +  if (args.length == 0)
  +  {
  +    System.out.println("You must provide the path and name to a stylesheet to process");
  +    System.exit(0);
  +  }
  +  
  +  String stylesheet = args[0];
  +  System.out.println("Transforming Stylesheet " + stylesheet);
  +  
   	// Use the TransformerFactory to instantiate a Transformer that will work with
   	// the stylesheet you specify. This method call also processes the stylesheet
     // into a compiled Templates object.
   	Transformer transformer = tFactory.newTransformer(
  -        new StreamSource("dbtest.xsl"));
  +        new StreamSource(stylesheet));
   
   	// For this transformation, all the required information is in the stylesheet, so generate 
     // a minimal XML source document for the input.
  
  
  

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