Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

nodeinsertbeforenomodificationallowederrEE Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "insertBefore(newChild,refChild)" method causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly.

Create an ent3 element and and execute the "insertBefore(newChild,refChild)" 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-952280727 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-952280727')/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-952280727 , http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeinsertbeforenomodificationallowederr.xml

Definition at line 47 of file nodeinsertbeforenomodificationallowederrEE.java.


Constructor & Destructor Documentation

nodeinsertbeforenomodificationallowederrEE::nodeinsertbeforenomodificationallowederrEE DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 49 of file nodeinsertbeforenomodificationallowederrEE.java.

00050  {
00051       super(factory);
00052 
00053    }


Member Function Documentation

String nodeinsertbeforenomodificationallowederrEE::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 79 of file nodeinsertbeforenomodificationallowederrEE.java.

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

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

Definition at line 82 of file nodeinsertbeforenomodificationallowederrEE.java.

References DOMTestCase::doMain().

00082                                           {
00083         DOMTestCase.doMain(nodeinsertbeforenomodificationallowederrEE.class,args);
00084    }

void nodeinsertbeforenomodificationallowederrEE::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 55 of file nodeinsertbeforenomodificationallowederrEE.java.

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

00055                                                     {
00056       Document doc;
00057       Node entRef;
00058       Node createdNode;
00059       Node insertedNode;
00060       Node refChild = null;
00061 
00062       doc = load("staff");
00063       entRef = doc.createEntityReference("ent3");
00064       createdNode = doc.createElement("text3");
00065       
00066         {
00067                 boolean success = false;
00068                 try {
00069                         insertedNode = entRef.insertBefore(createdNode,refChild);
00070       
00071                 }
00072                 catch(DOMException ex) {
00073                         success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR);
00074                 }
00075                 assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
00076         }
00077 
00078    }


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