1. // $Id: TemplatesHandler.java,v 1.1.26.1 2004/07/13 22:27:50 jsuttor Exp $
  2. /*
  3. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  4. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  5. */
  6. /*
  7. * @(#)TemplatesHandler.java 1.14 04/07/13
  8. */
  9. package javax.xml.transform.sax;
  10. import javax.xml.transform.*;
  11. import org.xml.sax.ContentHandler;
  12. /**
  13. * A SAX ContentHandler that may be used to process SAX
  14. * parse events (parsing transformation instructions) into a Templates object.
  15. *
  16. * <p>Note that TemplatesHandler does not need to implement LexicalHandler.</p>
  17. */
  18. public interface TemplatesHandler extends ContentHandler {
  19. /**
  20. * When a TemplatesHandler object is used as a ContentHandler
  21. * for the parsing of transformation instructions, it creates a Templates object,
  22. * which the caller can get once the SAX events have been completed.
  23. *
  24. * @return The Templates object that was created during
  25. * the SAX event process, or null if no Templates object has
  26. * been created.
  27. *
  28. */
  29. public Templates getTemplates();
  30. /**
  31. * Set the base ID (URI or system ID) for the Templates object
  32. * created by this builder. This must be set in order to
  33. * resolve relative URIs in the stylesheet. This must be
  34. * called before the startDocument event.
  35. *
  36. * @param systemID Base URI for this stylesheet.
  37. */
  38. public void setSystemId(String systemID);
  39. /**
  40. * Get the base ID (URI or system ID) from where relative
  41. * URLs will be resolved.
  42. * @return The systemID that was set with {@link #setSystemId}.
  43. */
  44. public String getSystemId();
  45. }