sboag       01/01/03 02:07:23

  Modified:    java/src/org/apache/xalan/transformer TransformerImpl.java
  Log:
  Register incoming DOMSource with source tree manager.  This fixes
  bug where relative URLs to the document tree weren't being processed
  correctly.
  Change the setProperties a bit to make sure the right defaults
  are being created.
  
  Revision  Changes    Path
  1.71      +16 -1     
xml-xalan/java/src/org/apache/xalan/transformer/TransformerImpl.java
  
  Index: TransformerImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TransformerImpl.java,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- TransformerImpl.java      2001/01/02 17:56:19     1.70
  +++ TransformerImpl.java      2001/01/03 10:07:23     1.71
  @@ -449,6 +449,11 @@
         Node dNode = dsource.getNode();
         if (null != dNode)
         {  
  +        if(null != m_urlOfSource)
  +        {
  +          // System.out.println("Putting document in cache: "+m_urlOfSource);
  +          
this.getXPathContext().getSourceTreeManager().putDocumentInCache(dNode, 
dsource);
  +        }
           this.transformNode(dsource.getNode());
           return;
         }
  @@ -757,7 +762,17 @@
      */
     public void setOutputProperties(Properties oformat)
     {
  -    m_outputFormat = new 
OutputProperties(m_stylesheetRoot.getOutputProperties());
  +    if(null != oformat)
  +    {
  +      // See if an *explicit* method was set.
  +      String method = (String)oformat.get(OutputKeys.METHOD);
  +      if(null != method)
  +        m_outputFormat = new OutputProperties(method);
  +      else
  +        m_outputFormat = new OutputProperties();
  +    }
  +    
  +    m_outputFormat.copyFrom(m_stylesheetRoot.getOutputProperties());
       if(null != oformat)
       {
         m_outputFormat.copyFrom(oformat);
  
  
  

Reply via email to