|
Nux 1.0a5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Called by the XQuery processor to turn a URI passed to the XQuery doc()
function into a XOM Document object.
This interface allows to intercept and customize URI resolution. For example
here one can plugin XML schema validation, constraint checking, streaming path filters
such as StreamingPathFilter, other
preprocessing steps, and/or document caching (e.g. with EHCache or similar products).
Via a ResourceResolver one might also read a document from the
classpath, a jar file, a war file, a JDBC database, a JNDI context/data
source, or similar.
This callback interface is just like the
URIResolverinterface, 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);
| Method Summary | |
Document |
resolve(String href,
String baseURI)
Called by the XQuery processor when it encounters a doc() function. |
| Method Detail |
public Document resolve(String href,
String baseURI)
throws ValidityException,
ParsingException,
IOException,
TransformerException
doc() function.
href - An href attribute, which may be relative or absolute.baseURI - The base URI in effect when the href attribute was
encountered.
ValidityException - if an error occurs when trying to resolve the URI.
ParsingException - if an error occurs when trying to resolve the URI.
IOException - if an error occurs when trying to resolve the URI.
TransformerException - if an error occurs when trying to resolve the URI.
|
Nux 1.0a5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||