Main Page Packages Class Hierarchy Compound List File List Compound Members

# attrspecifiedvalueremove Class Reference

Inherits DOMTestCase.

List of all members.

## Public Methods
| attrspecifiedvalueremove (DOMTestDocumentBuilderFactory factory)
void | runTest () throws java.lang.Throwable
String | getTargetURI ()
## Static Public Methods
void | main (String[] args)

## Detailed Description

To respecify the attribute to its default value from the DTD, the attribute must be deleted. This will then make a new attribute available with the "getSpecified()" method value set to false. Retrieve the attribute named "street" from the last child of of the THIRD employee and delete it. This should then create a new attribute with its default value and also cause the "getSpecified()" method to return false. This test uses the "removeAttribute(name)" method from the Element interface and the "getNamedItem(name)" method from the NamedNodeMap interface.

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6D6AC0F9

Definition at line 50 of file attrspecifiedvalueremove.java.

## Constructor & Destructor Documentation

attrspecifiedvalueremove::attrspecifiedvalueremove | ( | DOMTestDocumentBuilderFactory | factory | ) | `[inline]`

| Definition at line 52 of file attrspecifiedvalueremove.java.
    00053  {
    00054       super(factory);
    00055
    00056    }

## Member Function Documentation

String attrspecifiedvalueremove::getTargetURI | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTest. Definition at line 75 of file attrspecifiedvalueremove.java.
    00075                                 {
    00076       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/attrspecifiedvalueremove";
    00077    }

void attrspecifiedvalueremove::main | ( | String | args[] | ) | `[inline, static]`

| Definition at line 78 of file attrspecifiedvalueremove.java. References DOMTestCase::doMain().
    00078                                           {
    00079         DOMTestCase.doMain(attrspecifiedvalueremove.class,args);
    00080    }

void attrspecifiedvalueremove::runTest | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestCase. Definition at line 58 of file attrspecifiedvalueremove.java. References DOMTestCase::assertFalse(), and DOMTest::load().
    00058                                                     {
    00059       Document doc;
    00060       NodeList addressList;
    00061       Node testNode;
    00062       NamedNodeMap attributes;
    00063       Attr streetAttr;
    00064       boolean state;
    00065       doc = load("staff");
    00066       addressList = doc.getElementsByTagName("address");
    00067       testNode = addressList.item(2);
    00068       ((Element)/*Node*/testNode).removeAttribute("street");
    00069       attributes = testNode.getAttributes();
    00070       streetAttr = (Attr)attributes.getNamedItem("street");
    00071       state = streetAttr.getSpecified();
    00072       assertFalse("attrSpecifiedValueRemoveAssert",state);
    00073
    00074    }

The documentation for this class was generated from the following file:

- attrspecifiedvalueremove.java