if(i!=-1)
if(i!=-1){ vn.LN = i-1;
   protected int iterateAttr() throws PilotException,NavException{         	    switch(iter_type){   	    	case ATTR:   	    		if (name.compareTo("*")==0){   	    			if (ft != false){   	    				ft = false;   	    				index = vn.getCurrentIndex2()+1;   	    			} else   	    				index +=2;   	    			if (vn.ns == false){   	    				while(index<=size){   	    					int type = vn.getTokenType(index);   	    					if (type == VTDNav.TOKEN_ATTR_NAME   	    						|| type == VTDNav.TOKEN_ATTR_NS){   	    						return index;   	    					}else{   	    				   	    						return -1;   	    					}   	    				}   	    				return -1;   	    			}else {   	    				int type = vn.getTokenType(index);   	    				while(index<=size){	    					if (type == VTDNav.TOKEN_ATTR_NAME	    						|| type == VTDNav.TOKEN_ATTR_NS){	    						if (type == VTDNav.TOKEN_ATTR_NAME){	    							return index;	    						}	    						else 	    							index += 2;	    							    					}else{   	    					    						return -1;	    					}   	    				}   	    				return -1;   	    			}   	    		}else{   	    			if (ft == false){   	    				return -1;   	    			} else {   	    				ft = false;   	    				int i = vn.getAttrVal(name);   	    				if(i!=-1)   	    					return i-1;   	    				else    	    					return -1;   	    			}   	    			   	    		}   	        case ATTR_NS:	    			if (ft == false){   	    				return -1;   	    			} else {   	    				ft = false;   	    				int i = vn.getAttrValNS(URL,localName);   	    				if(i!=-1)   	    					return i-1;   	    				else    	    					return -1;   	    			}    	        default:   	        	throw new PilotException("invalid iteration type");   	    }   	   }