Main Page Packages Class Hierarchy Compound List File List Compound Members

# nodeentityreferencenodename Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The string returned by the "getNodeName()" method for an EntityReference Node is the name of the entity referenced.

Retrieve the first Entity Reference node from the last child of the second employee and check the string returned by the "getNodeName()" method. It should be equal to "ent2".

Author:
  NIST , Mary Brady

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

Definition at line 45 of file nodeentityreferencenodename.java.

## Constructor & Destructor Documentation

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

| Definition at line 47 of file nodeentityreferencenodename.java.
    00048  {
    00049       super(factory);
    00050
    00051    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 78 of file nodeentityreferencenodename.java.
    00078                                 {
    00079       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeentityreferencenodename";
    00080    }

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

| Definition at line 81 of file nodeentityreferencenodename.java. References DOMTestCase::doMain().
    00081                                           {
    00082         DOMTestCase.doMain(nodeentityreferencenodename.class,args);
    00083    }

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

| Reimplemented from DOMTestCase. Definition at line 53 of file nodeentityreferencenodename.java. References DOMTestCase::assertEquals(), DOMTest::isExpandEntityReferences(), and DOMTest::load().
    00053                                                     {
    00054       Document doc;
    00055       NodeList elementList;
    00056       Element entRefAddr;
    00057       Node entRefNode;
    00058       String entRefName;
    00059       doc = load("staff");
    00060
    00061         if(
    00062         isExpandEntityReferences()
    00063         ) {
    00064         entRefNode = doc.createEntityReference("ent2");
    00065
    00066         }
    00067
    00068                 else {
    00069                         elementList = doc.getElementsByTagName("address");
    00070       entRefAddr = (Element)elementList.item(1);
    00071       entRefNode = entRefAddr.getFirstChild();
    00072
    00073                 }
    00074         entRefName = entRefNode.getNodeName();
    00075       assertEquals("nodeEntityReferenceNodeNameAssert1","ent2",entRefName);
    00076
    00077    }

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

- nodeentityreferencenodename.java