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 java.util.Properties;
  7. import javax.xml.transform.Result;
  8. import javax.xml.transform.URIResolver;
  9. import javax.xml.transform.TransformerException;
  10. import javax.xml.transform.Transformer;
  11. import org.xml.sax.ContentHandler;
  12. import org.xml.sax.ext.LexicalHandler;
  13. import org.xml.sax.DTDHandler;
  14. /**
  15. * A TransformerHandler
  16. * listens for SAX ContentHandler parse events and transforms
  17. * them to a Result.
  18. */
  19. public interface TransformerHandler
  20. extends ContentHandler, LexicalHandler, DTDHandler {
  21. /**
  22. * Enables the user of the TransformerHandler to set the
  23. * to set the Result for the transformation.
  24. *
  25. * @param result A Result instance, should not be null.
  26. *
  27. * @throws IllegalArgumentException if result is invalid for some reason.
  28. */
  29. public void setResult(Result result) throws IllegalArgumentException;
  30. /**
  31. * Set the base ID (URI or system ID) from where relative
  32. * URLs will be resolved.
  33. * @param systemID Base URI for the source tree.
  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. /**
  43. * Get the Transformer associated with this handler, which
  44. * is needed in order to set parameters and output properties.
  45. */
  46. public Transformer getTransformer();
  47. }