Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

characterdatainsertdatanomodificationallowederr Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

 characterdatainsertdatanomodificationallowederr (DOMTestDocumentBuilderFactory factory) throws DOMTestIncompatibleException
void runTest () throws java.lang.Throwable
String getTargetURI ()

Static Public Methods

void main (String[] args)


Detailed Description

The "insertData(offset,arg)" 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 "insertData(offset,arg)" 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-3EDB695F , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-3EDB695F')/raises/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-3EDB695F

Definition at line 47 of file characterdatainsertdatanomodificationallowederr.java.


Constructor & Destructor Documentation

characterdatainsertdatanomodificationallowederr::characterdatainsertdatanomodificationallowederr DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 49 of file characterdatainsertdatanomodificationallowederr.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 characterdatainsertdatanomodificationallowederr::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 87 of file characterdatainsertdatanomodificationallowederr.java.

00087                                 {
00088       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatainsertdatanomodificationallowederr";
00089    }

void characterdatainsertdatanomodificationallowederr::main String    args[] [inline, static]
 

Definition at line 90 of file characterdatainsertdatanomodificationallowederr.java.

References DOMTestCase::doMain().

00090                                           {
00091         DOMTestCase.doMain(characterdatainsertdatanomodificationallowederr.class,args);
00092    }

void characterdatainsertdatanomodificationallowederr::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 60 of file characterdatainsertdatanomodificationallowederr.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).insertData(1,"newArg");
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:
Generated on Thu Feb 14 19:46:37 2002 for DOM Level 1 Core Test Suite by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001