Via a {@link ResourceResolver} one might also read a document from the web, a classpath, a jar file, a war file, a JDBC database, a JNDI context/data source, or similar.
This callback interface is just like the {@link javax.xml.transform.URIResolver}interface, except that it returns a Document
instead of a Source
object.
For example, a simple implementation could look like this:
String systemID = new net.sf.saxon.StandardURIResolver().resolve(href, baseURI).getSystemId(); return BuilderPool.GLOBAL_POOL.getBuilder(false).build(systemID); //return BuilderPool.GLOBAL_POOL.getW3CBuilder(...).build(systemID); // a variant using a document pool: String systemID = new net.sf.saxon.StandardURIResolver().resolve(href, baseURI).getSystemId(); return DocumentPool.GLOBAL_POOL.getDocument(new URI(systemID));@author whoschek.AT.lbl.DOT.gov @author $Author: hoschek3 $ @version $Revision: 1.19 $, $Date: 2005/06/09 22:48:26 $
|
|
|
|