avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mirceat...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/dom DefaultDOMHandler.java DefaultDOMHandlerFactory.java
Date Mon, 12 Aug 2002 21:08:35 GMT
mirceatoma    2002/08/12 14:08:35

  Modified:    xmlutil/src/java/org/apache/excalibur/xml/dom
                        DefaultDOMHandler.java
                        DefaultDOMHandlerFactory.java
  Log:
  Move DOMResult creation in DefaultDOMHandler.
  
  Revision  Changes    Path
  1.2       +7 -5      jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/dom/DefaultDOMHandler.java
  
  Index: DefaultDOMHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/dom/DefaultDOMHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultDOMHandler.java	6 Aug 2002 19:58:18 -0000	1.1
  +++ DefaultDOMHandler.java	12 Aug 2002 21:08:35 -0000	1.2
  @@ -21,21 +21,23 @@
       extends ContentHandlerWrapper
       implements DOMHandler
   {    
  -    private final DOMResult m_result;
  +    private final Document m_document;
       private final boolean m_ignoreWhitespaces;
       private final boolean m_ignoreComments;
       
  -    public DefaultDOMHandler( TransformerHandler handler, DOMResult result , boolean ignoreComments,
boolean ignoreWhitespaces )
  +    public DefaultDOMHandler( TransformerHandler handler, Document document, boolean ignoreComments,
boolean ignoreWhitespaces )
       {
           super( handler, handler );
  -        m_result = result;
  +        m_document = document;
           m_ignoreComments = ignoreComments;
           m_ignoreWhitespaces = ignoreWhitespaces;
  +        
  +        handler.setResult( new DOMResult( m_document ) );
       }
       
       public Document getDocument()
       {
  -        return (Document)m_result.getNode();
  +        return m_document;
       }
       
       public void ignorableWhitespace( final char[] ch, final int start, final int len )
  
  
  
  1.2       +2 -4      jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/dom/DefaultDOMHandlerFactory.java
  
  Index: DefaultDOMHandlerFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/xmlutil/src/java/org/apache/excalibur/xml/dom/DefaultDOMHandlerFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultDOMHandlerFactory.java	6 Aug 2002 19:58:18 -0000	1.1
  +++ DefaultDOMHandlerFactory.java	12 Aug 2002 21:08:35 -0000	1.2
  @@ -47,11 +47,9 @@
       public DOMHandler createDOMHandler() throws Exception
       {
           final Document document = m_documentBuilder.newDocument();
  -        final DOMResult result = new DOMResult( document );
           final TransformerHandler transformerHandler = m_transformerFactory.newTransformerHandler();
  -        transformerHandler.setResult( result );
           
  -        return new DefaultDOMHandler( transformerHandler, result, m_ignoreComments, m_ignoreWhitespaces
);
  +        return new DefaultDOMHandler( transformerHandler, document, m_ignoreComments, m_ignoreWhitespaces
);
       }        
           
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message