code: @Override
      public final boolean filter() {
          // supporting attributes here is difficult, because treetank
          // does not provide a way to acces the name and namespace of
          // the current attribute (attribute index is not known here)
          checkState(mRtx.getNode().getKind() != IConstants.ATTRIBUTE,
              "Wildcards are not supported in attribute names yet.");
          if (mRtx.getNode().getKind() == IConstants.ELEMENT) {
  
              if (mIsName) { // local name is given
                  final String localname =
  
                  mRtx.nameForKey(((ITreeNameData)mRtx.getNode()).getNameKey()).replaceFirst(".*:", "");
                  final int localnameKey = NamePageHash.generateHashForString(localname);
  
                  return localnameKey == mKnownPartKey;
              } else { // namespace prefix is given
                  try {
                      final int nsCount = ((ElementNode)mRtx.getNode()).getNamespaceCount();
                      for (int i = 0; i < nsCount; i++) {
                          mRtx.moveTo(((ElementNode)mRtx.getNode()).getNamespaceKey(i));
                          final int prefixKey = mKnownPartKey;
                          if (((ITreeNameData)mRtx.getNode()).getNameKey() == prefixKey) {
                              mRtx.moveTo(mRtx.getNode().getParentKey());
                              return true;
                          }
                          mRtx.moveTo(mRtx.getNode().getParentKey());
                      }
                  } catch (TTIOException exc) {
                      throw new RuntimeException(exc);
                  }
              }
  
          }
          return false;
  
      }
docs: {@inheritDoc}