This commit was manufactured by cvs2svn to create branch 'gomp-branch'.
[official-gcc.git] / libjava / org / w3c / dom / Entity.java
blob51a69cb0001bb9af4700498a0b4b6ca5da1dbefb
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.
13 package org.w3c.dom;
15 /**
16 * This interface represents an entity, either parsed or unparsed, in an XML
17 * document. Note that this models the entity itself not the entity
18 * declaration. <code>Entity</code> declaration modeling has been left for a
19 * later Level of the DOM specification.
20 * <p>The <code>nodeName</code> attribute that is inherited from
21 * <code>Node</code> contains the name of the entity.
22 * <p>An XML processor may choose to completely expand entities before the
23 * structure model is passed to the DOM; in this case there will be no
24 * <code>EntityReference</code> nodes in the document tree.
25 * <p>XML does not mandate that a non-validating XML processor read and
26 * process entity declarations made in the external subset or declared in
27 * external parameter entities. This means that parsed entities declared in
28 * the external subset need not be expanded by some classes of applications,
29 * and that the replacement value of the entity may not be available. When
30 * the replacement value is available, the corresponding <code>Entity</code>
31 * node's child list represents the structure of that replacement text.
32 * Otherwise, the child list is empty.
33 * <p>The DOM Level 2 does not support editing <code>Entity</code> nodes; if a
34 * user wants to make changes to the contents of an <code>Entity</code>,
35 * every related <code>EntityReference</code> node has to be replaced in the
36 * structure model by a clone of the <code>Entity</code>'s contents, and
37 * then the desired changes must be made to each of those clones instead.
38 * <code>Entity</code> nodes and all their descendants are readonly.
39 * <p>An <code>Entity</code> node does not have any parent.If the entity
40 * contains an unbound namespace prefix, the <code>namespaceURI</code> of
41 * the corresponding node in the <code>Entity</code> node subtree is
42 * <code>null</code>. The same is true for <code>EntityReference</code>
43 * nodes that refer to this entity, when they are created using the
44 * <code>createEntityReference</code> method of the <code>Document</code>
45 * interface. The DOM Level 2 does not support any mechanism to resolve
46 * namespace prefixes.
47 * <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>.
49 public interface Entity extends Node {
50 /**
51 * The public identifier associated with the entity, if specified. If the
52 * public identifier was not specified, this is <code>null</code>.
54 public String getPublicId();
56 /**
57 * The system identifier associated with the entity, if specified. If the
58 * system identifier was not specified, this is <code>null</code>.
60 public String getSystemId();
62 /**
63 * For unparsed entities, the name of the notation for the entity. For
64 * parsed entities, this is <code>null</code>.
66 public String getNotationName();