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.sax;
  6. import javax.xml.transform.*;
  7. import org.xml.sax.ContentHandler;
  8. import org.xml.sax.ext.LexicalHandler;
  9. /**
  10. * A SAX ContentHandler that may be used to process SAX
  11. * parse events (parsing transformation instructions) into a Templates object.
  12. *
  13. * <p>Note that TemplatesHandler does not need to implement LexicalHandler.</p>
  14. */
  15. public interface TemplatesHandler extends ContentHandler {
  16. /**
  17. * When a TemplatesHandler object is used as a ContentHandler
  18. * for the parsing of transformation instructions, it creates a Templates object,
  19. * which the caller can get once the SAX events have been completed.
  20. *
  21. * @return The Templates object that was created during
  22. * the SAX event process, or null if no Templates object has
  23. * been created.
  24. *
  25. */
  26. public Templates getTemplates();
  27. /**
  28. * Set the base ID (URI or system ID) for the Templates object
  29. * created by this builder. This must be set in order to
  30. * resolve relative URIs in the stylesheet. This must be
  31. * called before the startDocument event.
  32. *
  33. * @param baseID Base URI for this stylesheet.
  34. */
  35. public void setSystemId(String systemID);
  36. /**
  37. * Get the base ID (URI or system ID) from where relative
  38. * URLs will be resolved.
  39. * @return The systemID that was set with {@link #setSystemId}.
  40. */
  41. public String getSystemId();
  42. }