private void push(String relative, String language, Direction dir) {
        String lang = "";
        boolean langSpecified = false;
        if (language != null) {
            try {
                if (!"".equals(language)) {
                    Language.THE_INSTANCE.checkValid(language);
                }
                lang = language;
                langSpecified = true;
            } catch (DatatypeException e) {
            }
        }

        Node curr = peek();
        URL base = curr.currentAbsolute;
        if (!langSpecified) {
            lang = curr.lang;
        }
        boolean rtl;
        switch (dir) {
            case RTL:
                rtl = true;
                break;
            case LTR:
                rtl = false;
                break;
            default:
                rtl = curr.rtl;
                break;
        }

        if (relative == null) {
            stack.addLast(new Node(base, null, lang, langSpecified, rtl));
        } else {
            URL newBase;
            String ascii = null;
            try {
                if (base != null) {
                    try {
                        newBase = base.resolve(relative);
                    } catch (GalimatiasParseException e) {
                        newBase = base;
                    }
                } else {
                    try {
                        newBase = URL.parse((new URI(ascii)).toString());
                    } catch (GalimatiasParseException e) {
                        newBase = null;
                    }
                }
            } catch (Exception e) {
                newBase = base;
            }
            stack.addLast(new Node(newBase, ascii, lang, langSpecified, rtl));
        }
    }
-1 at start
0 in html
>=1 in head
-2 situation over
src/nu/validator/xml/BaseUriTracker.java