1. /*
  2. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. /*
  6. * @(#)TransformerHandler.java 1.11 03/01/23
  7. */
  8. package javax.xml.transform.sax;
  9. import java.util.Properties;
  10. import javax.xml.transform.Result;
  11. import javax.xml.transform.URIResolver;
  12. import javax.xml.transform.TransformerException;
  13. import javax.xml.transform.Transformer;
  14. import org.xml.sax.ContentHandler;
  15. import org.xml.sax.ext.LexicalHandler;
  16. import org.xml.sax.DTDHandler;
  17. /**
  18. * A TransformerHandler
  19. * listens for SAX ContentHandler parse events and transforms
  20. * them to a Result.
  21. */
  22. public interface TransformerHandler
  23. extends ContentHandler, LexicalHandler, DTDHandler {
  24. /**
  25. * Enables the user of the TransformerHandler to set the
  26. * to set the Result for the transformation.
  27. *
  28. * @param result A Result instance, should not be null.
  29. *
  30. * @throws IllegalArgumentException if result is invalid for some reason.
  31. */
  32. public void setResult(Result result) throws IllegalArgumentException;
  33. /**
  34. * Set the base ID (URI or system ID) from where relative
  35. * URLs will be resolved.
  36. * @param systemID Base URI for the source tree.
  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. /**
  46. * Get the Transformer associated with this handler, which
  47. * is needed in order to set parameters and output properties.
  48. */
  49. public Transformer getTransformer();
  50. }