+++ /dev/null
-/*\r
- * Copyright (c) 2000 World Wide Web Consortium,\r
- * (Massachusetts Institute of Technology, Institut National de\r
- * Recherche en Informatique et en Automatique, Keio University). All\r
- * Rights Reserved. This program is distributed under the W3C's Software\r
- * Intellectual Property License. This program is distributed in the\r
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even\r
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\r
- * PURPOSE.\r
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.\r
- */\r
-\r
-package org.w3c.dom;\r
-\r
-/**\r
- * The <code>Attr</code> interface represents an attribute in an \r
- * <code>Element</code> object. Typically the allowable values for the \r
- * attribute are defined in a document type definition.\r
- * <p><code>Attr</code> objects inherit the <code>Node</code> interface, but \r
- * since they are not actually child nodes of the element they describe, the \r
- * DOM does not consider them part of the document tree. Thus, the \r
- * <code>Node</code> attributes <code>parentNode</code>, \r
- * <code>previousSibling</code>, and <code>nextSibling</code> have a \r
- * <code>null</code> value for <code>Attr</code> objects. The DOM takes the \r
- * view that attributes are properties of elements rather than having a \r
- * separate identity from the elements they are associated with; this should \r
- * make it more efficient to implement such features as default attributes \r
- * associated with all elements of a given type. Furthermore, \r
- * <code>Attr</code> nodes may not be immediate children of a \r
- * <code>DocumentFragment</code>. However, they can be associated with \r
- * <code>Element</code> nodes contained within a \r
- * <code>DocumentFragment</code>. In short, users and implementors of the \r
- * DOM need to be aware that <code>Attr</code> nodes have some things in \r
- * common with other objects inheriting the <code>Node</code> interface, but \r
- * they also are quite distinct.\r
- * <p> The attribute's effective value is determined as follows: if this \r
- * attribute has been explicitly assigned any value, that value is the \r
- * attribute's effective value; otherwise, if there is a declaration for \r
- * this attribute, and that declaration includes a default value, then that \r
- * default value is the attribute's effective value; otherwise, the \r
- * attribute does not exist on this element in the structure model until it \r
- * has been explicitly added. Note that the <code>nodeValue</code> attribute \r
- * on the <code>Attr</code> instance can also be used to retrieve the string \r
- * version of the attribute's value(s). \r
- * <p>In XML, where the value of an attribute can contain entity references, \r
- * the child nodes of the <code>Attr</code> node may be either \r
- * <code>Text</code> or <code>EntityReference</code> nodes (when these are \r
- * in use; see the description of <code>EntityReference</code> for \r
- * discussion). Because the DOM Core is not aware of attribute types, it \r
- * treats all attribute values as simple strings, even if the DTD or schema \r
- * declares them as having tokenized types. \r
- * <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>.\r
- */\r
-public interface Attr extends Node {\r
- /**\r
- * Returns the name of this attribute. \r
- */\r
- public String getName();\r
-\r
- /**\r
- * If this attribute was explicitly given a value in the original \r
- * document, this is <code>true</code>; otherwise, it is \r
- * <code>false</code>. Note that the implementation is in charge of this \r
- * attribute, not the user. If the user changes the value of the \r
- * attribute (even if it ends up having the same value as the default \r
- * value) then the <code>specified</code> flag is automatically flipped \r
- * to <code>true</code>. To re-specify the attribute as the default \r
- * value from the DTD, the user must delete the attribute. The \r
- * implementation will then make a new attribute available with \r
- * <code>specified</code> set to <code>false</code> and the default \r
- * value (if one exists).\r
- * <br>In summary: If the attribute has an assigned value in the document \r
- * then <code>specified</code> is <code>true</code>, and the value is \r
- * the assigned value. If the attribute has no assigned value in the \r
- * document and has a default value in the DTD, then \r
- * <code>specified</code> is <code>false</code>, and the value is the \r
- * default value in the DTD. If the attribute has no assigned value in \r
- * the document and has a value of #IMPLIED in the DTD, then the \r
- * attribute does not appear in the structure model of the document. If \r
- * the <code>ownerElement</code> attribute is <code>null</code> (i.e. \r
- * because it was just created or was set to <code>null</code> by the \r
- * various removal and cloning operations) <code>specified</code> is \r
- * <code>true</code>. \r
- */\r
- public boolean getSpecified();\r
-\r
- /**\r
- * On retrieval, the value of the attribute is returned as a string. \r
- * Character and general entity references are replaced with their \r
- * values. See also the method <code>getAttribute</code> on the \r
- * <code>Element</code> interface.\r
- * <br>On setting, this creates a <code>Text</code> node with the unparsed \r
- * contents of the string. I.e. any characters that an XML processor \r
- * would recognize as markup are instead treated as literal text. See \r
- * also the method <code>setAttribute</code> on the <code>Element</code> \r
- * interface.\r
- * @exception DOMException\r
- * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.\r
- */\r
- public String getValue();\r
- public void setValue(String value)\r
- throws DOMException;\r
-\r
- /**\r
- * The <code>Element</code> node this attribute is attached to or \r
- * <code>null</code> if this attribute is not in use.\r
- * @since DOM Level 2\r
- */\r
- public Element getOwnerElement();\r
-\r
-}\r