1. /*
  2. * Copyright (c) 2000 World Wide Web Consortium,
  3. * (Massachusetts Institute of Technology, Institut National de
  4. * Recherche en Informatique et en Automatique, Keio University). All
  5. * Rights Reserved. This program is distributed under the W3C's Software
  6. * Intellectual Property License. This program is distributed in the
  7. * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  8. * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  9. * PURPOSE.
  10. * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  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>The DOM Level 2 doesn't support editing <code>DocumentType</code> nodes.
  21. * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
  22. */
  23. public interface DocumentType extends Node {
  24. /**
  25. * The name of DTD; i.e., the name immediately following the
  26. * <code>DOCTYPE</code> keyword.
  27. */
  28. public String getName();
  29. /**
  30. * A <code>NamedNodeMap</code> containing the general entities, both
  31. * external and internal, declared in the DTD. Parameter entities are
  32. * not contained. Duplicates are discarded. For example in:
  33. * <pre><!DOCTYPE
  34. * ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar
  35. * "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz">
  36. * ]> <ex/></pre>
  37. * the interface provides access to <code>foo</code>
  38. * and the first declaration of <code>bar</code> but not the second
  39. * declaration of <code>bar</code> or <code>baz</code>. Every node in
  40. * this map also implements the <code>Entity</code> interface.
  41. * <br>The DOM Level 2 does not support editing entities, therefore
  42. * <code>entities</code> cannot be altered in any way.
  43. */
  44. public NamedNodeMap getEntities();
  45. /**
  46. * A <code>NamedNodeMap</code> containing the notations declared in the
  47. * DTD. Duplicates are discarded. Every node in this map also implements
  48. * the <code>Notation</code> interface.
  49. * <br>The DOM Level 2 does not support editing notations, therefore
  50. * <code>notations</code> cannot be altered in any way.
  51. */
  52. public NamedNodeMap getNotations();
  53. /**
  54. * The public identifier of the external subset.
  55. * @since DOM Level 2
  56. */
  57. public String getPublicId();
  58. /**
  59. * The system identifier of the external subset.
  60. * @since DOM Level 2
  61. */
  62. public String getSystemId();
  63. /**
  64. * The internal subset as a string, or <code>null</code> if there is none.
  65. * This is does not contain the delimiting square brackets.The actual
  66. * content returned depends on how much information is available to the
  67. * implementation. This may vary depending on various parameters,
  68. * including the XML processor used to build the document.
  69. * @since DOM Level 2
  70. */
  71. public String getInternalSubset();
  72. }