public class URIResolver
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected SVGOMDocument |
document
The reference document.
|
protected DocumentLoader |
documentLoader
The document loader.
|
protected java.lang.String |
documentURI
The document URI.
|
| Constructor and Description |
|---|
URIResolver(SVGDocument doc,
DocumentLoader dl)
Creates a new URI resolver object.
|
| Modifier and Type | Method and Description |
|---|---|
org.w3c.dom.Element |
getElement(java.lang.String uri,
org.w3c.dom.Element ref)
Imports the Element referenced by the given URI on Element
ref.
|
org.w3c.dom.Node |
getNode(java.lang.String uri,
org.w3c.dom.Element ref)
Imports the Node referenced by the given URI on Element
ref.
|
protected org.w3c.dom.Node |
getNodeByFragment(java.lang.String frag,
org.w3c.dom.Element ref)
Returns the node referenced by the given fragment identifier.
|
protected java.lang.String |
getRefererBaseURI(org.w3c.dom.Element ref)
Returns the base URI of the referer element.
|
protected SVGOMDocument document
protected java.lang.String documentURI
protected DocumentLoader documentLoader
public URIResolver(SVGDocument doc,
DocumentLoader dl)
doc - The reference document.dl - The document loader.public org.w3c.dom.Element getElement(java.lang.String uri,
org.w3c.dom.Element ref)
throws java.net.MalformedURLException,
java.io.IOException
uri - The element URI.ref - The Element in the DOM tree to evaluate uri
from.java.net.MalformedURLExceptionjava.io.IOExceptionpublic org.w3c.dom.Node getNode(java.lang.String uri,
org.w3c.dom.Element ref)
throws java.net.MalformedURLException,
java.io.IOException,
java.lang.SecurityException
uri - The element URI.ref - The Element in the DOM tree to evaluate uri
from.java.net.MalformedURLExceptionjava.io.IOExceptionjava.lang.SecurityExceptionprotected java.lang.String getRefererBaseURI(org.w3c.dom.Element ref)
protected org.w3c.dom.Node getNodeByFragment(java.lang.String frag,
org.w3c.dom.Element ref)
frag - the URI fragmentref - the context element from which to resolve the URI fragmentCopyright ? 2009 Apache Software Foundation. All Rights Reserved.