jkesselm 2002-05-10 20:32:51 +00:00
parent 4ff561bf31
commit 3ad12ecf26
35 changed files with 1459 additions and 206 deletions

View File

@ -98,6 +98,19 @@ public interface Attr extends Node {
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/ */
public String getValue(); public String getValue();
/**
* On retrieval, the value of the attribute is returned as a string.
* Character and general entity references are replaced with their
* values. See also the method <code>getAttribute</code> on the
* <code>Element</code> interface.
* <br>On setting, this creates a <code>Text</code> node with the unparsed
* contents of the string. I.e. any characters that an XML processor
* would recognize as markup are instead treated as literal text. See
* also the method <code>setAttribute</code> on the <code>Element</code>
* interface.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/
public void setValue(String value) public void setValue(String value)
throws DOMException; throws DOMException;

View File

@ -44,6 +44,21 @@ public interface CharacterData extends Node {
*/ */
public String getData() public String getData()
throws DOMException; throws DOMException;
/**
* The character data of the node that implements this interface. The DOM
* implementation may not put arbitrary limits on the amount of data
* that may be stored in a <code>CharacterData</code> node. However,
* implementation limits may mean that the entirety of a node's data may
* not fit into a single <code>DOMString</code>. In such cases, the user
* may call <code>substringData</code> to retrieve the data in
* appropriately sized pieces.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
* @exception DOMException
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
* fit in a <code>DOMString</code> variable on the implementation
* platform.
*/
public void setData(String data) public void setData(String data)
throws DOMException; throws DOMException;

View File

@ -26,11 +26,7 @@ public interface DOMImplementation {
* specifications and listed in the section. The name must be an XML * specifications and listed in the section. The name must be an XML
* name. To avoid possible conflicts, as a convention, names referring * name. To avoid possible conflicts, as a convention, names referring
* to features defined outside the DOM specification should be made * to features defined outside the DOM specification should be made
* unique by reversing the name of the Internet domain name of the * unique.
* person (or the organization that the person belongs to) who defines
* the feature, component by component, and using this as a prefix.
* For instance, the W3C SVG Working Group defines the feature
* "org.w3c.dom.svg".
* @param version This is the version number of the feature to test. In * @param version This is the version number of the feature to test. In
* Level 2, the string can be either "2.0" or "1.0". If the version is * Level 2, the string can be either "2.0" or "1.0". If the version is
* not specified, supporting any version of the feature causes the * not specified, supporting any version of the feature causes the
@ -47,7 +43,6 @@ public interface DOMImplementation {
* default attribute additions do not occur. It is expected that a * default attribute additions do not occur. It is expected that a
* future version of the DOM will provide a way for populating a * future version of the DOM will provide a way for populating a
* <code>DocumentType</code>. * <code>DocumentType</code>.
* <br>HTML-only DOM implementations do not need to implement this method.
* @param qualifiedName The qualified name of the document type to be * @param qualifiedName The qualified name of the document type to be
* created. * created.
* @param publicId The external subset public identifier. * @param publicId The external subset public identifier.
@ -59,6 +54,12 @@ public interface DOMImplementation {
* contains an illegal character. * contains an illegal character.
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed. * malformed.
* <br>NOT_SUPPORTED_ERR: May be raised by DOM implementations which do
* not support the <code>"XML"</code> feature, if they choose not to
* support this method. Other features introduced in the future, by
* the DOM WG or in extensions defined by other groups, may also
* demand support for this method; please consult the definition of
* the feature to see if it requires this method.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public DocumentType createDocumentType(String qualifiedName, public DocumentType createDocumentType(String qualifiedName,
@ -67,10 +68,10 @@ public interface DOMImplementation {
throws DOMException; throws DOMException;
/** /**
* Creates an XML <code>Document</code> object of the specified type with * Creates a DOM Document object of the specified type with its document
* its document element. HTML-only DOM implementations do not need to * element.
* implement this method. * @param namespaceURI The namespace URI of the document element to
* @param namespaceURI The namespace URI of the document element to create. * create.
* @param qualifiedName The qualified name of the document element to be * @param qualifiedName The qualified name of the document element to be
* created. * created.
* @param doctype The type of document to be created or <code>null</code>. * @param doctype The type of document to be created or <code>null</code>.
@ -86,10 +87,19 @@ public interface DOMImplementation {
* <code>namespaceURI</code> is <code>null</code>, or if the * <code>namespaceURI</code> is <code>null</code>, or if the
* <code>qualifiedName</code> has a prefix that is "xml" and the * <code>qualifiedName</code> has a prefix that is "xml" and the
* <code>namespaceURI</code> is different from " * <code>namespaceURI</code> is different from "
* http://www.w3.org/XML/1998/namespace" . * http://www.w3.org/XML/1998/namespace" , or if the DOM
* implementation does not support the <code>"XML"</code> feature but
* a non-null namespace URI was provided, since namespaces were
* defined by XML.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already * <br>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already
* been used with a different document or was created from a different * been used with a different document or was created from a different
* implementation. * implementation.
* <br>NOT_SUPPORTED_ERR: May be raised by DOM implementations which do
* not support the "XML" feature, if they choose not to support this
* method. Other features introduced in the future, by the DOM WG or
* in extensions defined by other groups, may also demand support for
* this method; please consult the definition of the feature to see if
* it requires this method.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public Document createDocument(String namespaceURI, public Document createDocument(String namespaceURI,

View File

@ -255,7 +255,7 @@ public interface Document extends Node {
* types of nodes inheriting from <code>CharacterData</code> copy their * types of nodes inheriting from <code>CharacterData</code> copy their
* <code>data</code> and <code>length</code> attributes from those of * <code>data</code> and <code>length</code> attributes from those of
* the source node.</dd> * the source node.</dd>
* * </dl>
* @param importedNode The node to import. * @param importedNode The node to import.
* @param deep If <code>true</code>, recursively import the subtree under * @param deep If <code>true</code>, recursively import the subtree under
* the specified node; if <code>false</code>, import only the node * the specified node; if <code>false</code>, import only the node
@ -273,27 +273,56 @@ public interface Document extends Node {
/** /**
* Creates an element of the given qualified name and namespace URI. * Creates an element of the given qualified name and namespace URI.
* HTML-only DOM implementations do not need to implement this method.
* @param namespaceURI The namespace URI of the element to create. * @param namespaceURI The namespace URI of the element to create.
* @param qualifiedName The qualified name of the element type to * @param qualifiedName The qualified name of the element type to
* instantiate. * instantiate.
* @return A new <code>Element</code> object with the following * @return A new <code>Element</code> object with the following
* attributes:AttributeValue<code>Node.nodeName</code> * attributes:
* <code>qualifiedName</code><code>Node.namespaceURI</code> * <table border='1'>
* <code>namespaceURI</code><code>Node.prefix</code>prefix, extracted * <tr>
* <th>Attribute</th>
* <th>Value</th>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.nodeName</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>qualifiedName</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.namespaceURI</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>namespaceURI</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.prefix</code></td>
* <td valign='top' rowspan='1' colspan='1'>prefix, extracted
* from <code>qualifiedName</code>, or <code>null</code> if there is * from <code>qualifiedName</code>, or <code>null</code> if there is
* no prefix<code>Node.localName</code>local name, extracted from * no prefix</td>
* <code>qualifiedName</code><code>Element.tagName</code> * </tr>
* <code>qualifiedName</code> * <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.localName</code></td>
* <td valign='top' rowspan='1' colspan='1'>local name, extracted from
* <code>qualifiedName</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Element.tagName</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>qualifiedName</code></td>
* </tr>
* </table>
* @exception DOMException * @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name * INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character. * contains an illegal character, per the XML 1.0 specification .
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed, if the <code>qualifiedName</code> has a prefix and the * malformed per the Namespaces in XML specification, if the
* <code>qualifiedName</code> has a prefix and the
* <code>namespaceURI</code> is <code>null</code>, or if the * <code>namespaceURI</code> is <code>null</code>, or if the
* <code>qualifiedName</code> has a prefix that is "xml" and the * <code>qualifiedName</code> has a prefix that is "xml" and the
* <code>namespaceURI</code> is different from " * <code>namespaceURI</code> is different from "
* http://www.w3.org/XML/1998/namespace" . * http://www.w3.org/XML/1998/namespace" .
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
* support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public Element createElementNS(String namespaceURI, public Element createElementNS(String namespaceURI,
@ -302,30 +331,64 @@ public interface Document extends Node {
/** /**
* Creates an attribute of the given qualified name and namespace URI. * Creates an attribute of the given qualified name and namespace URI.
* HTML-only DOM implementations do not need to implement this method.
* @param namespaceURI The namespace URI of the attribute to create. * @param namespaceURI The namespace URI of the attribute to create.
* @param qualifiedName The qualified name of the attribute to instantiate. * @param qualifiedName The qualified name of the attribute to
* instantiate.
* @return A new <code>Attr</code> object with the following attributes: * @return A new <code>Attr</code> object with the following attributes:
* AttributeValue<code>Node.nodeName</code>qualifiedName * <table border='1'>
* <code>Node.namespaceURI</code><code>namespaceURI</code> * <tr>
* <code>Node.prefix</code>prefix, extracted from * <th>
* Attribute</th>
* <th>Value</th>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.nodeName</code></td>
* <td valign='top' rowspan='1' colspan='1'>qualifiedName</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>
* <code>Node.namespaceURI</code></td>
* <td valign='top' rowspan='1' colspan='1'><code>namespaceURI</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>
* <code>Node.prefix</code></td>
* <td valign='top' rowspan='1' colspan='1'>prefix, extracted from
* <code>qualifiedName</code>, or <code>null</code> if there is no * <code>qualifiedName</code>, or <code>null</code> if there is no
* prefix<code>Node.localName</code>local name, extracted from * prefix</td>
* <code>qualifiedName</code><code>Attr.name</code> * </tr>
* <code>qualifiedName</code><code>Node.nodeValue</code>the empty * <tr>
* string * <td valign='top' rowspan='1' colspan='1'><code>Node.localName</code></td>
* <td valign='top' rowspan='1' colspan='1'>local name, extracted from
* <code>qualifiedName</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Attr.name</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>qualifiedName</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.nodeValue</code></td>
* <td valign='top' rowspan='1' colspan='1'>the empty
* string</td>
* </tr>
* </table>
* @exception DOMException * @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name * INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character. * contains an illegal character, per the XML 1.0 specification .
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed, if the <code>qualifiedName</code> has a prefix and the * malformed per the Namespaces in XML specification, if the
* <code>qualifiedName</code> has a prefix and the
* <code>namespaceURI</code> is <code>null</code>, if the * <code>namespaceURI</code> is <code>null</code>, if the
* <code>qualifiedName</code> has a prefix that is "xml" and the * <code>qualifiedName</code> has a prefix that is "xml" and the
* <code>namespaceURI</code> is different from " * <code>namespaceURI</code> is different from "
* http://www.w3.org/XML/1998/namespace", or if the * http://www.w3.org/XML/1998/namespace", or if the
* <code>qualifiedName</code> is "xmlns" and the * <code>qualifiedName</code>, or its prefix, is "xmlns" and the
* <code>namespaceURI</code> is different from " * <code>namespaceURI</code> is different from "
* http://www.w3.org/2000/xmlns/". * http://www.w3.org/2000/xmlns/".
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
* support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public Attr createAttributeNS(String namespaceURI, public Attr createAttributeNS(String namespaceURI,

View File

@ -68,10 +68,11 @@ public interface DocumentType extends Node {
public String getSystemId(); public String getSystemId();
/** /**
* The internal subset as a string. The actual content returned depends on * The internal subset as a string, or <code>null</code> if there is none.
* how much information is available to the implementation. This may * This is does not contain the delimiting square brackets.The actual
* vary depending on various parameters, including the XML processor * content returned depends on how much information is available to the
* used to build the document. * implementation. This may vary depending on various parameters,
* including the XML processor used to build the document.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public String getInternalSubset(); public String getInternalSubset();

View File

@ -151,8 +151,11 @@ public interface Element extends Node {
public NodeList getElementsByTagName(String name); public NodeList getElementsByTagName(String name);
/** /**
* Retrieves an attribute value by local name and namespace URI. HTML-only * Retrieves an attribute value by local name and namespace URI.
* DOM implementations do not need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* the DOM Level 1 calls for creating/setting elements and attributes.
* Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the attribute to retrieve. * @param namespaceURI The namespace URI of the attribute to retrieve.
* @param localName The local name of the attribute to retrieve. * @param localName The local name of the attribute to retrieve.
* @return The <code>Attr</code> value as a string, or the empty string * @return The <code>Attr</code> value as a string, or the empty string
@ -177,7 +180,6 @@ public interface Element extends Node {
* and use <code>setAttributeNodeNS</code> or * and use <code>setAttributeNodeNS</code> or
* <code>setAttributeNode</code> to assign it as the value of an * <code>setAttributeNode</code> to assign it as the value of an
* attribute. * attribute.
* <br>HTML-only DOM implementations do not need to implement this method.
* @param namespaceURI The namespace URI of the attribute to create or * @param namespaceURI The namespace URI of the attribute to create or
* alter. * alter.
* @param qualifiedName The qualified name of the attribute to create or * @param qualifiedName The qualified name of the attribute to create or
@ -185,17 +187,21 @@ public interface Element extends Node {
* @param value The value to set in string form. * @param value The value to set in string form.
* @exception DOMException * @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name * INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character. * contains an illegal character, per the XML 1.0 specification .
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed, if the <code>qualifiedName</code> has a prefix and the * malformed per the Namespaces in XML specification, if the
* <code>qualifiedName</code> has a prefix and the
* <code>namespaceURI</code> is <code>null</code>, if the * <code>namespaceURI</code> is <code>null</code>, if the
* <code>qualifiedName</code> has a prefix that is "xml" and the * <code>qualifiedName</code> has a prefix that is "xml" and the
* <code>namespaceURI</code> is different from " * <code>namespaceURI</code> is different from "
* http://www.w3.org/XML/1998/namespace", or if the * http://www.w3.org/XML/1998/namespace", or if the
* <code>qualifiedName</code> is "xmlns" and the * <code>qualifiedName</code>, or its prefix, is "xmlns" and the
* <code>namespaceURI</code> is different from " * <code>namespaceURI</code> is different from "
* http://www.w3.org/2000/xmlns/". * http://www.w3.org/2000/xmlns/".
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
* support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public void setAttributeNS(String namespaceURI, public void setAttributeNS(String namespaceURI,
@ -208,7 +214,10 @@ public interface Element extends Node {
* attribute has a default value it is immediately replaced. The * attribute has a default value it is immediately replaced. The
* replacing attribute has the same namespace URI and local name, as * replacing attribute has the same namespace URI and local name, as
* well as the original prefix. * well as the original prefix.
* <br>HTML-only DOM implementations do not need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* the DOM Level 1 calls for creating/setting elements and attributes.
* Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the attribute to remove. * @param namespaceURI The namespace URI of the attribute to remove.
* @param localName The local name of the attribute to remove. * @param localName The local name of the attribute to remove.
* @exception DOMException * @exception DOMException
@ -221,7 +230,10 @@ public interface Element extends Node {
/** /**
* Retrieves an <code>Attr</code> node by local name and namespace URI. * Retrieves an <code>Attr</code> node by local name and namespace URI.
* HTML-only DOM implementations do not need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* the DOM Level 1 calls for creating/setting elements and attributes.
* Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the attribute to retrieve. * @param namespaceURI The namespace URI of the attribute to retrieve.
* @param localName The local name of the attribute to retrieve. * @param localName The local name of the attribute to retrieve.
* @return The <code>Attr</code> node with the specified attribute local * @return The <code>Attr</code> node with the specified attribute local
@ -236,7 +248,6 @@ public interface Element extends Node {
* Adds a new attribute. If an attribute with that local name and that * Adds a new attribute. If an attribute with that local name and that
* namespace URI is already present in the element, it is replaced by * namespace URI is already present in the element, it is replaced by
* the new one. * the new one.
* <br>HTML-only DOM implementations do not need to implement this method.
* @param newAttr The <code>Attr</code> node to add to the attribute list. * @param newAttr The <code>Attr</code> node to add to the attribute list.
* @return If the <code>newAttr</code> attribute replaces an existing * @return If the <code>newAttr</code> attribute replaces an existing
* attribute with the same local name and namespace URI, the replaced * attribute with the same local name and namespace URI, the replaced
@ -250,6 +261,9 @@ public interface Element extends Node {
* attribute of another <code>Element</code> object. The DOM user must * attribute of another <code>Element</code> object. The DOM user must
* explicitly clone <code>Attr</code> nodes to re-use them in other * explicitly clone <code>Attr</code> nodes to re-use them in other
* elements. * elements.
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
* support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public Attr setAttributeNodeNS(Attr newAttr) public Attr setAttributeNodeNS(Attr newAttr)
@ -260,7 +274,10 @@ public interface Element extends Node {
* <code>Elements</code> with a given local name and namespace URI in * <code>Elements</code> with a given local name and namespace URI in
* the order in which they are encountered in a preorder traversal of * the order in which they are encountered in a preorder traversal of
* this <code>Element</code> tree. * this <code>Element</code> tree.
* <br>HTML-only DOM implementations do not need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* the DOM Level 1 calls for creating/setting elements and attributes.
* Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the elements to match on. The * @param namespaceURI The namespace URI of the elements to match on. The
* special value "*" matches all namespaces. * special value "*" matches all namespaces.
* @param localName The local name of the elements to match on. The * @param localName The local name of the elements to match on. The
@ -287,8 +304,11 @@ public interface Element extends Node {
/** /**
* Returns <code>true</code> when an attribute with a given local name and * Returns <code>true</code> when an attribute with a given local name and
* namespace URI is specified on this element or has a default value, * namespace URI is specified on this element or has a default value,
* <code>false</code> otherwise. HTML-only DOM implementations do not * <code>false</code> otherwise.
* need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* the DOM Level 1 calls for creating/setting elements and attributes.
* Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the attribute to look for. * @param namespaceURI The namespace URI of the attribute to look for.
* @param localName The local name of the attribute to look for. * @param localName The local name of the attribute to look for.
* @return <code>true</code> if an attribute with the given local name * @return <code>true</code> if an attribute with the given local name

View File

@ -56,6 +56,11 @@ public interface NamedNodeMap {
* <code>Attr</code> that is already an attribute of another * <code>Attr</code> that is already an attribute of another
* <code>Element</code> object. The DOM user must explicitly clone * <code>Element</code> object. The DOM user must explicitly clone
* <code>Attr</code> nodes to re-use them in other elements. * <code>Attr</code> nodes to re-use them in other elements.
* <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
* doesn't belong in this NamedNodeMap. Examples would include trying
* to insert something other than an Attr node into an Element's map
* of attributes, or a non-Entity node into the DocumentType's map of
* Entities.
*/ */
public Node setNamedItem(Node arg) public Node setNamedItem(Node arg)
throws DOMException; throws DOMException;
@ -94,8 +99,11 @@ public interface NamedNodeMap {
public int getLength(); public int getLength();
/** /**
* Retrieves a node specified by local name and namespace URI. HTML-only * Retrieves a node specified by local name and namespace URI.
* DOM implementations do not need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* the DOM Level 1 calls for creating/setting elements and attributes.
* Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the node to retrieve. * @param namespaceURI The namespace URI of the node to retrieve.
* @param localName The local name of the node to retrieve. * @param localName The local name of the node to retrieve.
* @return A <code>Node</code> (of any type) with the specified local * @return A <code>Node</code> (of any type) with the specified local
@ -111,7 +119,6 @@ public interface NamedNodeMap {
* <code>localName</code>. If a node with that namespace URI and that * <code>localName</code>. If a node with that namespace URI and that
* local name is already present in this map, it is replaced by the new * local name is already present in this map, it is replaced by the new
* one. * one.
* <br>HTML-only DOM implementations do not need to implement this method.
* @param arg A node to store in this map. The node will later be * @param arg A node to store in this map. The node will later be
* accessible using the value of its <code>namespaceURI</code> and * accessible using the value of its <code>namespaceURI</code> and
* <code>localName</code> attributes. * <code>localName</code> attributes.
@ -126,6 +133,14 @@ public interface NamedNodeMap {
* <code>Attr</code> that is already an attribute of another * <code>Attr</code> that is already an attribute of another
* <code>Element</code> object. The DOM user must explicitly clone * <code>Element</code> object. The DOM user must explicitly clone
* <code>Attr</code> nodes to re-use them in other elements. * <code>Attr</code> nodes to re-use them in other elements.
* <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
* doesn't belong in this NamedNodeMap. Examples would include trying
* to insert something other than an Attr node into an Element's map
* of attributes, or a non-Entity node into the DocumentType's map of
* Entities.
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
* support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
* @since DOM Level 2 * @since DOM Level 2
*/ */
public Node setNamedItemNS(Node arg) public Node setNamedItemNS(Node arg)
@ -138,7 +153,10 @@ public interface NamedNodeMap {
* attribute of the <code>Node</code> interface. If so, an attribute * attribute of the <code>Node</code> interface. If so, an attribute
* immediately appears containing the default value as well as the * immediately appears containing the default value as well as the
* corresponding namespace URI, local name, and prefix when applicable. * corresponding namespace URI, local name, and prefix when applicable.
* <br>HTML-only DOM implementations do not need to implement this method. * <br>Documents which do not support the "XML" feature will permit only
* the DOM Level 1 calls for creating/setting elements and attributes.
* Hence, if you specify a non-null namespace URI, these DOMs will never
* find a matching node.
* @param namespaceURI The namespace URI of the node to remove. * @param namespaceURI The namespace URI of the node to remove.
* @param localName The local name of the node to remove. * @param localName The local name of the node to remove.
* @return The node removed from this map if a node with such a local * @return The node removed from this map if a node with such a local

View File

@ -29,6 +29,97 @@ package org.w3c.dom;
* ), this returns <code>null</code>. Note that the specialized interfaces * ), this returns <code>null</code>. Note that the specialized interfaces
* may contain additional and more convenient mechanisms to get and set the * may contain additional and more convenient mechanisms to get and set the
* relevant information. * relevant information.
* <p>The values of <code>nodeName</code>,
* <code>nodeValue</code>, and <code>attributes</code> vary according to the
* node type as follows:
* <table border='1'>
* <tr>
* <th>Interface</th>
* <th>nodeName</th>
* <th>nodeValue</th>
* <th>attributes</th>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Attr</td>
* <td valign='top' rowspan='1' colspan='1'>name of
* attribute</td>
* <td valign='top' rowspan='1' colspan='1'>value of attribute</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>CDATASection</td>
* <td valign='top' rowspan='1' colspan='1'><code>"#cdata-section"</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* content of the CDATA Section</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Comment</td>
* <td valign='top' rowspan='1' colspan='1'><code>"#comment"</code></td>
* <td valign='top' rowspan='1' colspan='1'>content of
* the comment</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Document</td>
* <td valign='top' rowspan='1' colspan='1'><code>"#document"</code></td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>DocumentFragment</td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>"#document-fragment"</code></td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>DocumentType</td>
* <td valign='top' rowspan='1' colspan='1'>document type name</td>
* <td valign='top' rowspan='1' colspan='1'>
* null</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Element</td>
* <td valign='top' rowspan='1' colspan='1'>tag name</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* <td valign='top' rowspan='1' colspan='1'>NamedNodeMap</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Entity</td>
* <td valign='top' rowspan='1' colspan='1'>entity name</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>
* EntityReference</td>
* <td valign='top' rowspan='1' colspan='1'>name of entity referenced</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Notation</td>
* <td valign='top' rowspan='1' colspan='1'>notation name</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* <td valign='top' rowspan='1' colspan='1'>
* null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>ProcessingInstruction</td>
* <td valign='top' rowspan='1' colspan='1'>target</td>
* <td valign='top' rowspan='1' colspan='1'>entire content excluding the target</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Text</td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>"#text"</code></td>
* <td valign='top' rowspan='1' colspan='1'>content of the text node</td>
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* </table>
* <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>. * <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>.
*/ */
public interface Node { public interface Node {
@ -99,6 +190,16 @@ public interface Node {
*/ */
public String getNodeValue() public String getNodeValue()
throws DOMException; throws DOMException;
/**
* The value of this node, depending on its type; see the table above.
* When it is defined to be <code>null</code>, setting it has no effect.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
* @exception DOMException
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
* fit in a <code>DOMString</code> variable on the implementation
* platform.
*/
public void setNodeValue(String nodeValue) public void setNodeValue(String nodeValue)
throws DOMException; throws DOMException;
@ -173,13 +274,14 @@ public interface Node {
* <code>refChild</code>. If the <code>newChild</code> is already in the * <code>refChild</code>. If the <code>newChild</code> is already in the
* tree, it is first removed. * tree, it is first removed.
* @param newChild The node to insert. * @param newChild The node to insert.
* @param refChild The reference node, i.e., the node before which the new * @param refChild The reference node, i.e., the node before which the
* node must be inserted. * new node must be inserted.
* @return The node being inserted. * @return The node being inserted.
* @exception DOMException * @exception DOMException
* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
* allow children of the type of the <code>newChild</code> node, or if * allow children of the type of the <code>newChild</code> node, or if
* the node to insert is one of this node's ancestors. * the node to insert is one of this node's ancestors or this node
* itself.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created * <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
* from a different document than the one that created this node. * from a different document than the one that created this node.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or
@ -205,7 +307,8 @@ public interface Node {
* @exception DOMException * @exception DOMException
* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
* allow children of the type of the <code>newChild</code> node, or if * allow children of the type of the <code>newChild</code> node, or if
* the node to put in is one of this node's ancestors. * the node to put in is one of this node's ancestors or this node
* itself.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created * <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
* from a different document than the one that created this node. * from a different document than the one that created this node.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of
@ -234,17 +337,19 @@ public interface Node {
* Adds the node <code>newChild</code> to the end of the list of children * Adds the node <code>newChild</code> to the end of the list of children
* of this node. If the <code>newChild</code> is already in the tree, it * of this node. If the <code>newChild</code> is already in the tree, it
* is first removed. * is first removed.
* @param newChild The node to add.If it is a <code>DocumentFragment</code> * @param newChild The node to add.If it is a
* object, the entire contents of the document fragment are moved * <code>DocumentFragment</code> object, the entire contents of the
* into the child list of this node * document fragment are moved into the child list of this node
* @return The node added. * @return The node added.
* @exception DOMException * @exception DOMException
* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
* allow children of the type of the <code>newChild</code> node, or if * allow children of the type of the <code>newChild</code> node, or if
* the node to append is one of this node's ancestors. * the node to append is one of this node's ancestors or this node
* itself.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created * <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
* from a different document than the one that created this node. * from a different document than the one that created this node.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or
* if the previous parent of the node being inserted is readonly.
*/ */
public Node appendChild(Node newChild) public Node appendChild(Node newChild)
throws DOMException; throws DOMException;
@ -352,20 +457,51 @@ public interface Node {
* <code>Document</code> interface, this is always <code>null</code>. * <code>Document</code> interface, this is always <code>null</code>.
* @exception DOMException * @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified prefix contains an * INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
* illegal character. * illegal character, per the XML 1.0 specification .
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is * <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is
* malformed, if the <code>namespaceURI</code> of this node is * malformed per the Namespaces in XML specification, if the
* <code>null</code>, if the specified prefix is "xml" and the * <code>namespaceURI</code> of this node is <code>null</code>, if the
* <code>namespaceURI</code> of this node is different from " * specified prefix is "xml" and the <code>namespaceURI</code> of this
* http://www.w3.org/XML/1998/namespace", if this node is an attribute * node is different from "http://www.w3.org/XML/1998/namespace", if
* and the specified prefix is "xmlns" and the * this node is an attribute and the specified prefix is "xmlns" and
* <code>namespaceURI</code> of this node is different from " * the <code>namespaceURI</code> of this node is different from "
* http://www.w3.org/2000/xmlns/", or if this node is an attribute and * http://www.w3.org/2000/xmlns/", or if this node is an attribute and
* the <code>qualifiedName</code> of this node is "xmlns" . * the <code>qualifiedName</code> of this node is "xmlns" .
* @since DOM Level 2 * @since DOM Level 2
*/ */
public String getPrefix(); public String getPrefix();
/**
* The namespace prefix of this node, or <code>null</code> if it is
* unspecified.
* <br>Note that setting this attribute, when permitted, changes the
* <code>nodeName</code> attribute, which holds the qualified name, as
* well as the <code>tagName</code> and <code>name</code> attributes of
* the <code>Element</code> and <code>Attr</code> interfaces, when
* applicable.
* <br>Note also that changing the prefix of an attribute that is known to
* have a default value, does not make a new attribute with the default
* value and the original prefix appear, since the
* <code>namespaceURI</code> and <code>localName</code> do not change.
* <br>For nodes of any type other than <code>ELEMENT_NODE</code> and
* <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
* method, such as <code>createElement</code> from the
* <code>Document</code> interface, this is always <code>null</code>.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
* illegal character, per the XML 1.0 specification .
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is
* malformed per the Namespaces in XML specification, if the
* <code>namespaceURI</code> of this node is <code>null</code>, if the
* specified prefix is "xml" and the <code>namespaceURI</code> of this
* node is different from "http://www.w3.org/XML/1998/namespace", if
* this node is an attribute and the specified prefix is "xmlns" and
* the <code>namespaceURI</code> of this node is different from "
* http://www.w3.org/2000/xmlns/", or if this node is an attribute and
* the <code>qualifiedName</code> of this node is "xmlns" .
* @since DOM Level 2
*/
public void setPrefix(String prefix) public void setPrefix(String prefix)
throws DOMException; throws DOMException;

View File

@ -34,6 +34,13 @@ public interface ProcessingInstruction extends Node {
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/ */
public String getData(); public String getData();
/**
* The content of this processing instruction. This is from the first non
* white space character after the target to the character immediately
* preceding the <code>?&gt;</code>.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/
public void setData(String data) public void setData(String data)
throws DOMException; throws DOMException;

File diff suppressed because it is too large Load Diff

View File

@ -42,6 +42,14 @@ public interface CSSCharsetRule extends CSSRule {
* readonly. * readonly.
*/ */
public String getEncoding(); public String getEncoding();
/**
* The encoding information used in this <code>@charset</code> rule.
* @exception DOMException
* SYNTAX_ERR: Raised if the specified encoding value has a syntax error
* and is unparsable.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this encoding rule is
* readonly.
*/
public void setEncoding(String encoding) public void setEncoding(String encoding)
throws DOMException; throws DOMException;

View File

@ -39,10 +39,10 @@ public interface CSSMediaRule extends CSSRule {
* this contains both the selector and the style declaration. For * this contains both the selector and the style declaration. For
* at-rules, this specifies both the at-identifier and the rule * at-rules, this specifies both the at-identifier and the rule
* content. * content.
* @param index The index within the media block's rule collection of the * @param index The index within the media block's rule collection of
* rule before which to insert the specified rule. If the specified * the rule before which to insert the specified rule. If the
* index is equal to the length of the media blocks's rule collection, * specified index is equal to the length of the media blocks's rule
* the rule will be added to the end of the media block. * collection, the rule will be added to the end of the media block.
* @return The index within the media block's rule collection of the * @return The index within the media block's rule collection of the
* newly inserted rule. * newly inserted rule.
* @exception DOMException * @exception DOMException
@ -62,8 +62,8 @@ public interface CSSMediaRule extends CSSRule {
/** /**
* Used to delete a rule from the media block. * Used to delete a rule from the media block.
* @param index The index within the media block's rule collection of the * @param index The index within the media block's rule collection of
* rule to remove. * the rule to remove.
* @exception DOMException * @exception DOMException
* INDEX_SIZE_ERR: Raised if the specified index does not correspond to * INDEX_SIZE_ERR: Raised if the specified index does not correspond to
* a rule in the media rule list. * a rule in the media rule list.

View File

@ -30,6 +30,13 @@ public interface CSSPageRule extends CSSRule {
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly. * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly.
*/ */
public String getSelectorText(); public String getSelectorText();
/**
* The parsable textual representation of the page selector for the rule.
* @exception DOMException
* SYNTAX_ERR: Raised if the specified CSS string value has a syntax
* error and is unparsable.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly.
*/
public void setSelectorText(String selectorText) public void setSelectorText(String selectorText)
throws DOMException; throws DOMException;

View File

@ -75,6 +75,18 @@ public interface CSSRule {
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if the rule is readonly. * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if the rule is readonly.
*/ */
public String getCssText(); public String getCssText();
/**
* The parsable textual representation of the rule. This reflects the
* current state of the rule and not its initial value.
* @exception DOMException
* SYNTAX_ERR: Raised if the specified CSS string value has a syntax
* error and is unparsable.
* <br>INVALID_MODIFICATION_ERR: Raised if the specified CSS string
* value represents a different type of rule than the current one.
* <br>HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at
* this point in the style sheet.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if the rule is readonly.
*/
public void setCssText(String cssText) public void setCssText(String cssText)
throws DOMException; throws DOMException;

View File

@ -47,14 +47,26 @@ public interface CSSStyleDeclaration {
* readonly or a property is readonly. * readonly or a property is readonly.
*/ */
public String getCssText(); public String getCssText();
/**
* The parsable textual representation of the declaration block
* (excluding the surrounding curly braces). Setting this attribute will
* result in the parsing of the new value and resetting of all the
* properties in the declaration block including the removal or addition
* of properties.
* @exception DOMException
* SYNTAX_ERR: Raised if the specified CSS string value has a syntax
* error and is unparsable.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is
* readonly or a property is readonly.
*/
public void setCssText(String cssText) public void setCssText(String cssText)
throws DOMException; throws DOMException;
/** /**
* Used to retrieve the value of a CSS property if it has been explicitly * Used to retrieve the value of a CSS property if it has been explicitly
* set within this declaration block. * set within this declaration block.
* @param propertyName The name of the CSS property. See the CSS property * @param propertyName The name of the CSS property. See the CSS
* index. * property index.
* @return Returns the value of the property if it has been explicitly * @return Returns the value of the property if it has been explicitly
* set for this declaration block. Returns the empty string if the * set for this declaration block. Returns the empty string if the
* property has not been set. * property has not been set.
@ -68,8 +80,8 @@ public interface CSSStyleDeclaration {
* property. Shorthand property values can only be accessed and modified * property. Shorthand property values can only be accessed and modified
* as strings, using the <code>getPropertyValue</code> and * as strings, using the <code>getPropertyValue</code> and
* <code>setProperty</code> methods. * <code>setProperty</code> methods.
* @param propertyName The name of the CSS property. See the CSS property * @param propertyName The name of the CSS property. See the CSS
* index. * property index.
* @return Returns the value of the property if it has been explicitly * @return Returns the value of the property if it has been explicitly
* set for this declaration block. Returns <code>null</code> if the * set for this declaration block. Returns <code>null</code> if the
* property has not been set. * property has not been set.
@ -79,8 +91,8 @@ public interface CSSStyleDeclaration {
/** /**
* Used to remove a CSS property if it has been explicitly set within * Used to remove a CSS property if it has been explicitly set within
* this declaration block. * this declaration block.
* @param propertyName The name of the CSS property. See the CSS property * @param propertyName The name of the CSS property. See the CSS
* index. * property index.
* @return Returns the value of the property if it has been explicitly * @return Returns the value of the property if it has been explicitly
* set for this declaration block. Returns the empty string if the * set for this declaration block. Returns the empty string if the
* property has not been set or the property name does not correspond * property has not been set or the property name does not correspond
@ -96,8 +108,8 @@ public interface CSSStyleDeclaration {
* Used to retrieve the priority of a CSS property (e.g. the * Used to retrieve the priority of a CSS property (e.g. the
* <code>"important"</code> qualifier) if the property has been * <code>"important"</code> qualifier) if the property has been
* explicitly set in this declaration block. * explicitly set in this declaration block.
* @param propertyName The name of the CSS property. See the CSS property * @param propertyName The name of the CSS property. See the CSS
* index. * property index.
* @return A string representing the priority (e.g. * @return A string representing the priority (e.g.
* <code>"important"</code>) if one exists. The empty string if none * <code>"important"</code>) if one exists. The empty string if none
* exists. * exists.
@ -107,8 +119,8 @@ public interface CSSStyleDeclaration {
/** /**
* Used to set a property value and priority within this declaration * Used to set a property value and priority within this declaration
* block. * block.
* @param propertyName The name of the CSS property. See the CSS property * @param propertyName The name of the CSS property. See the CSS
* index. * property index.
* @param value The new value of the property. * @param value The new value of the property.
* @param priority The new priority of the property (e.g. * @param priority The new priority of the property (e.g.
* <code>"important"</code>). * <code>"important"</code>).

View File

@ -31,6 +31,15 @@ public interface CSSStyleRule extends CSSRule {
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly. * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly.
*/ */
public String getSelectorText(); public String getSelectorText();
/**
* The textual representation of the selector for the rule set. The
* implementation may have stripped out insignificant whitespace while
* parsing the selector.
* @exception DOMException
* SYNTAX_ERR: Raised if the specified CSS string value has a syntax
* error and is unparsable.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly.
*/
public void setSelectorText(String selectorText) public void setSelectorText(String selectorText)
throws DOMException; throws DOMException;

View File

@ -57,6 +57,16 @@ public interface CSSValue {
* <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this value is readonly. * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this value is readonly.
*/ */
public String getCssText(); public String getCssText();
/**
* A string representation of the current value.
* @exception DOMException
* SYNTAX_ERR: Raised if the specified CSS string value has a syntax
* error (according to the attached property) or is unparsable.
* <br>INVALID_MODIFICATION_ERR: Raised if the specified CSS string
* value represents a different type of values than the values allowed
* by the CSS property.
* <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this value is readonly.
*/
public void setCssText(String cssText) public void setCssText(String cssText)
throws DOMException; throws DOMException;

View File

@ -26,8 +26,8 @@ public interface DOMImplementationCSS extends DOMImplementation {
/** /**
* Creates a new <code>CSSStyleSheet</code>. * Creates a new <code>CSSStyleSheet</code>.
* @param title The advisory title. See also the section. * @param title The advisory title. See also the section.
* @param media The comma-separated list of media associated with the new * @param media The comma-separated list of media associated with the
* style sheet. See also the section. * new style sheet. See also the section.
* @return A new CSS style sheet. * @return A new CSS style sheet.
* @exception DOMException * @exception DOMException
* SYNTAX_ERR: Raised if the specified media string value has a syntax * SYNTAX_ERR: Raised if the specified media string value has a syntax

View File

@ -12,8 +12,8 @@
package org.w3c.dom.css; package org.w3c.dom.css;
import org.w3c.dom.stylesheets.DocumentStyle;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.w3c.dom.stylesheets.DocumentStyle;
/** /**
* This interface represents a document with a CSS view. * This interface represents a document with a CSS view.

View File

@ -12,8 +12,8 @@
package org.w3c.dom.css; package org.w3c.dom.css;
import org.w3c.dom.views.AbstractView;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.w3c.dom.views.AbstractView;
/** /**
* This interface represents a CSS view. The <code>getComputedStyle</code> * This interface represents a CSS view. The <code>getComputedStyle</code>

View File

@ -117,10 +117,14 @@ public interface MouseEvent extends UIEvent {
* @param viewArg Specifies the <code>Event</code>'s * @param viewArg Specifies the <code>Event</code>'s
* <code>AbstractView</code>. * <code>AbstractView</code>.
* @param detailArg Specifies the <code>Event</code>'s mouse click count. * @param detailArg Specifies the <code>Event</code>'s mouse click count.
* @param screenXArg Specifies the <code>Event</code>'s screen x coordinate * @param screenXArg Specifies the <code>Event</code>'s screen x
* @param screenYArg Specifies the <code>Event</code>'s screen y coordinate * coordinate
* @param clientXArg Specifies the <code>Event</code>'s client x coordinate * @param screenYArg Specifies the <code>Event</code>'s screen y
* @param clientYArg Specifies the <code>Event</code>'s client y coordinate * coordinate
* @param clientXArg Specifies the <code>Event</code>'s client x
* coordinate
* @param clientYArg Specifies the <code>Event</code>'s client y
* coordinate
* @param ctrlKeyArg Specifies whether or not control key was depressed * @param ctrlKeyArg Specifies whether or not control key was depressed
* during the <code>Event</code>. * during the <code>Event</code>.
* @param altKeyArg Specifies whether or not alt key was depressed during * @param altKeyArg Specifies whether or not alt key was depressed during

View File

@ -13,8 +13,8 @@
package org.w3c.dom.ranges; package org.w3c.dom.ranges;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.DocumentFragment;
import org.w3c.dom.DOMException; import org.w3c.dom.DOMException;
import org.w3c.dom.DocumentFragment;
/** /**
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>. * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
@ -93,6 +93,8 @@ public interface Range {
* node. Child units are Nodes in all other cases. * node. Child units are Nodes in all other cases.
* <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already * <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already
* been invoked on this object. * been invoked on this object.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
* from a different document than the one that created this range.
*/ */
public void setStart(Node refNode, public void setStart(Node refNode,
int offset) int offset)
@ -115,6 +117,8 @@ public interface Range {
* node. Child units are Nodes in all other cases. * node. Child units are Nodes in all other cases.
* <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already * <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already
* been invoked on this object. * been invoked on this object.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
* from a different document than the one that created this range.
*/ */
public void setEnd(Node refNode, public void setEnd(Node refNode,
int offset) int offset)
@ -131,6 +135,8 @@ public interface Range {
* @exception DOMException * @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been * INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
* invoked on this object. * invoked on this object.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
* from a different document than the one that created this range.
*/ */
public void setStartBefore(Node refNode) public void setStartBefore(Node refNode)
throws RangeException, DOMException; throws RangeException, DOMException;
@ -146,6 +152,8 @@ public interface Range {
* @exception DOMException * @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been * INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
* invoked on this object. * invoked on this object.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
* from a different document than the one that created this range.
*/ */
public void setStartAfter(Node refNode) public void setStartAfter(Node refNode)
throws RangeException, DOMException; throws RangeException, DOMException;
@ -161,6 +169,8 @@ public interface Range {
* @exception DOMException * @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been * INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
* invoked on this object. * invoked on this object.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
* from a different document than the one that created this range.
*/ */
public void setEndBefore(Node refNode) public void setEndBefore(Node refNode)
throws RangeException, DOMException; throws RangeException, DOMException;
@ -176,6 +186,8 @@ public interface Range {
* @exception DOMException * @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been * INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
* invoked on this object. * invoked on this object.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
* from a different document than the one that created this range.
*/ */
public void setEndAfter(Node refNode) public void setEndAfter(Node refNode)
throws RangeException, DOMException; throws RangeException, DOMException;
@ -202,6 +214,8 @@ public interface Range {
* @exception DOMException * @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been * INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
* invoked on this object. * invoked on this object.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
* from a different document than the one that created this range.
*/ */
public void selectNode(Node refNode) public void selectNode(Node refNode)
throws RangeException, DOMException; throws RangeException, DOMException;
@ -215,6 +229,8 @@ public interface Range {
* @exception DOMException * @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been * INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
* invoked on this object. * invoked on this object.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
* from a different document than the one that created this range.
*/ */
public void selectNodeContents(Node refNode) public void selectNodeContents(Node refNode)
throws RangeException, DOMException; throws RangeException, DOMException;
@ -247,7 +263,8 @@ public interface Range {
/** /**
* Compare the boundary-points of two Ranges in a document. * Compare the boundary-points of two Ranges in a document.
* @param how A code representing the type of comparison, as defined above. * @param how A code representing the type of comparison, as defined
* above.
* @param sourceRange The <code>Range</code> on which this current * @param sourceRange The <code>Range</code> on which this current
* <code>Range</code> is compared to. * <code>Range</code> is compared to.
* @return -1, 0 or 1 depending on whether the corresponding * @return -1, 0 or 1 depending on whether the corresponding

View File

@ -35,6 +35,15 @@ public interface MediaList {
* readonly. * readonly.
*/ */
public String getMediaText(); public String getMediaText();
/**
* The parsable textual representation of the media list. This is a
* comma-separated list of media.
* @exception DOMException
* SYNTAX_ERR: Raised if the specified string value has a syntax error
* and is unparsable.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is
* readonly.
*/
public void setMediaText(String mediaText) public void setMediaText(String mediaText)
throws DOMException; throws DOMException;

View File

@ -44,6 +44,14 @@ public interface StyleSheet {
* user agent, the <code>disabled</code> attribute is ignored. * user agent, the <code>disabled</code> attribute is ignored.
*/ */
public boolean getDisabled(); public boolean getDisabled();
/**
* <code>false</code> if the style sheet is applied to the document.
* <code>true</code> if it is not. Modifying this attribute may cause a
* new resolution of style for the document. A stylesheet only applies
* if both an appropriate medium definition is present and the disabled
* attribute is false. So, if the media doesn't apply to the current
* user agent, the <code>disabled</code> attribute is ignored.
*/
public void setDisabled(boolean disabled); public void setDisabled(boolean disabled);
/** /**

View File

@ -16,12 +16,13 @@ import org.w3c.dom.Node;
import org.w3c.dom.DOMException; import org.w3c.dom.DOMException;
/** /**
* <code>DocumentTraversal</code> contains methods that create iterators and * <code>DocumentTraversal</code> contains methods that create
* tree-walkers to traverse a node and its children in document order (depth * <code>NodeIterators</code> and <code>TreeWalkers</code> to traverse a
* first, pre-order traversal, which is equivalent to the order in which the * node and its children in document order (depth first, pre-order
* start tags occur in the text representation of the document). In DOMs * traversal, which is equivalent to the order in which the start tags occur
* which support the Traversal feature, <code>DocumentTraversal</code> will * in the text representation of the document). In DOMs which support the
* be implemented by the same objects that implement the Document interface. * Traversal feature, <code>DocumentTraversal</code> will be implemented by
* the same objects that implement the Document interface.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>. * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
* @since DOM Level 2 * @since DOM Level 2
*/ */
@ -29,16 +30,16 @@ public interface DocumentTraversal {
/** /**
* Create a new <code>NodeIterator</code> over the subtree rooted at the * Create a new <code>NodeIterator</code> over the subtree rooted at the
* specified node. * specified node.
* @param root The node which will be iterated together with its children. * @param root The node which will be iterated together with its
* The iterator is initially positioned just before this node. The * children. The <code>NodeIterator</code> is initially positioned
* <code>whatToShow</code> flags and the filter, if any, are not * just before this node. The <code>whatToShow</code> flags and the
* considered when setting this position. The root must not be * filter, if any, are not considered when setting this position. The
* <code>null</code>. * root must not be <code>null</code>.
* @param whatToShow This flag specifies which node types may appear in * @param whatToShow This flag specifies which node types may appear in
* the logical view of the tree presented by the iterator. See the * the logical view of the tree presented by the
* description of <code>NodeFilter</code> for the set of possible * <code>NodeIterator</code>. See the description of
* <code>SHOW_</code> values.These flags can be combined using * <code>NodeFilter</code> for the set of possible <code>SHOW_</code>
* <code>OR</code>. * values.These flags can be combined using <code>OR</code>.
* @param filter The <code>NodeFilter</code> to be used with this * @param filter The <code>NodeFilter</code> to be used with this
* <code>TreeWalker</code>, or <code>null</code> to indicate no filter. * <code>TreeWalker</code>, or <code>null</code> to indicate no filter.
* @param entityReferenceExpansion The value of this flag determines * @param entityReferenceExpansion The value of this flag determines
@ -68,9 +69,10 @@ public interface DocumentTraversal {
* <code>parentNode</code> and nextNode. The <code>root</code> must * <code>parentNode</code> and nextNode. The <code>root</code> must
* not be <code>null</code>. * not be <code>null</code>.
* @param whatToShow This flag specifies which node types may appear in * @param whatToShow This flag specifies which node types may appear in
* the logical view of the tree presented by the tree-walker. See the * the logical view of the tree presented by the
* description of <code>NodeFilter</code> for the set of possible * <code>TreeWalker</code>. See the description of
* SHOW_ values.These flags can be combined using <code>OR</code>. * <code>NodeFilter</code> for the set of possible <code>SHOW_</code>
* values.These flags can be combined using <code>OR</code>.
* @param filter The <code>NodeFilter</code> to be used with this * @param filter The <code>NodeFilter</code> to be used with this
* <code>TreeWalker</code>, or <code>null</code> to indicate no filter. * <code>TreeWalker</code>, or <code>null</code> to indicate no filter.
* @param entityReferenceExpansion If this flag is false, the contents of * @param entityReferenceExpansion If this flag is false, the contents of

View File

@ -68,11 +68,11 @@ public interface NodeFilter {
public static final int SHOW_ELEMENT = 0x00000001; public static final int SHOW_ELEMENT = 0x00000001;
/** /**
* Show <code>Attr</code> nodes. This is meaningful only when creating an * Show <code>Attr</code> nodes. This is meaningful only when creating an
* iterator or tree-walker with an attribute node as its * <code>NodeIterator</code> or <code>TreeWalker</code> with an
* <code>root</code>; in this case, it means that the attribute node * attribute node as its <code>root</code>; in this case, it means that
* will appear in the first position of the iteration or traversal. * the attribute node will appear in the first position of the iteration
* Since attributes are never children of other nodes, they do not * or traversal. Since attributes are never children of other nodes,
* appear when traversing over the document tree. * they do not appear when traversing over the document tree.
*/ */
public static final int SHOW_ATTRIBUTE = 0x00000002; public static final int SHOW_ATTRIBUTE = 0x00000002;
/** /**
@ -89,11 +89,12 @@ public interface NodeFilter {
public static final int SHOW_ENTITY_REFERENCE = 0x00000010; public static final int SHOW_ENTITY_REFERENCE = 0x00000010;
/** /**
* Show <code>Entity</code> nodes. This is meaningful only when creating * Show <code>Entity</code> nodes. This is meaningful only when creating
* an iterator or tree-walker with an<code> Entity</code> node as its * an <code>NodeIterator</code> or <code>TreeWalker</code> with an
* <code>root</code>; in this case, it means that the <code>Entity</code> * <code>Entity</code> node as its <code>root</code>; in this case, it
* node will appear in the first position of the traversal. Since * means that the <code>Entity</code> node will appear in the first
* entities are not part of the document tree, they do not appear when * position of the traversal. Since entities are not part of the
* traversing over the document tree. * document tree, they do not appear when traversing over the document
* tree.
*/ */
public static final int SHOW_ENTITY = 0x00000020; public static final int SHOW_ENTITY = 0x00000020;
/** /**
@ -118,11 +119,12 @@ public interface NodeFilter {
public static final int SHOW_DOCUMENT_FRAGMENT = 0x00000400; public static final int SHOW_DOCUMENT_FRAGMENT = 0x00000400;
/** /**
* Show <code>Notation</code> nodes. This is meaningful only when creating * Show <code>Notation</code> nodes. This is meaningful only when creating
* an iterator or tree-walker with a <code>Notation</code> node as its * an <code>NodeIterator</code> or <code>TreeWalker</code> with a
* <code>root</code>; in this case, it means that the * <code>Notation</code> node as its <code>root</code>; in this case, it
* <code>Notation</code> node will appear in the first position of the * means that the <code>Notation</code> node will appear in the first
* traversal. Since notations are not part of the document tree, they do * position of the traversal. Since notations are not part of the
* not appear when traversing over the document tree. * document tree, they do not appear when traversing over the document
* tree.
*/ */
public static final int SHOW_NOTATION = 0x00000800; public static final int SHOW_NOTATION = 0x00000800;
@ -134,7 +136,7 @@ public interface NodeFilter {
* user code. (Though you could do so if you wanted to use the same * user code. (Though you could do so if you wanted to use the same
* filter to guide your own application logic.) * filter to guide your own application logic.)
* @param n The node to check to see if it passes the filter or not. * @param n The node to check to see if it passes the filter or not.
* @return a constant to determine whether the node is accepted, * @return A constant to determine whether the node is accepted,
* rejected, or skipped, as defined above. * rejected, or skipped, as defined above.
*/ */
public short acceptNode(Node n); public short acceptNode(Node n);

View File

@ -16,15 +16,15 @@ import org.w3c.dom.Node;
import org.w3c.dom.DOMException; import org.w3c.dom.DOMException;
/** /**
* <code>Iterators</code> are used to step through a set of nodes, e.g. the * <code>NodeIterators</code> are used to step through a set of nodes, e.g.
* set of nodes in a <code>NodeList</code>, the document subtree governed by * the set of nodes in a <code>NodeList</code>, the document subtree
* a particular <code>Node</code>, the results of a query, or any other set * governed by a particular <code>Node</code>, the results of a query, or
* of nodes. The set of nodes to be iterated is determined by the * any other set of nodes. The set of nodes to be iterated is determined by
* implementation of the <code>NodeIterator</code>. DOM Level 2 specifies a * the implementation of the <code>NodeIterator</code>. DOM Level 2
* single <code>NodeIterator</code> implementation for document-order * specifies a single <code>NodeIterator</code> implementation for
* traversal of a document subtree. Instances of these iterators are created * document-order traversal of a document subtree. Instances of these
* by calling <code>DocumentTraversal</code> * <code>NodeIterators</code> are created by calling
* <code>.createNodeIterator()</code>. * <code>DocumentTraversal</code><code>.createNodeIterator()</code>.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>. * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
* @since DOM Level 2 * @since DOM Level 2
*/ */
@ -37,8 +37,8 @@ public interface NodeIterator {
/** /**
* This attribute determines which node types are presented via the * This attribute determines which node types are presented via the
* iterator. The available set of constants is defined in the * <code>NodeIterator</code>. The available set of constants is defined
* <code>NodeFilter</code> interface. Nodes not accepted by * in the <code>NodeFilter</code> interface. Nodes not accepted by
* <code>whatToShow</code> will be skipped, but their children may still * <code>whatToShow</code> will be skipped, but their children may still
* be considered. Note that this skip takes precedence over the filter, * be considered. Note that this skip takes precedence over the filter,
* if any. * if any.
@ -52,10 +52,10 @@ public interface NodeIterator {
/** /**
* The value of this flag determines whether the children of entity * The value of this flag determines whether the children of entity
* reference nodes are visible to the iterator. If false, they and * reference nodes are visible to the <code>NodeIterator</code>. If
* their descendants will be rejected. Note that this rejection takes * false, these children and their descendants will be rejected. Note
* precedence over <code>whatToShow</code> and the filter. Also note * that this rejection takes precedence over <code>whatToShow</code> and
* that this is currently the only situation where * the filter. Also note that this is currently the only situation where
* <code>NodeIterators</code> may reject a complete subtree rather than * <code>NodeIterators</code> may reject a complete subtree rather than
* skipping individual nodes. * skipping individual nodes.
* <br> * <br>
@ -63,18 +63,18 @@ public interface NodeIterator {
* expanded and does not expose the entity reference node itself, use * expanded and does not expose the entity reference node itself, use
* the <code>whatToShow</code> flags to hide the entity reference node * the <code>whatToShow</code> flags to hide the entity reference node
* and set <code>expandEntityReferences</code> to true when creating the * and set <code>expandEntityReferences</code> to true when creating the
* iterator. To produce a view of the document that has entity reference * <code>NodeIterator</code>. To produce a view of the document that has
* nodes but no entity expansion, use the <code>whatToShow</code> flags * entity reference nodes but no entity expansion, use the
* to show the entity reference node and set * <code>whatToShow</code> flags to show the entity reference node and
* <code>expandEntityReferences</code> to false. * set <code>expandEntityReferences</code> to false.
*/ */
public boolean getExpandEntityReferences(); public boolean getExpandEntityReferences();
/** /**
* Returns the next node in the set and advances the position of the * Returns the next node in the set and advances the position of the
* iterator in the set. After a <code>NodeIterator</code> is created, * <code>NodeIterator</code> in the set. After a
* the first call to <code>nextNode()</code> returns the first node in * <code>NodeIterator</code> is created, the first call to
* the set. * <code>nextNode()</code> returns the first node in the set.
* @return The next <code>Node</code> in the set being iterated over, or * @return The next <code>Node</code> in the set being iterated over, or
* <code>null</code> if there are no more members in that set. * <code>null</code> if there are no more members in that set.
* @exception DOMException * @exception DOMException
@ -98,10 +98,11 @@ public interface NodeIterator {
/** /**
* Detaches the <code>NodeIterator</code> from the set which it iterated * Detaches the <code>NodeIterator</code> from the set which it iterated
* over, releasing any computational resources and placing the iterator * over, releasing any computational resources and placing the
* in the INVALID state. After <code>detach</code> has been invoked, * <code>NodeIterator</code> in the INVALID state. After
* calls to <code>nextNode</code> or <code>previousNode</code> will * <code>detach</code> has been invoked, calls to <code>nextNode</code>
* raise the exception INVALID_STATE_ERR. * or <code>previousNode</code> will raise the exception
* INVALID_STATE_ERR.
*/ */
public void detach(); public void detach();

View File

@ -58,8 +58,8 @@ public interface TreeWalker {
/** /**
* The value of this flag determines whether the children of entity * The value of this flag determines whether the children of entity
* reference nodes are visible to the <code>TreeWalker</code>. If false, * reference nodes are visible to the <code>TreeWalker</code>. If false,
* they and their descendants will be rejected. Note that this * these children and their descendants will be rejected. Note that
* rejection takes precedence over <code>whatToShow</code> and the * this rejection takes precedence over <code>whatToShow</code> and the
* filter, if any. * filter, if any.
* <br> To produce a view of the document that has entity references * <br> To produce a view of the document that has entity references
* expanded and does not expose the entity reference node itself, use * expanded and does not expose the entity reference node itself, use
@ -88,6 +88,21 @@ public interface TreeWalker {
* <code>currentNode</code> to <code>null</code>. * <code>currentNode</code> to <code>null</code>.
*/ */
public Node getCurrentNode(); public Node getCurrentNode();
/**
* The node at which the <code>TreeWalker</code> is currently positioned.
* <br>Alterations to the DOM tree may cause the current node to no longer
* be accepted by the <code>TreeWalker</code>'s associated filter.
* <code>currentNode</code> may also be explicitly set to any node,
* whether or not it is within the subtree specified by the
* <code>root</code> node or would be accepted by the filter and
* <code>whatToShow</code> flags. Further traversal occurs relative to
* <code>currentNode</code> even if it is not part of the current view,
* by applying the filters in the requested direction; if no traversal
* is possible, <code>currentNode</code> is not changed.
* @exception DOMException
* NOT_SUPPORTED_ERR: Raised if an attempt is made to set
* <code>currentNode</code> to <code>null</code>.
*/
public void setCurrentNode(Node currentNode) public void setCurrentNode(Node currentNode)
throws DOMException; throws DOMException;