1. /*
  2. * @(#)URIResolver.java 1.13 04/07/26
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.xml.transform;
  8. /**
  9. * <p>An object that implements this interface that can be called by the processor
  10. * to turn a URI used in document(), xsl:import, or xsl:include into a Source object.
  11. */
  12. public interface URIResolver {
  13. /**
  14. * Called by the processor when it encounters
  15. * an xsl:include, xsl:import, or document() function.
  16. *
  17. * @param href An href attribute, which may be relative or absolute.
  18. * @param base The base URI against which the first argument will be made
  19. * absolute if the absolute URI is required.
  20. *
  21. * @return A Source object, or null if the href cannot be resolved,
  22. * and the processor should try to resolve the URI itself.
  23. *
  24. * @throws TransformerException if an error occurs when trying to
  25. * resolve the URI.
  26. */
  27. public Source resolve(String href, String base)
  28. throws TransformerException;
  29. }