public DomainVisitor(final String baseUrl, final ContentVisitor visitor) {
        this.visitor = visitor;
        if ((baseUrl == null) || (baseUrl.trim().length() == 0)) {
            throw new IllegalArgumentException("baseUrl cannot be null or empty");
        }
        Matcher matcher = Pattern.compile("(http://[^/]+)").matcher(baseUrl);
        if (!matcher.find()) {
            throw new IllegalArgumentException("baseUrl must match http://[^/]+");
        }
        domain = matcher.group(1) + "/";
    }