code: @Override
      protected byte[] computeResult() throws TTXPathException {
  
          final AbsAxis axis = getArgs().get(0);
          boolean value = false;
  
          if (axis.hasNext()) {
  
              if (getNode().getDataKey() >= 0) { // first item is a real node
                                                 // ->
                  // true
                  value = true;
              } else {
  
                  final Type type = Type.getType(getNode().getTypeKey());
  
                  if (type.derivesFrom(Type.BOOLEAN)) {
                      value = Boolean.parseBoolean(new String(((ITreeValData)getNode()).getRawValue()));
                      // value = TypedValue.parseBoolean(rtx.getRawValue());
                  } else if (type.derivesFrom(Type.STRING) || type.derivesFrom(Type.ANY_URI)
                      || type.derivesFrom(Type.UNTYPED_ATOMIC)) {
                      // if length = 0 -> false
                      value = (new String(((ITreeValData)getNode()).getRawValue()).length() > 0);
                  } else if (type.isNumericType()) {
                      final double dValue = Double.parseDouble(new String(((ITreeValData)getNode()).getRawValue()));
                      value = !(Double.isNaN(dValue) || dValue == 0.0d);
                  } else {
                      // for all other types throw error FORG0006
                      throw EXPathError.FORG0006.getEncapsulatedException();
                  }
  
                  // if is not a singleton
                  if (axis.hasNext()) {
                      throw EXPathError.FORG0006.getEncapsulatedException();
                  }
              }
  
          } else {
              // expression is an empty sequence -> false
              value = false;
          }
  
          return TypedValue.getBytes(Boolean.toString(value));
  
      }
docs: {@inheritDoc}