Main Page Packages Class Hierarchy Compound List File List Compound Members

# attrcreatedocumentfragment Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

Attr nodes may be associated with Element nodes contained within a DocumentFragment. Create a new DocumentFragment and add a newly created Element node(with one attribute). Once the element is added, its attribute should be available as an attribute associated with an Element within a DocumentFragment.

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-35CB04B5 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68F082 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-B63ED1A3

Definition at line 44 of file attrcreatedocumentfragment.java.

## Constructor & Destructor Documentation

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

| Definition at line 46 of file attrcreatedocumentfragment.java.
    00047  {
    00048       super(factory);
    00049
    00050    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 73 of file attrcreatedocumentfragment.java.
    00073                                 {
    00074       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/attrcreatedocumentfragment";
    00075    }

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

| Definition at line 76 of file attrcreatedocumentfragment.java. References DOMTestCase::doMain().
    00076                                           {
    00077         DOMTestCase.doMain(attrcreatedocumentfragment.class,args);
    00078    }

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

| Reimplemented from DOMTestCase. Definition at line 52 of file attrcreatedocumentfragment.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00052                                                     {
    00053       Document doc;
    00054       DocumentFragment docFragment;
    00055       Element newOne;
    00056       Node domesticNode;
    00057       NamedNodeMap domesticAttr;
    00058       Attr attrs;
    00059       String attrName;
    00060       Node appendedChild;
    00061       doc = load("staff");
    00062       docFragment = doc.createDocumentFragment();
    00063       newOne = doc.createElement("newElement");
    00064       newOne.setAttribute("newdomestic","Yes");
    00065       appendedChild = docFragment.appendChild(newOne);
    00066       domesticNode = docFragment.getFirstChild();
    00067       domesticAttr = domesticNode.getAttributes();
    00068       attrs = (Attr)domesticAttr.item(0);
    00069       attrName = attrs.getName();
    00070       assertEquals("attrCreateDocumentFragmentAssert","newdomestic",attrName);
    00071
    00072    }

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

- attrcreatedocumentfragment.java