*/
    public StepPattern createStepPattern(int axis, Object test, Vector predicates) {
        int nodeType;

        if (test == null) {  // "*"
            nodeType = (axis == Axis.ATTRIBUTE) ? NodeTest.ATTRIBUTE :
                (axis == Axis.NAMESPACE) ? -1 : NodeTest.ELEMENT;

            return new StepPattern(axis, nodeType, predicates);
        }
        else if (test instanceof Integer) {
            nodeType = ((Integer) test).intValue();

            return new StepPattern(axis, nodeType, predicates);
        }
        else {
            QName name = (QName)test;
            boolean setPriority = false;

            if (axis == Axis.NAMESPACE) {
                nodeType = (name.toString().equals("*")) ? -1
                                : _xsltc.registerNamespacePrefix(name);;
            }
            else {
                final String uri = name.getNamespace();
                final String local = name.getLocalPart();
                final QName namespace_uri =
                    _parser.getQNameIgnoreDefaultNs("namespace-uri");

                // Expand {uri}:* to *[namespace-uri() = 'uri'] - same for @*
                if (uri != null && (local.equals("*") || local.equals("@*"))) {
                    if (predicates == null) {
                        predicates = new Vector(2);
                    }

                    // Priority is set by hand if no other predicates exist
                    setPriority = (predicates.size() == 0);

                    predicates.add(
                        new Predicate(
                            new EqualityExpr(Operators.EQ,
                                new NamespaceUriCall(namespace_uri),
                                new LiteralExpr(uri))));
                }

                if (local.equals("*")) {
                    nodeType = (axis == Axis.ATTRIBUTE) ? NodeTest.ATTRIBUTE
                        : NodeTest.ELEMENT;
                }
                else if (local.equals("@*")) {
                    nodeType = NodeTest.ATTRIBUTE;
                }
                else {
                    nodeType = (axis == Axis.ATTRIBUTE) ? _xsltc.registerAttribute(name)
                        : _xsltc.registerElement(name);
                }
            }

            final StepPattern result = new StepPattern(axis, nodeType, predicates);

            // Set priority for case prefix:* and prefix:@* (no predicates)
            if (setPriority) {
                result.setPriority(-0.25);
            }

            return result;
        }
    }