Main Page Packages Class Hierarchy Compound List File List Compound Members

# documenttypegetnotations Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getNotations()" method creates a NamedNodeMap that contains all the notations declared in the DTD.

Retrieve the Document Type for this document and create a NamedNodeMap object of all the notations. There should be two items in the list (notation1 and notation2).

Author:
  NIST , Mary Brady , Curt Arnold

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

Definition at line 45 of file documenttypegetnotations.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

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

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

| Definition at line 80 of file documenttypegetnotations.java. References DOMTestCase::doMain().
    00080                                           {
    00081         DOMTestCase.doMain(documenttypegetnotations.class,args);
    00082    }

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

| Reimplemented from DOMTestCase. Definition at line 53 of file documenttypegetnotations.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00053                                                     {
    00054       Document doc;
    00055       DocumentType docType;
    00056       NamedNodeMap notationList;
    00057       Node notation;
    00058       String notationName;
    00059       Collection actual = new ArrayList();
    00060
    00061       Collection expected = new ArrayList();
    00062       expected.add("notation1");
    00063       expected.add("notation2");
    00064
    00065       doc = load("staff");
    00066       docType = doc.getDoctype();
    00067       notationList = docType.getNotations();
    00068       for(int _index = 0; _index < notationList.getLength();_index++) {
    00069       notation = ( Node ) notationList.item(_index);
    00070            notationName = notation.getNodeName();
    00071       actual.add(notationName);
    00072
    00073         }
    00074       assertEquals("names",expected,actual);
    00075
    00076    }

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

- documenttypegetnotations.java