Document dom = XMLResource.load(new InputSource(getRenderingContext().getUac().getReader(url))).getDocument();
Document dom = loadDocument(url);
    protected void setDocumentRelative(String filename) {        String url = getRenderingContext().getUac().resolveURI(filename);        Document dom = XMLResource.load(new InputSource(getRenderingContext().getUac().getReader(url))).getDocument();        setDocument(dom, url);    }