result = ((ArraySet) buf).getChildren(contextSet, ArraySet.DESCENDANT, inPredicate);
if(axis ==  Constants.DESCENDANT_ATTRIBUTE_AXIS) result = ((ArraySet) buf).getDescendants(contextSet, ArraySet.DESCENDANT, inPredicate); else result = ((ArraySet) buf).getChildren(contextSet, ArraySet.DESCENDANT, inPredicate);
	protected NodeSet getAttributes(		StaticContext context,		DocumentSet documents,		NodeSet contextSet) {		NodeSet result;		if (test.isWildcardTest()) {			result = new VirtualNodeSet(axis, test, contextSet);			((VirtualNodeSet) result).setInPredicate(inPredicate);		} else {			if (buf == null) {				DBBroker broker = null;				try {					broker = pool.get();					buf = (NodeSet) broker.getAttributesByName(documents, test.getName());				} catch (EXistException e) {					LOG.debug("exception while retrieving elements", e);				} finally {					pool.release(broker);				}			}			result = ((ArraySet) buf).getChildren(contextSet, ArraySet.DESCENDANT, inPredicate);			LOG.debug("found " + result.getLength() + " attributes");			//		} else {			//				Node n;			//				Node attr;			//				NamedNodeMap map;			//				result = new ArraySet(contextSet.getLength());			//				for (int i = 0; i < contextSet.getLength(); i++) {			//					n = contextSet.item(i);			//					if (n.getNodeType() == Node.ELEMENT_NODE) {			//						map = ((Element) n).getAttributes();			//						for (int j = 0; j < map.getLength(); j++) {			//							attr = map.item(j);			//							result.add(attr);			//						}			//					}			//				}		}		return result;	}