src/org/w3c/dom/Element.java

Print this page
rev 602 : 8047723: @since tag cleanup in jaxp
Reviewed-by:


 186      * @param name The name of the tag to match on. The special value "*"
 187      *   matches all tags.
 188      * @return A list of matching <code>Element</code> nodes.
 189      */
 190     public NodeList getElementsByTagName(String name);
 191 
 192     /**
 193      * Retrieves an attribute value by local name and namespace URI.
 194      * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
 195      * , applications must use the value <code>null</code> as the
 196      * <code>namespaceURI</code> parameter for methods if they wish to have
 197      * no namespace.
 198      * @param namespaceURI The namespace URI of the attribute to retrieve.
 199      * @param localName The local name of the attribute to retrieve.
 200      * @return The <code>Attr</code> value as a string, or the empty string
 201      *   if that attribute does not have a specified or default value.
 202      * @exception DOMException
 203      *   NOT_SUPPORTED_ERR: May be raised if the implementation does not
 204      *   support the feature <code>"XML"</code> and the language exposed
 205      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 206      * @since DOM Level 2
 207      */
 208     public String getAttributeNS(String namespaceURI,
 209                                  String localName)
 210                                  throws DOMException;
 211 
 212     /**
 213      * Adds a new attribute. If an attribute with the same local name and
 214      * namespace URI is already present on the element, its prefix is
 215      * changed to be the prefix part of the <code>qualifiedName</code>, and
 216      * its value is changed to be the <code>value</code> parameter. This
 217      * value is a simple string; it is not parsed as it is being set. So any
 218      * markup (such as syntax to be recognized as an entity reference) is
 219      * treated as literal text, and needs to be appropriately escaped by the
 220      * implementation when it is written out. In order to assign an
 221      * attribute value that contains entity references, the user must create
 222      * an <code>Attr</code> node plus any <code>Text</code> and
 223      * <code>EntityReference</code> nodes, build the appropriate subtree,
 224      * and use <code>setAttributeNodeNS</code> or
 225      * <code>setAttributeNode</code> to assign it as the value of an
 226      * attribute.


 232      *   alter.
 233      * @param qualifiedName The qualified name of the attribute to create or
 234      *   alter.
 235      * @param value The value to set in string form.
 236      * @exception DOMException
 237      *   INVALID_CHARACTER_ERR: Raised if the specified qualified name is not
 238      *   an XML name according to the XML version in use specified in the
 239      *   <code>Document.xmlVersion</code> attribute.
 240      *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 241      *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
 242      *   malformed per the Namespaces in XML specification, if the
 243      *   <code>qualifiedName</code> has a prefix and the
 244      *   <code>namespaceURI</code> is <code>null</code>, if the
 245      *   <code>qualifiedName</code> has a prefix that is "xml" and the
 246      *   <code>namespaceURI</code> is different from "<a href='http://www.w3.org/XML/1998/namespace'>
 247      *   http://www.w3.org/XML/1998/namespace</a>", if the <code>qualifiedName</code> or its prefix is "xmlns" and the
 248      *   <code>namespaceURI</code> is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>", or if the <code>namespaceURI</code> is "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>" and neither the <code>qualifiedName</code> nor its prefix is "xmlns".
 249      *   <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
 250      *   support the feature <code>"XML"</code> and the language exposed
 251      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 252      * @since DOM Level 2
 253      */
 254     public void setAttributeNS(String namespaceURI,
 255                                String qualifiedName,
 256                                String value)
 257                                throws DOMException;
 258 
 259     /**
 260      * Removes an attribute by local name and namespace URI. If a default
 261      * value for the removed attribute is defined in the DTD, a new
 262      * attribute immediately appears with the default value as well as the
 263      * corresponding namespace URI, local name, and prefix when applicable.
 264      * The implementation may handle default values from other schemas
 265      * similarly but applications should use
 266      * <code>Document.normalizeDocument()</code> to guarantee this
 267      * information is up-to-date.
 268      * <br>If no attribute with this local name and namespace URI is found,
 269      * this method has no effect.
 270      * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
 271      * , applications must use the value <code>null</code> as the
 272      * <code>namespaceURI</code> parameter for methods if they wish to have
 273      * no namespace.
 274      * @param namespaceURI The namespace URI of the attribute to remove.
 275      * @param localName The local name of the attribute to remove.
 276      * @exception DOMException
 277      *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 278      *   <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
 279      *   support the feature <code>"XML"</code> and the language exposed
 280      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 281      * @since DOM Level 2
 282      */
 283     public void removeAttributeNS(String namespaceURI,
 284                                   String localName)
 285                                   throws DOMException;
 286 
 287     /**
 288      * Retrieves an <code>Attr</code> node by local name and namespace URI.
 289      * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
 290      * , applications must use the value <code>null</code> as the
 291      * <code>namespaceURI</code> parameter for methods if they wish to have
 292      * no namespace.
 293      * @param namespaceURI The namespace URI of the attribute to retrieve.
 294      * @param localName The local name of the attribute to retrieve.
 295      * @return The <code>Attr</code> node with the specified attribute local
 296      *   name and namespace URI or <code>null</code> if there is no such
 297      *   attribute.
 298      * @exception DOMException
 299      *   NOT_SUPPORTED_ERR: May be raised if the implementation does not
 300      *   support the feature <code>"XML"</code> and the language exposed
 301      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 302      * @since DOM Level 2
 303      */
 304     public Attr getAttributeNodeNS(String namespaceURI,
 305                                    String localName)
 306                                    throws DOMException;
 307 
 308     /**
 309      * Adds a new attribute. If an attribute with that local name and that
 310      * namespace URI is already present in the element, it is replaced by
 311      * the new one. Replacing an attribute node by itself has no effect.
 312      * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
 313      * , applications must use the value <code>null</code> as the
 314      * <code>namespaceURI</code> parameter for methods if they wish to have
 315      * no namespace.
 316      * @param newAttr The <code>Attr</code> node to add to the attribute list.
 317      * @return If the <code>newAttr</code> attribute replaces an existing
 318      *   attribute with the same local name and namespace URI, the replaced
 319      *   <code>Attr</code> node is returned, otherwise <code>null</code> is
 320      *   returned.
 321      * @exception DOMException
 322      *   WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a
 323      *   different document than the one that created the element.
 324      *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 325      *   <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
 326      *   attribute of another <code>Element</code> object. The DOM user must
 327      *   explicitly clone <code>Attr</code> nodes to re-use them in other
 328      *   elements.
 329      *   <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
 330      *   support the feature <code>"XML"</code> and the language exposed
 331      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 332      * @since DOM Level 2
 333      */
 334     public Attr setAttributeNodeNS(Attr newAttr)
 335                                    throws DOMException;
 336 
 337     /**
 338      * Returns a <code>NodeList</code> of all the descendant
 339      * <code>Elements</code> with a given local name and namespace URI in
 340      * document order.
 341      * @param namespaceURI The namespace URI of the elements to match on. The
 342      *   special value "*" matches all namespaces.
 343      * @param localName The local name of the elements to match on. The
 344      *   special value "*" matches all local names.
 345      * @return A new <code>NodeList</code> object containing all the matched
 346      *   <code>Elements</code>.
 347      * @exception DOMException
 348      *   NOT_SUPPORTED_ERR: May be raised if the implementation does not
 349      *   support the feature <code>"XML"</code> and the language exposed
 350      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 351      * @since DOM Level 2
 352      */
 353     public NodeList getElementsByTagNameNS(String namespaceURI,
 354                                            String localName)
 355                                            throws DOMException;
 356 
 357     /**
 358      * Returns <code>true</code> when an attribute with a given name is
 359      * specified on this element or has a default value, <code>false</code>
 360      * otherwise.
 361      * @param name The name of the attribute to look for.
 362      * @return <code>true</code> if an attribute with the given name is
 363      *   specified on this element or has a default value, <code>false</code>
 364      *    otherwise.
 365      * @since DOM Level 2
 366      */
 367     public boolean hasAttribute(String name);
 368 
 369     /**
 370      * Returns <code>true</code> when an attribute with a given local name and
 371      * namespace URI is specified on this element or has a default value,
 372      * <code>false</code> otherwise.
 373      * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
 374      * , applications must use the value <code>null</code> as the
 375      * <code>namespaceURI</code> parameter for methods if they wish to have
 376      * no namespace.
 377      * @param namespaceURI The namespace URI of the attribute to look for.
 378      * @param localName The local name of the attribute to look for.
 379      * @return <code>true</code> if an attribute with the given local name
 380      *   and namespace URI is specified or has a default value on this
 381      *   element, <code>false</code> otherwise.
 382      * @exception DOMException
 383      *   NOT_SUPPORTED_ERR: May be raised if the implementation does not
 384      *   support the feature <code>"XML"</code> and the language exposed
 385      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 386      * @since DOM Level 2
 387      */
 388     public boolean hasAttributeNS(String namespaceURI,
 389                                   String localName)
 390                                   throws DOMException;
 391 
 392     /**
 393      *  The type information associated with this element.
 394      * @since DOM Level 3
 395      */
 396     public TypeInfo getSchemaTypeInfo();
 397 
 398     /**
 399      *  If the parameter <code>isId</code> is <code>true</code>, this method
 400      * declares the specified attribute to be a user-determined ID attribute
 401      * . This affects the value of <code>Attr.isId</code> and the behavior
 402      * of <code>Document.getElementById</code>, but does not change any
 403      * schema that may be in use, in particular this does not affect the
 404      * <code>Attr.schemaTypeInfo</code> of the specified <code>Attr</code>
 405      * node. Use the value <code>false</code> for the parameter
 406      * <code>isId</code> to undeclare an attribute for being a
 407      * user-determined ID attribute.
 408      * <br> To specify an attribute by local name and namespace URI, use the
 409      * <code>setIdAttributeNS</code> method.
 410      * @param name The name of the attribute.
 411      * @param isId Whether the attribute is a of type ID.
 412      * @exception DOMException
 413      *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 414      *   <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
 415      *   of this element.
 416      * @since DOM Level 3
 417      */
 418     public void setIdAttribute(String name,
 419                                boolean isId)
 420                                throws DOMException;
 421 
 422     /**
 423      *  If the parameter <code>isId</code> is <code>true</code>, this method
 424      * declares the specified attribute to be a user-determined ID attribute
 425      * . This affects the value of <code>Attr.isId</code> and the behavior
 426      * of <code>Document.getElementById</code>, but does not change any
 427      * schema that may be in use, in particular this does not affect the
 428      * <code>Attr.schemaTypeInfo</code> of the specified <code>Attr</code>
 429      * node. Use the value <code>false</code> for the parameter
 430      * <code>isId</code> to undeclare an attribute for being a
 431      * user-determined ID attribute.
 432      * @param namespaceURI The namespace URI of the attribute.
 433      * @param localName The local name of the attribute.
 434      * @param isId Whether the attribute is a of type ID.
 435      * @exception DOMException
 436      *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 437      *   <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
 438      *   of this element.
 439      * @since DOM Level 3
 440      */
 441     public void setIdAttributeNS(String namespaceURI,
 442                                  String localName,
 443                                  boolean isId)
 444                                  throws DOMException;
 445 
 446     /**
 447      *  If the parameter <code>isId</code> is <code>true</code>, this method
 448      * declares the specified attribute to be a user-determined ID attribute
 449      * . This affects the value of <code>Attr.isId</code> and the behavior
 450      * of <code>Document.getElementById</code>, but does not change any
 451      * schema that may be in use, in particular this does not affect the
 452      * <code>Attr.schemaTypeInfo</code> of the specified <code>Attr</code>
 453      * node. Use the value <code>false</code> for the parameter
 454      * <code>isId</code> to undeclare an attribute for being a
 455      * user-determined ID attribute.
 456      * @param idAttr The attribute node.
 457      * @param isId Whether the attribute is a of type ID.
 458      * @exception DOMException
 459      *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 460      *   <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
 461      *   of this element.
 462      * @since DOM Level 3
 463      */
 464     public void setIdAttributeNode(Attr idAttr,
 465                                    boolean isId)
 466                                    throws DOMException;
 467 
 468 }


 186      * @param name The name of the tag to match on. The special value "*"
 187      *   matches all tags.
 188      * @return A list of matching <code>Element</code> nodes.
 189      */
 190     public NodeList getElementsByTagName(String name);
 191 
 192     /**
 193      * Retrieves an attribute value by local name and namespace URI.
 194      * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
 195      * , applications must use the value <code>null</code> as the
 196      * <code>namespaceURI</code> parameter for methods if they wish to have
 197      * no namespace.
 198      * @param namespaceURI The namespace URI of the attribute to retrieve.
 199      * @param localName The local name of the attribute to retrieve.
 200      * @return The <code>Attr</code> value as a string, or the empty string
 201      *   if that attribute does not have a specified or default value.
 202      * @exception DOMException
 203      *   NOT_SUPPORTED_ERR: May be raised if the implementation does not
 204      *   support the feature <code>"XML"</code> and the language exposed
 205      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 206      * @since 1.4, DOM Level 2
 207      */
 208     public String getAttributeNS(String namespaceURI,
 209                                  String localName)
 210                                  throws DOMException;
 211 
 212     /**
 213      * Adds a new attribute. If an attribute with the same local name and
 214      * namespace URI is already present on the element, its prefix is
 215      * changed to be the prefix part of the <code>qualifiedName</code>, and
 216      * its value is changed to be the <code>value</code> parameter. This
 217      * value is a simple string; it is not parsed as it is being set. So any
 218      * markup (such as syntax to be recognized as an entity reference) is
 219      * treated as literal text, and needs to be appropriately escaped by the
 220      * implementation when it is written out. In order to assign an
 221      * attribute value that contains entity references, the user must create
 222      * an <code>Attr</code> node plus any <code>Text</code> and
 223      * <code>EntityReference</code> nodes, build the appropriate subtree,
 224      * and use <code>setAttributeNodeNS</code> or
 225      * <code>setAttributeNode</code> to assign it as the value of an
 226      * attribute.


 232      *   alter.
 233      * @param qualifiedName The qualified name of the attribute to create or
 234      *   alter.
 235      * @param value The value to set in string form.
 236      * @exception DOMException
 237      *   INVALID_CHARACTER_ERR: Raised if the specified qualified name is not
 238      *   an XML name according to the XML version in use specified in the
 239      *   <code>Document.xmlVersion</code> attribute.
 240      *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 241      *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
 242      *   malformed per the Namespaces in XML specification, if the
 243      *   <code>qualifiedName</code> has a prefix and the
 244      *   <code>namespaceURI</code> is <code>null</code>, if the
 245      *   <code>qualifiedName</code> has a prefix that is "xml" and the
 246      *   <code>namespaceURI</code> is different from "<a href='http://www.w3.org/XML/1998/namespace'>
 247      *   http://www.w3.org/XML/1998/namespace</a>", if the <code>qualifiedName</code> or its prefix is "xmlns" and the
 248      *   <code>namespaceURI</code> is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>", or if the <code>namespaceURI</code> is "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>" and neither the <code>qualifiedName</code> nor its prefix is "xmlns".
 249      *   <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
 250      *   support the feature <code>"XML"</code> and the language exposed
 251      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 252      * @since 1.4, DOM Level 2
 253      */
 254     public void setAttributeNS(String namespaceURI,
 255                                String qualifiedName,
 256                                String value)
 257                                throws DOMException;
 258 
 259     /**
 260      * Removes an attribute by local name and namespace URI. If a default
 261      * value for the removed attribute is defined in the DTD, a new
 262      * attribute immediately appears with the default value as well as the
 263      * corresponding namespace URI, local name, and prefix when applicable.
 264      * The implementation may handle default values from other schemas
 265      * similarly but applications should use
 266      * <code>Document.normalizeDocument()</code> to guarantee this
 267      * information is up-to-date.
 268      * <br>If no attribute with this local name and namespace URI is found,
 269      * this method has no effect.
 270      * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
 271      * , applications must use the value <code>null</code> as the
 272      * <code>namespaceURI</code> parameter for methods if they wish to have
 273      * no namespace.
 274      * @param namespaceURI The namespace URI of the attribute to remove.
 275      * @param localName The local name of the attribute to remove.
 276      * @exception DOMException
 277      *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 278      *   <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
 279      *   support the feature <code>"XML"</code> and the language exposed
 280      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 281      * @since 1.4, DOM Level 2
 282      */
 283     public void removeAttributeNS(String namespaceURI,
 284                                   String localName)
 285                                   throws DOMException;
 286 
 287     /**
 288      * Retrieves an <code>Attr</code> node by local name and namespace URI.
 289      * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
 290      * , applications must use the value <code>null</code> as the
 291      * <code>namespaceURI</code> parameter for methods if they wish to have
 292      * no namespace.
 293      * @param namespaceURI The namespace URI of the attribute to retrieve.
 294      * @param localName The local name of the attribute to retrieve.
 295      * @return The <code>Attr</code> node with the specified attribute local
 296      *   name and namespace URI or <code>null</code> if there is no such
 297      *   attribute.
 298      * @exception DOMException
 299      *   NOT_SUPPORTED_ERR: May be raised if the implementation does not
 300      *   support the feature <code>"XML"</code> and the language exposed
 301      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 302      * @since 1.4, DOM Level 2
 303      */
 304     public Attr getAttributeNodeNS(String namespaceURI,
 305                                    String localName)
 306                                    throws DOMException;
 307 
 308     /**
 309      * Adds a new attribute. If an attribute with that local name and that
 310      * namespace URI is already present in the element, it is replaced by
 311      * the new one. Replacing an attribute node by itself has no effect.
 312      * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
 313      * , applications must use the value <code>null</code> as the
 314      * <code>namespaceURI</code> parameter for methods if they wish to have
 315      * no namespace.
 316      * @param newAttr The <code>Attr</code> node to add to the attribute list.
 317      * @return If the <code>newAttr</code> attribute replaces an existing
 318      *   attribute with the same local name and namespace URI, the replaced
 319      *   <code>Attr</code> node is returned, otherwise <code>null</code> is
 320      *   returned.
 321      * @exception DOMException
 322      *   WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a
 323      *   different document than the one that created the element.
 324      *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 325      *   <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
 326      *   attribute of another <code>Element</code> object. The DOM user must
 327      *   explicitly clone <code>Attr</code> nodes to re-use them in other
 328      *   elements.
 329      *   <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
 330      *   support the feature <code>"XML"</code> and the language exposed
 331      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 332      * @since 1.4, DOM Level 2
 333      */
 334     public Attr setAttributeNodeNS(Attr newAttr)
 335                                    throws DOMException;
 336 
 337     /**
 338      * Returns a <code>NodeList</code> of all the descendant
 339      * <code>Elements</code> with a given local name and namespace URI in
 340      * document order.
 341      * @param namespaceURI The namespace URI of the elements to match on. The
 342      *   special value "*" matches all namespaces.
 343      * @param localName The local name of the elements to match on. The
 344      *   special value "*" matches all local names.
 345      * @return A new <code>NodeList</code> object containing all the matched
 346      *   <code>Elements</code>.
 347      * @exception DOMException
 348      *   NOT_SUPPORTED_ERR: May be raised if the implementation does not
 349      *   support the feature <code>"XML"</code> and the language exposed
 350      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 351      * @since 1.4, DOM Level 2
 352      */
 353     public NodeList getElementsByTagNameNS(String namespaceURI,
 354                                            String localName)
 355                                            throws DOMException;
 356 
 357     /**
 358      * Returns <code>true</code> when an attribute with a given name is
 359      * specified on this element or has a default value, <code>false</code>
 360      * otherwise.
 361      * @param name The name of the attribute to look for.
 362      * @return <code>true</code> if an attribute with the given name is
 363      *   specified on this element or has a default value, <code>false</code>
 364      *    otherwise.
 365      * @since 1.4, DOM Level 2
 366      */
 367     public boolean hasAttribute(String name);
 368 
 369     /**
 370      * Returns <code>true</code> when an attribute with a given local name and
 371      * namespace URI is specified on this element or has a default value,
 372      * <code>false</code> otherwise.
 373      * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
 374      * , applications must use the value <code>null</code> as the
 375      * <code>namespaceURI</code> parameter for methods if they wish to have
 376      * no namespace.
 377      * @param namespaceURI The namespace URI of the attribute to look for.
 378      * @param localName The local name of the attribute to look for.
 379      * @return <code>true</code> if an attribute with the given local name
 380      *   and namespace URI is specified or has a default value on this
 381      *   element, <code>false</code> otherwise.
 382      * @exception DOMException
 383      *   NOT_SUPPORTED_ERR: May be raised if the implementation does not
 384      *   support the feature <code>"XML"</code> and the language exposed
 385      *   through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
 386      * @since 1.4, DOM Level 2
 387      */
 388     public boolean hasAttributeNS(String namespaceURI,
 389                                   String localName)
 390                                   throws DOMException;
 391 
 392     /**
 393      *  The type information associated with this element.
 394      * @since 1.5, DOM Level 3
 395      */
 396     public TypeInfo getSchemaTypeInfo();
 397 
 398     /**
 399      *  If the parameter <code>isId</code> is <code>true</code>, this method
 400      * declares the specified attribute to be a user-determined ID attribute
 401      * . This affects the value of <code>Attr.isId</code> and the behavior
 402      * of <code>Document.getElementById</code>, but does not change any
 403      * schema that may be in use, in particular this does not affect the
 404      * <code>Attr.schemaTypeInfo</code> of the specified <code>Attr</code>
 405      * node. Use the value <code>false</code> for the parameter
 406      * <code>isId</code> to undeclare an attribute for being a
 407      * user-determined ID attribute.
 408      * <br> To specify an attribute by local name and namespace URI, use the
 409      * <code>setIdAttributeNS</code> method.
 410      * @param name The name of the attribute.
 411      * @param isId Whether the attribute is a of type ID.
 412      * @exception DOMException
 413      *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 414      *   <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
 415      *   of this element.
 416      * @since 1.5, DOM Level 3
 417      */
 418     public void setIdAttribute(String name,
 419                                boolean isId)
 420                                throws DOMException;
 421 
 422     /**
 423      *  If the parameter <code>isId</code> is <code>true</code>, this method
 424      * declares the specified attribute to be a user-determined ID attribute
 425      * . This affects the value of <code>Attr.isId</code> and the behavior
 426      * of <code>Document.getElementById</code>, but does not change any
 427      * schema that may be in use, in particular this does not affect the
 428      * <code>Attr.schemaTypeInfo</code> of the specified <code>Attr</code>
 429      * node. Use the value <code>false</code> for the parameter
 430      * <code>isId</code> to undeclare an attribute for being a
 431      * user-determined ID attribute.
 432      * @param namespaceURI The namespace URI of the attribute.
 433      * @param localName The local name of the attribute.
 434      * @param isId Whether the attribute is a of type ID.
 435      * @exception DOMException
 436      *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 437      *   <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
 438      *   of this element.
 439      * @since 1.5, DOM Level 3
 440      */
 441     public void setIdAttributeNS(String namespaceURI,
 442                                  String localName,
 443                                  boolean isId)
 444                                  throws DOMException;
 445 
 446     /**
 447      *  If the parameter <code>isId</code> is <code>true</code>, this method
 448      * declares the specified attribute to be a user-determined ID attribute
 449      * . This affects the value of <code>Attr.isId</code> and the behavior
 450      * of <code>Document.getElementById</code>, but does not change any
 451      * schema that may be in use, in particular this does not affect the
 452      * <code>Attr.schemaTypeInfo</code> of the specified <code>Attr</code>
 453      * node. Use the value <code>false</code> for the parameter
 454      * <code>isId</code> to undeclare an attribute for being a
 455      * user-determined ID attribute.
 456      * @param idAttr The attribute node.
 457      * @param isId Whether the attribute is a of type ID.
 458      * @exception DOMException
 459      *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 460      *   <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
 461      *   of this element.
 462      * @since 1.5, DOM Level 3
 463      */
 464     public void setIdAttributeNode(Attr idAttr,
 465                                    boolean isId)
 466                                    throws DOMException;
 467 
 468 }