예제 #1
0
 public boolean next(IFocus focus) throws XQueryException {
   final int attsize = elem.getAttributesCount();
   for (int i = focus.getPosition(); i < attsize; i = focus.incrPosition()) {
     DTMAttribute att = elem.attribute(i);
     if (att != null && filterNodeTest.accepts(att)) {
       focus.setContextItem(att);
       focus.incrPosition();
       return true;
     }
   }
   return false;
 }
예제 #2
0
 @Override
 public boolean next(IFocus focus) throws XQueryException {
   final int nslen = elem.getNamespaceDeclCount();
   for (int i = focus.getPosition(); i < nslen; i = focus.incrPosition()) {
     DTMNamespace ns = elem.getNamespace(i);
     if (ns != null && filterNodeTest.accepts(ns)) {
       focus.setContextItem(ns);
       focus.incrPosition();
       return true;
     }
   }
   return false;
 }