1. /*
  2. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. /*
  6. * @(#)TemplatesHandler.java 1.12 03/01/23
  7. */
  8. package javax.xml.transform.sax;
  9. import javax.xml.transform.*;
  10. import org.xml.sax.ContentHandler;
  11. import org.xml.sax.ext.LexicalHandler;
  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 baseID 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. }