You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/01/24 15:41:31 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/stree DocImpl.java Parent.java

sboag       01/01/24 06:41:30

  Modified:    java/src/org/apache/xalan/stree DocImpl.java Parent.java
  Log:
  Use seperate XPathContext from the main transform to do
  whitespace node matches (i.e. xsl:strip-space), which solves threading
  problems, which esp. show up in a dual processor system.
  
  Revision  Changes    Path
  1.4       +6 -0      xml-xalan/java/src/org/apache/xalan/stree/DocImpl.java
  
  Index: DocImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/DocImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DocImpl.java	2001/01/11 03:16:11	1.3
  +++ DocImpl.java	2001/01/24 14:41:27	1.4
  @@ -57,6 +57,7 @@
   package org.apache.xalan.stree;
   
   import org.apache.xml.utils.FastStringBuffer;
  +import org.apache.xpath.XPathContext;
   
   /**
    * <meta name="usage" content="internal"/>
  @@ -82,6 +83,11 @@
     /** Contains exception thrown from transformation thread, 
      * if one occured. */
     public Exception m_exceptionThrown = null;
  +  
  +  /**
  +   * For execution of whitespace matching.
  +   */
  +   XPathContext m_xpathContext = null;
   
     /**
      * Constructor DocImpl
  
  
  
  1.20      +6 -1      xml-xalan/java/src/org/apache/xalan/stree/Parent.java
  
  Index: Parent.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/stree/Parent.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Parent.java	2001/01/09 07:15:11	1.19
  +++ Parent.java	2001/01/24 14:41:27	1.20
  @@ -268,6 +268,8 @@
     public Node getFirstChild()
     {
   
  +//    synchronized (m_doc)
  +//    {
       if (null != m_first)
         return m_first;
       else if (!m_isComplete)
  @@ -293,6 +295,7 @@
           }
         }
       }
  +//    }
   
       return m_first;
     }
  @@ -370,8 +373,10 @@
             try
             {
               ElementImpl elem = (ElementImpl) child;
  +            if(null == doc.m_xpathContext)
  +              doc.m_xpathContext = new org.apache.xpath.XPathContext(doc);
               WhiteSpaceInfo info =
  -              stylesheet.getWhiteSpaceInfo(transformer.getXPathContext(),
  +              stylesheet.getWhiteSpaceInfo(doc.m_xpathContext,
                                              elem);
               boolean shouldStrip;