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