You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sa...@apache.org on 2002/05/14 21:47:22 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Step.java

santiagopg    02/05/14 12:47:22

  Modified:    java/src/org/apache/xalan/xsltc/compiler Step.java
  Log:
  Fixed looping problem reported by Girish.
  
  Revision  Changes    Path
  1.32      +6 -25     xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Step.java
  
  Index: Step.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Step.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- Step.java	24 Apr 2002 17:03:15 -0000	1.31
  +++ Step.java	14 May 2002 19:47:22 -0000	1.32
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: Step.java,v 1.31 2002/04/24 17:03:15 santiagopg Exp $
  + * @(#)$Id: Step.java,v 1.32 2002/05/14 19:47:22 santiagopg Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -224,14 +224,7 @@
   	    _type = Type.NodeSet;
   	}
   	else {
  -	    // Special case for '@attr' with no parent or predicates
  -	    if ((_axis == Axis.ATTRIBUTE) && (_nodeType!=NodeTest.ATTRIBUTE) &&
  -		(!hasParentPattern()) && (!_hadPredicates) && (!isPredicate())) {
  -		_type = Type.Node;
  -	    }
  -	    else {
  -		_type = Type.NodeSet;
  -	    }
  +	    _type = Type.NodeSet;
   	}
   
   	// Type check all predicates (expressions applied to the step)
  @@ -303,25 +296,13 @@
   	    // If it is an attribute but not '@*' or '@attr' with a parent
   	    if ((_axis == Axis.ATTRIBUTE) &&
   		(_nodeType != NodeTest.ATTRIBUTE) && (!hasParentPattern())) {
  -		int node = cpg.addInterfaceMethodref(DOM_INTF,
  -						     "getAttributeNode",
  -						     "(II)I");
   		int iter = cpg.addInterfaceMethodref(DOM_INTF,
   						     "getTypedAxisIterator",
   						     "(II)"+NODE_ITERATOR_SIG);
  -		if (_type instanceof NodeType) {
  -		    il.append(methodGen.loadDOM());
  -		    il.append(new PUSH(cpg, _nodeType));
  -		    il.append(methodGen.loadContextNode());
  -		    il.append(new INVOKEINTERFACE(node, 3));
  -		}
  -		// If it is the case '@attr[P_1]...[P_k]'
  -		else if (_type instanceof NodeSetType) {
  -		    il.append(methodGen.loadDOM());
  -		    il.append(new PUSH(cpg, Axis.ATTRIBUTE));
  -		    il.append(new PUSH(cpg, _nodeType));
  -		    il.append(new INVOKEINTERFACE(iter, 3));
  -		}
  +		il.append(methodGen.loadDOM());
  +		il.append(new PUSH(cpg, Axis.ATTRIBUTE));
  +		il.append(new PUSH(cpg, _nodeType));
  +		il.append(new INVOKEINTERFACE(iter, 3));
   		return;
   	    }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org