Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

characterdatasetdatanomodificationallowederrEE Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

 characterdatasetdatanomodificationallowederrEE (DOMTestDocumentBuilderFactory factory)
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:
Curt Arnold
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 , http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatasetdatanomodificationallowederr.xml

Definition at line 47 of file characterdatasetdatanomodificationallowederrEE.java.


Constructor & Destructor Documentation

characterdatasetdatanomodificationallowederrEE::characterdatasetdatanomodificationallowederrEE DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 49 of file characterdatasetdatanomodificationallowederrEE.java.

00050  {
00051       super(factory);
00052 
00053    }


Member Function Documentation

String characterdatasetdatanomodificationallowederrEE::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 80 of file characterdatasetdatanomodificationallowederrEE.java.

00080                                 {
00081       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatasetdatanomodificationallowederrEE";
00082    }

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

Definition at line 83 of file characterdatasetdatanomodificationallowederrEE.java.

References DOMTestCase::doMain().

00083                                           {
00084         DOMTestCase.doMain(characterdatasetdatanomodificationallowederrEE.class,args);
00085    }

void characterdatasetdatanomodificationallowederrEE::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 55 of file characterdatasetdatanomodificationallowederrEE.java.

References DOMTestCase::assertTrue(), and DOMTest::load().

00055                                                     {
00056       Document doc;
00057       NodeList genderList;
00058       Node genderNode;
00059       Node entText;
00060       EntityReference entReference;
00061       doc = load("staff");
00062       genderList = doc.getElementsByTagName("gender");
00063       genderNode = genderList.item(4);
00064       entReference = doc.createEntityReference("ent3");
00065       entText = entReference.getFirstChild();
00066       
00067         {
00068                 boolean success = false;
00069                 try {
00070                         ((CharacterData)/*Node*/entText).setData("newData");
00071       
00072                 }
00073                 catch(DOMException ex) {
00074                         success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR);
00075                 }
00076                 assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
00077         }
00078 
00079    }


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 19:46:39 2002 for DOM Level 1 Core Test Suite by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001