Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

characterdataappenddatanomodificationallowederrEE Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "appendData(arg)" method raises a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Add an entity reference to the THIRD "gender" element. The elements content is an entity reference. Get the FIRST item from the entity reference and execute the "appendData(arg)" 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-32791A2F , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-32791A2F')/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-32791A2F , http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdataappenddatanomodificationallowederr.xml

Definition at line 47 of file characterdataappenddatanomodificationallowederrEE.java.


Constructor & Destructor Documentation

characterdataappenddatanomodificationallowederrEE::characterdataappenddatanomodificationallowederrEE DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 49 of file characterdataappenddatanomodificationallowederrEE.java.

00050  {
00051       super(factory);
00052 
00053    }


Member Function Documentation

String characterdataappenddatanomodificationallowederrEE::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 82 of file characterdataappenddatanomodificationallowederrEE.java.

00082                                 {
00083       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdataappenddatanomodificationallowederrEE";
00084    }

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

Definition at line 85 of file characterdataappenddatanomodificationallowederrEE.java.

References DOMTestCase::doMain().

00085                                           {
00086         DOMTestCase.doMain(characterdataappenddatanomodificationallowederrEE.class,args);
00087    }

void characterdataappenddatanomodificationallowederrEE::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 55 of file characterdataappenddatanomodificationallowederrEE.java.

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

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


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