Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

attrentityreplacement Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "getValue()" method will return the value of the attribute as a string. The general entity references are replaced with their values. Retrieve the attribute named "street" from the last child of of the fourth employee and examine the string returned by the "getValue()" method. The value should be set to "Yes" after the EntityReference is replaced with its value. This test uses 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-221662474

Definition at line 48 of file attrentityreplacement.java.


Constructor & Destructor Documentation

attrentityreplacement::attrentityreplacement DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 50 of file attrentityreplacement.java.

00051  {
00052       super(factory);
00053 
00054    }


Member Function Documentation

String attrentityreplacement::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 72 of file attrentityreplacement.java.

00072                                 {
00073       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/attrentityreplacement";
00074    }

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

Definition at line 75 of file attrentityreplacement.java.

References DOMTestCase::doMain().

00075                                           {
00076         DOMTestCase.doMain(attrentityreplacement.class,args);
00077    }

void attrentityreplacement::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 56 of file attrentityreplacement.java.

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

00056                                                     {
00057       Document doc;
00058       NodeList addressList;
00059       Node testNode;
00060       NamedNodeMap attributes;
00061       Attr streetAttr;
00062       String value;
00063       doc = load("staff");
00064       addressList = doc.getElementsByTagName("address");
00065       testNode = addressList.item(3);
00066       attributes = testNode.getAttributes();
00067       streetAttr = (Attr)attributes.getNamedItem("street");
00068       value = streetAttr.getValue();
00069       assertEquals("attrEntityReplacementAssert","Yes",value);
00070       
00071    }


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