1. /*
  2. * Copyright (c) 2004 World Wide Web Consortium,
  3. *
  4. * (Massachusetts Institute of Technology, European Research Consortium for
  5. * Informatics and Mathematics, Keio University). All Rights Reserved. This
  6. * work is distributed under the W3C(r) Software License [1] in the hope that
  7. * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
  8. * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. *
  10. * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
  11. */
  12. package org.w3c.dom;
  13. /**
  14. * Each <code>Document</code> has a <code>doctype</code> attribute whose value
  15. * is either <code>null</code> or a <code>DocumentType</code> object. The
  16. * <code>DocumentType</code> interface in the DOM Core provides an interface
  17. * to the list of entities that are defined for the document, and little
  18. * else because the effect of namespaces and the various XML schema efforts
  19. * on DTD representation are not clearly understood as of this writing.
  20. * <p>DOM Level 3 doesn't support editing <code>DocumentType</code> nodes.
  21. * <code>DocumentType</code> nodes are read-only.
  22. * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
  23. */
  24. public interface DocumentType extends Node {
  25. /**
  26. * The name of DTD; i.e., the name immediately following the
  27. * <code>DOCTYPE</code> keyword.
  28. */
  29. public String getName();
  30. /**
  31. * A <code>NamedNodeMap</code> containing the general entities, both
  32. * external and internal, declared in the DTD. Parameter entities are
  33. * not contained. Duplicates are discarded. For example in:
  34. * <pre><!DOCTYPE
  35. * ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar
  36. * "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz">
  37. * ]> <ex/></pre>
  38. * the interface provides access to <code>foo</code>
  39. * and the first declaration of <code>bar</code> but not the second
  40. * declaration of <code>bar</code> or <code>baz</code>. Every node in
  41. * this map also implements the <code>Entity</code> interface.
  42. * <br>The DOM Level 2 does not support editing entities, therefore
  43. * <code>entities</code> cannot be altered in any way.
  44. */
  45. public NamedNodeMap getEntities();
  46. /**
  47. * A <code>NamedNodeMap</code> containing the notations declared in the
  48. * DTD. Duplicates are discarded. Every node in this map also implements
  49. * the <code>Notation</code> interface.
  50. * <br>The DOM Level 2 does not support editing notations, therefore
  51. * <code>notations</code> cannot be altered in any way.
  52. */
  53. public NamedNodeMap getNotations();
  54. /**
  55. * The public identifier of the external subset.
  56. * @since DOM Level 2
  57. */
  58. public String getPublicId();
  59. /**
  60. * The system identifier of the external subset. This may be an absolute
  61. * URI or not.
  62. * @since DOM Level 2
  63. */
  64. public String getSystemId();
  65. /**
  66. * The internal subset as a string, or <code>null</code> if there is none.
  67. * This is does not contain the delimiting square brackets.
  68. * <p ><b>Note:</b> The actual content returned depends on how much
  69. * information is available to the implementation. This may vary
  70. * depending on various parameters, including the XML processor used to
  71. * build the document.
  72. * @since DOM Level 2
  73. */
  74. public String getInternalSubset();
  75. }