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...@locus.apache.org on 2000/12/18 09:53:29 UTC

cvs commit: xml-xalan/java/src/org/apache/xpath/patterns NodeTest.java

sboag       00/12/18 00:53:28

  Modified:    java/src/org/apache/xpath/patterns NodeTest.java
  Log:
  Move the test for NodeFilter.SHOW_ALL to the two argument
  execute, so it can be called directly from the PredicatedNodeTest.
  
  Revision  Changes    Path
  1.15      +4 -6      xml-xalan/java/src/org/apache/xpath/patterns/NodeTest.java
  
  Index: NodeTest.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/patterns/NodeTest.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- NodeTest.java	2000/12/17 19:31:25	1.14
  +++ NodeTest.java	2000/12/18 08:53:28	1.15
  @@ -374,6 +374,9 @@
             throws javax.xml.transform.TransformerException
     {
   
  +    if (m_whatToShow == NodeFilter.SHOW_ALL)
  +      return m_score;
  +
       short nodeType = context.getNodeType();
       int nodeBit = (m_whatToShow & (0x00000001 << (nodeType - 1)));
   
  @@ -458,12 +461,7 @@
     public XObject execute(XPathContext xctxt)
             throws javax.xml.transform.TransformerException
     {
  -
  -    if (m_whatToShow == NodeFilter.SHOW_ALL)
  -      return m_score;
  -
  -    Node context = xctxt.getCurrentNode();
   
  -    return execute(xctxt, context);
  +    return execute(xctxt, xctxt.getCurrentNode());
     }
   }