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;
  6. import java.lang.String;
  7. import java.io.OutputStream;
  8. import java.io.Writer;
  9. /**
  10. * An object that implements this interface contains the information
  11. * needed to build a transformation result tree.
  12. */
  13. public interface Result {
  14. /**
  15. * The name of the processing instruction that is sent if the
  16. * result tree disables output escaping.
  17. *
  18. * <p>Normally, result tree serialization escapes & and < (and
  19. * possibly other characters) when outputting text nodes.
  20. * This ensures that the output is well-formed XML. However,
  21. * it is sometimes convenient to be able to produce output that is
  22. * almost, but not quite well-formed XML; for example,
  23. * the output may include ill-formed sections that will
  24. * be transformed into well-formed XML by a subsequent non-XML aware
  25. * process. If a processing instruction is sent with this name,
  26. * serialization should be output without any escaping. </p>
  27. *
  28. * <p>Result DOM trees may also have PI_DISABLE_OUTPUT_ESCAPING and
  29. * PI_ENABLE_OUTPUT_ESCAPING inserted into the tree.</p>
  30. *
  31. * @see <a href="http://www.w3.org/TR/xslt#disable-output-escaping">disable-output-escaping in XSLT Specification</a>
  32. */
  33. public static final String PI_DISABLE_OUTPUT_ESCAPING =
  34. "javax.xml.transform.disable-output-escaping";
  35. /**
  36. * The name of the processing instruction that is sent
  37. * if the result tree enables output escaping at some point after having
  38. * received a PI_DISABLE_OUTPUT_ESCAPING processing instruction.
  39. *
  40. * @see <a href="http://www.w3.org/TR/xslt#disable-output-escaping">disable-output-escaping in XSLT Specification</a>
  41. */
  42. public static final String PI_ENABLE_OUTPUT_ESCAPING =
  43. "javax.xml.transform.enable-output-escaping";
  44. /**
  45. * Set the system identifier for this Result.
  46. *
  47. * <p>If the Result is not to be written to a file, the system identifier is optional.
  48. * The application may still want to provide one, however, for use in error messages
  49. * and warnings, or to resolve relative output identifiers.</p>
  50. *
  51. * @param systemId The system identifier as a URI string.
  52. */
  53. public void setSystemId(String systemId);
  54. /**
  55. * Get the system identifier that was set with setSystemId.
  56. *
  57. * @return The system identifier that was set with setSystemId,
  58. * or null if setSystemId was not called.
  59. */
  60. public String getSystemId();
  61. }