public URI getXMLBaseURI() throws URISyntaxException {
		Parent p = this;
		URI ret = null;
		while (p != null) {
			if (p instanceof Element) {
				ret = resolve(((Element) p).getAttributeValue("base",
						Namespace.XML_NAMESPACE), ret);
			} else {
				ret = resolve(((Document) p).getBaseURI(), ret);
			}
			if (ret != null && ret.isAbsolute()) {
				return ret;
			}
			p = p.getParent();
		}
		return ret;
	}