code: public static int getAxisFromStep(
            Compiler compiler, int stepOpCodePos)
              throws javax.xml.transform.TransformerException
    {
  
      int stepType = compiler.getOp(stepOpCodePos);
  
      switch (stepType)
      {
      case OpCodes.FROM_FOLLOWING :
        return Axis.FOLLOWING;
      case OpCodes.FROM_FOLLOWING_SIBLINGS :
        return Axis.FOLLOWINGSIBLING;
      case OpCodes.FROM_PRECEDING :
        return Axis.PRECEDING;
      case OpCodes.FROM_PRECEDING_SIBLINGS :
        return Axis.PRECEDINGSIBLING;
      case OpCodes.FROM_PARENT :
        return Axis.PARENT;
      case OpCodes.FROM_NAMESPACE :
        return Axis.NAMESPACE;
      case OpCodes.FROM_ANCESTORS :
        return Axis.ANCESTOR;
      case OpCodes.FROM_ANCESTORS_OR_SELF :
        return Axis.ANCESTORORSELF;
      case OpCodes.FROM_ATTRIBUTES :
        return Axis.ATTRIBUTE;
      case OpCodes.FROM_ROOT :
        return Axis.ROOT;
      case OpCodes.FROM_CHILDREN :
        return Axis.CHILD;
      case OpCodes.FROM_DESCENDANTS_OR_SELF :
        return Axis.DESCENDANTORSELF;
      case OpCodes.FROM_DESCENDANTS :
        return Axis.DESCENDANT;
      case OpCodes.FROM_SELF :
        return Axis.SELF;
      case OpCodes.OP_EXTFUNCTION :
      case OpCodes.OP_FUNCTION :
      case OpCodes.OP_GROUP :
      case OpCodes.OP_VARIABLE :
        return Axis.FILTEREDLIST;
      }
  
      throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NULL_ERROR_HANDLER, new Object[]{Integer.toString(stepType)})); //"Programmer's assertion: unknown opcode: "
                                 //+ stepType);
     }
docs: Special purpose function to see if we can optimize the pattern for
  a DescendantIterator.
  
  @param compiler non-null reference to compiler object that has processed
  the XPath operations into an opcode map.
  @param stepOpCodePos The opcode position for the step.
  
  @return 32 bits as an integer that give information about the location
  path as a whole.
  
  @throws javax.xml.transform.TransformerException