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