append(new StepStart());
if(refRootValue==null) {   append(new StepStart()); }
    public void build(String path) {        //this is very easy to parse; no need for any complex recursive        //parser. Even so, regexp work may make this tractable        steps = new ArrayList<Step>();        int start = 0;        final int pathlength = path.length();        //handle the beginning of the document as absolute or relative        if (path.startsWith("/")) {            //absolute paths have a root            append(new StepRoot());            start = 1;            if (pathlength == 1) {                //and exit here if there is nothing else                return;            }        } else {            //relative refs have a step start, that puts the            //cursor in the right place to begin resolution            append(new StepStart());        }        //now, scan through the source looking for stuff        boolean finished = false;        while (!finished) {            int slash = path.indexOf('/', start);            String qname;            if (slash < 0) {                finished = true;                qname = path.substring(start);            } else {                qname = path.substring(start, slash);                start = slash + 1;                finished = start >= pathlength;            }            //here qname is the current element. Extract but do not yet evaluate            if (".".equals(qname)) {                append(new StepHere());            } else if ("..".equals(qname)) {                append(new StepUp());            } else {                String prefix = NamespaceUtils.extractNamespacePrefix(qname);                String localname = NamespaceUtils.extractLocalname(qname);                StepDown step = new StepDown(prefix, localname);                append(step);            }        }    }