Main Page Packages Class Hierarchy Compound List File List Compound Members

# characterdatasetdatanomodificationallowederr Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "setData(data)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "setData(data)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='NO_MODIFICATION_ALLOWED_ERR']) , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-72AB8359')/setraises/exception[@name='DOMException']/descr/p[substring-before(.,':')='NO_MODIFICATION_ALLOWED_ERR']) , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359

Definition at line 47 of file characterdatasetdatanomodificationallowederr.java.

## Constructor & Destructor Documentation

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

| Definition at line 49 of file characterdatasetdatanomodificationallowederr.java. References DocumentBuilderSetting::notExpandEntityReferences, and DOMTest::setFactory().
    00050                                      {
    00051
    00052       DocumentBuilderSetting[] settings = new DocumentBuilderSetting[] {
    00053 DocumentBuilderSetting.notExpandEntityReferences
    00054         };
    00055         DOMTestDocumentBuilderFactory testFactory = factory.newInstance(settings);
    00056         setFactory(testFactory);
    00057
    00058    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 87 of file characterdatasetdatanomodificationallowederr.java.
    00087                                 {
    00088       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatasetdatanomodificationallowederr";
    00089    }

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

| Definition at line 90 of file characterdatasetdatanomodificationallowederr.java. References DOMTestCase::doMain().
    00090                                           {
    00091         DOMTestCase.doMain(characterdatasetdatanomodificationallowederr.class,args);
    00092    }

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

| Reimplemented from DOMTestCase. Definition at line 60 of file characterdatasetdatanomodificationallowederr.java. References DOMTestCase::assertTrue(), and DOMTest::load().
    00060                                                     {
    00061       Document doc;
    00062       NodeList genderList;
    00063       Node genderNode;
    00064       Node entElement;
    00065       Node entElementContent;
    00066       EntityReference entReference;
    00067       doc = load("staff");
    00068       genderList = doc.getElementsByTagName("gender");
    00069       genderNode = genderList.item(2);
    00070       entReference = (EntityReference)genderNode.getFirstChild();
    00071       entElement = entReference.getFirstChild();
    00072       entElementContent = entElement.getFirstChild();
    00073
    00074         {
    00075                 boolean success = false;
    00076                 try {
    00077                         ((CharacterData)/*Node*/entElementContent).setData("newData");
    00078
    00079                 }
    00080                 catch(DOMException ex) {
    00081                         success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR);
    00082                 }
    00083                 assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
    00084         }
    00085
    00086    }

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

- characterdatasetdatanomodificationallowederr.java