1 16 19 package com.sun.org.apache.xpath.internal.axes; 20 21 import com.sun.org.apache.xml.internal.dtm.DTM; 22 import com.sun.org.apache.xpath.internal.XPathContext; 23 import com.sun.org.apache.xpath.internal.compiler.Compiler; 24 25 31 public class SelfIteratorNoPredicate extends LocPathIterator 32 { 33 34 44 SelfIteratorNoPredicate(Compiler compiler, int opPos, int analysis) 45 throws javax.xml.transform.TransformerException 46 { 47 super(compiler, opPos, analysis, false); 48 } 49 50 60 public SelfIteratorNoPredicate() 61 throws javax.xml.transform.TransformerException 62 { 63 super(null); 64 } 65 66 67 75 public int nextNode() 76 { 77 if (m_foundLast) 78 return DTM.NULL; 79 80 int next; 81 DTM dtm = m_cdtm; 82 83 m_lastFetched = next = (DTM.NULL == m_lastFetched) 84 ? m_context 85 : DTM.NULL; 86 87 if (DTM.NULL != next) 89 { 90 m_pos++; 91 92 return next; 93 } 94 else 95 { 96 m_foundLast = true; 97 98 return DTM.NULL; 99 } 100 } 101 102 110 public int asNode(XPathContext xctxt) 111 throws javax.xml.transform.TransformerException 112 { 113 return xctxt.getCurrentNode(); 114 } 115 116 124 public int getLastPos(XPathContext xctxt) 125 { 126 return 1; 127 } 128 129 130 } 131 | Popular Tags |