xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zong...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/dom ForwardPositionIterator.java
Date Tue, 22 Oct 2002 20:59:09 GMT
zongaro     2002/10/22 13:59:09

  Modified:    java/src/org/apache/xalan/xsltc/dom
                        ForwardPositionIterator.java
  Log:
  Whoops!  Checked in file on MAIN branch that was meant for XSLTC_DTM branch.
  
  Revision  Changes    Path
  1.3       +10 -9     xml-xalan/java/src/org/apache/xalan/xsltc/dom/ForwardPositionIterator.java
  
  Index: ForwardPositionIterator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/ForwardPositionIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ForwardPositionIterator.java	22 Oct 2002 20:53:52 -0000	1.2
  +++ ForwardPositionIterator.java	22 Oct 2002 20:59:09 -0000	1.3
  @@ -65,24 +65,21 @@
   import org.apache.xalan.xsltc.NodeIterator;
   import org.apache.xalan.xsltc.runtime.BasisLibrary;
   
  -import org.apache.xml.dtm.DTMAxisIterator;
  -import org.apache.xml.dtm.ref.DTMAxisIteratorBase;
  -
   /**
    * This iterator is a wrapper that always returns the position of
    * a node in document order. It is needed for the case where 
    * a call to position() occurs in the context of an XSLT element
    * such as xsl:for-each, xsl:apply-templates, etc. 
    */
  -public final class ForwardPositionIterator extends DTMAxisIteratorBase {
  +public final class ForwardPositionIterator extends NodeIteratorBase {
   
  -    private DTMAxisIterator _source;
  +    private NodeIterator _source;
   
  -    public ForwardPositionIterator(DTMAxisIterator source) {
  +    public ForwardPositionIterator(NodeIterator source) {
   	_source = source;
       }
   
  -    public DTMAxisIterator cloneIterator() {
  +    public NodeIterator cloneIterator() {
   	try {
   	    final ForwardPositionIterator clone = 
   		(ForwardPositionIterator) super.clone();
  @@ -101,14 +98,18 @@
   	return returnNode(_source.next());
       }
   	
  -    public DTMAxisIterator setStartNode(int node) {
  +    public NodeIterator setStartNode(int node) {
   	_source.setStartNode(node);
   	return this;
       }
   
  -    public DTMAxisIterator reset() {
  +    public NodeIterator reset() {
   	_source.reset();
   	return resetPosition();
  +    }
  +
  +    public int getPosition() {
  +	return _position == 0 ? 1 : _position;
       }
   
       public void setMark() {
  
  
  

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


Mime
View raw message