1 46 package org.jaxen.expr.iter; 47 48 import java.util.Iterator ; 49 50 import org.jaxen.ContextSupport; 51 import org.jaxen.NamedAccessNavigator; 52 import org.jaxen.UnsupportedAxisException; 53 54 61 public class IterableAttributeAxis extends IterableAxis { 62 63 68 public IterableAttributeAxis(int value) { 69 super(value); 70 } 71 72 78 public Iterator iterator(Object contextNode, ContextSupport support) throws UnsupportedAxisException { 79 return support.getNavigator().getAttributeAxisIterator(contextNode); 80 } 81 82 91 public Iterator namedAccessIterator( 92 Object contextNode, 93 ContextSupport support, 94 String localName, 95 String namespacePrefix, 96 String namespaceURI) 97 throws UnsupportedAxisException { 98 99 NamedAccessNavigator nav = (NamedAccessNavigator) support.getNavigator(); 100 return nav.getAttributeAxisIterator(contextNode, localName, namespacePrefix, namespaceURI); 101 } 102 103 109 public boolean supportsNamedAccess(ContextSupport support) { 110 return (support.getNavigator() instanceof NamedAccessNavigator); 111 } 112 113 } 114 | Popular Tags |