Main Page Packages Class Hierarchy Compound List File List Compound Members

# attrspecifiedvalue Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getSpecified()" method for an Attr node should be set to true if the attribute was explicitly given a value. Retrieve the attribute named "domestic" from the last child of of the first employee and examine the value returned by the "getSpecified()" method. 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-862529273

Definition at line 46 of file attrspecifiedvalue.java.

## Constructor & Destructor Documentation

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

| Definition at line 48 of file attrspecifiedvalue.java.
    00049  {
    00050       super(factory);
    00051
    00052    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 70 of file attrspecifiedvalue.java.
    00070                                 {
    00071       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/attrspecifiedvalue";
    00072    }

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

| Definition at line 73 of file attrspecifiedvalue.java. References DOMTestCase::doMain().
    00073                                           {
    00074         DOMTestCase.doMain(attrspecifiedvalue.class,args);
    00075    }

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

| Reimplemented from DOMTestCase. Definition at line 54 of file attrspecifiedvalue.java. References DOMTestCase::assertTrue(), and DOMTest::load().
    00054                                                     {
    00055       Document doc;
    00056       NodeList addressList;
    00057       Node testNode;
    00058       NamedNodeMap attributes;
    00059       Attr domesticAttr;
    00060       boolean state;
    00061       doc = load("staff");
    00062       addressList = doc.getElementsByTagName("address");
    00063       testNode = addressList.item(0);
    00064       attributes = testNode.getAttributes();
    00065       domesticAttr = (Attr)attributes.getNamedItem("domestic");
    00066       state = domesticAttr.getSpecified();
    00067       assertTrue("attrSpecifiedValueAssert",state);
    00068
    00069    }

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

- attrspecifiedvalue.java