tomp.ext
Class EXTURIResolver

java.lang.Object
  |
  +--net.sf.saxon.StandardURIResolver
        |
        +--tomp.ext.EXTURIResolver
All Implemented Interfaces:
javax.xml.transform.URIResolver

public class EXTURIResolver
extends net.sf.saxon.StandardURIResolver

This EXTURIResolver is an extension of the standard javax.xml.transform.URIResolver. It has two extensions:

  1. When the URI starts with the EXT_LOCAL_URI_PREFIX (default "ext-local:some-ext-id") then the Source with the some-ext-id from this EXT Application will be returned.
  2. It has a second function, javax.xml.transform.Result resolveResult(String href), giving the Result addressed by a EXT-specific "ext-local:some-ext-id" URI.

See Also:
URIResolver

Field Summary
protected static java.lang.String EXT_LOCAL_URI_PREFIX
           
 
Constructor Summary
EXTURIResolver(javax.xml.transform.URIResolver old, Action action)
          Constructor
 
Method Summary
 javax.xml.transform.Source resolve(java.lang.String href, java.lang.String base)
          Overridden method of the original URIResolver.
 javax.xml.transform.Result resolveResult(java.lang.String href)
          New method of the EXTURIResolver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXT_LOCAL_URI_PREFIX

protected static final java.lang.String EXT_LOCAL_URI_PREFIX
See Also:
Constant Field Values
Constructor Detail

EXTURIResolver

public EXTURIResolver(javax.xml.transform.URIResolver old,
                      Action action)
Constructor

Parameters:
old - means the URIResolver that will be used for non-EXT-specific URIs
action - all EXT-URIs are resolved in an action-environment, i.e. before resolving, the action must be provided. This is done at the constructor.
Method Detail

resolve

public javax.xml.transform.Source resolve(java.lang.String href,
                                          java.lang.String base)
                                   throws javax.xml.transform.TransformerException
Overridden method of the original URIResolver. Parameter have the same meaning as in URIResolver.

Specified by:
resolve in interface javax.xml.transform.URIResolver
Overrides:
resolve in class net.sf.saxon.StandardURIResolver
Parameters:
href -
base -
javax.xml.transform.TransformerException

resolveResult

public javax.xml.transform.Result resolveResult(java.lang.String href)
                                         throws javax.xml.transform.TransformerException
New method of the EXTURIResolver. Parameter href has the same meaning as in URIResolver.

Parameters:
href - Parameter "base" is not needed, since we can refer to EXT-specific local URIs.
javax.xml.transform.TransformerException