fop 0.91beta

org.apache.fop.apps
Class FOURIResolver

java.lang.Object
  |
  +--org.apache.fop.apps.FOURIResolver
All Implemented Interfaces:
javax.xml.transform.URIResolver

public class FOURIResolver
extends java.lang.Object
implements javax.xml.transform.URIResolver

Provides FOP specific URI resolution. This is the default URIResolver FOUserAgent will use unless overidden.

See Also:
URIResolver

Constructor Summary
FOURIResolver()
           
 
Method Summary
 javax.xml.transform.Source resolve(java.lang.String href, java.lang.String base)
          Called by the processor through FOUserAgent when it encounters an uri in an external-graphic element. (see also URIResolver.resolve(String, String) This resolver will allow URLs without a scheme, i.e. it assumes 'file:' as the default scheme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FOURIResolver

public FOURIResolver()
Method Detail

resolve

public javax.xml.transform.Source resolve(java.lang.String href,
                                          java.lang.String base)
                                   throws javax.xml.transform.TransformerException
Called by the processor through FOUserAgent when it encounters an uri in an external-graphic element. (see also URIResolver.resolve(String, String) This resolver will allow URLs without a scheme, i.e. it assumes 'file:' as the default scheme. It also allows relative URLs with scheme, e.g. file:../../abc.jpg which is not strictly RFC compliant as long as the scheme is the same as the scheme of the base URL. If the base URL is null a 'file:' URL referencing the current directory is used as the base URL. If the method is successful it will return a Source of type StreamSource with its SystemID set to the resolved URL used to open the underlying InputStream.
Specified by:
resolve in interface javax.xml.transform.URIResolver
Parameters:
href - An href attribute, which may be relative or absolute.
base - The base URI against which the first argument will be made absolute if the absolute URI is required.
Returns:
A Source object, or null if the href cannot be resolved.
Throws:
javax.xml.transform.TransformerException - Never thrown by this implementation.
See Also:
URIResolver.resolve(String, String)

fop 0.91beta

Copyright 1999-2005 The Apache Software Foundation. All Rights Reserved.