xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mk...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/trax TrAXFilter.java
Date Tue, 24 Jun 2003 13:26:59 GMT
mkwan       2003/06/24 06:26:59

  Modified:    java/src/org/apache/xalan/xsltc/trax TrAXFilter.java
  Log:
  Add a "public Transformer getTransformer()" method to XSLTC's TrAXFilter class.
  The Xalan TrAXFilter class already has such an interface.
  
  Revision  Changes    Path
  1.6       +12 -6     xml-xalan/java/src/org/apache/xalan/xsltc/trax/TrAXFilter.java
  
  Index: TrAXFilter.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TrAXFilter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TrAXFilter.java	30 Jan 2003 18:46:14 -0000	1.5
  +++ TrAXFilter.java	24 Jun 2003 13:26:59 -0000	1.6
  @@ -72,6 +72,7 @@
   import javax.xml.parsers.SAXParserFactory;
   import javax.xml.transform.ErrorListener;
   import javax.xml.transform.Templates;
  +import javax.xml.transform.Transformer;
   import javax.xml.transform.TransformerConfigurationException;
   import javax.xml.transform.sax.SAXResult;
   
  @@ -87,14 +88,19 @@
    */
   public class TrAXFilter extends XMLFilterImpl {
       private Templates              _templates;
  -    private TransformerHandlerImpl _transformer;
  +    private TransformerImpl	   _transformer;
  +    private TransformerHandlerImpl _transformerHandler;
   
       public TrAXFilter(Templates templates)  throws 
   	TransformerConfigurationException
       {
   	_templates = templates;
  -        _transformer = new TransformerHandlerImpl( 
  -		(TransformerImpl) templates.newTransformer());
  +	_transformer = (TransformerImpl) templates.newTransformer();
  +        _transformerHandler = new TransformerHandlerImpl(_transformer);
  +    }
  +    
  +    public Transformer getTransformer() {
  +        return _transformer;
       }
   
       private void createParent() throws SAXException {
  @@ -142,7 +148,7 @@
   
       public void setContentHandler (ContentHandler handler) 
       {
  -	_transformer.setResult(new SAXResult(handler));
  +	_transformerHandler.setResult(new SAXResult(handler));
   	if (getParent() == null) {
                   try {
                       createParent();
  @@ -151,7 +157,7 @@
                      return; 
                   }
   	}
  -	getParent().setContentHandler(_transformer);
  +	getParent().setContentHandler(_transformerHandler);
       }
   
       public void setErrorListener (ErrorListener handler) { }
  
  
  

---------------------------------------------------------------------
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