Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

elementremoveattributerestoredefaultvalue Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

 elementremoveattributerestoredefaultvalue (DOMTestDocumentBuilderFactory factory)
void runTest () throws java.lang.Throwable
String getTargetURI ()

Static Public Methods

void main (String[] args)


Detailed Description

The "removeAttributeNode(oldAttr)" method removes the specified attribute node and restores any default values.

Retrieve the last child of the third employeed and remove its "street" Attr node. Since this node has a default value defined in the DTD file, that default should immediately be the new value.

Author:
NIST , Mary Brady
See also:
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-D589198

Definition at line 45 of file elementremoveattributerestoredefaultvalue.java.


Constructor & Destructor Documentation

elementremoveattributerestoredefaultvalue::elementremoveattributerestoredefaultvalue DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 47 of file elementremoveattributerestoredefaultvalue.java.

00048  {
00049       super(factory);
00050 
00051    }


Member Function Documentation

String elementremoveattributerestoredefaultvalue::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 70 of file elementremoveattributerestoredefaultvalue.java.

00070                                 {
00071       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementremoveattributerestoredefaultvalue";
00072    }

void elementremoveattributerestoredefaultvalue::main String    args[] [inline, static]
 

Definition at line 73 of file elementremoveattributerestoredefaultvalue.java.

References DOMTestCase::doMain().

00073                                           {
00074         DOMTestCase.doMain(elementremoveattributerestoredefaultvalue.class,args);
00075    }

void elementremoveattributerestoredefaultvalue::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 53 of file elementremoveattributerestoredefaultvalue.java.

References DOMTestCase::assertEquals(), and DOMTest::load().

00053                                                     {
00054       Document doc;
00055       NodeList elementList;
00056       Element testEmployee;
00057       Attr streetAttr;
00058       NamedNodeMap attributes;
00059       String attribute;
00060       Attr removedAttr;
00061       doc = load("staff");
00062       elementList = doc.getElementsByTagName("address");
00063       testEmployee = (Element)elementList.item(2);
00064       streetAttr = testEmployee.getAttributeNode("street");
00065       removedAttr = testEmployee.removeAttributeNode(streetAttr);
00066       attribute = testEmployee.getAttribute("street");
00067       assertEquals("elementRemoveAttributeRestoreDefaultValueAssert","Yes",attribute);
00068       
00069    }


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 19:46:51 2002 for DOM Level 1 Core Test Suite by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001