Public Methods | |
| processinginstructionsetdatanomodificationallowederrEE (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Create an ent4 entity reference and add to document of the THIRD "gender" element. The elements content is an entity reference. Try to remove the "domestic" attribute from the entity reference by executing the "setData(data)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
Definition at line 49 of file processinginstructionsetdatanomodificationallowederrEE.java.
|
|
Definition at line 51 of file processinginstructionsetdatanomodificationallowederrEE.java.
00052 {
00053 super(factory);
00054
00055 }
|
|
|
Reimplemented from DOMTest. Definition at line 86 of file processinginstructionsetdatanomodificationallowederrEE.java.
00086 {
00087 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/processinginstructionsetdatanomodificationallowederrEE";
00088 }
|
|
|
Definition at line 89 of file processinginstructionsetdatanomodificationallowederrEE.java. References DOMTestCase::doMain().
00089 {
00090 DOMTestCase.doMain(processinginstructionsetdatanomodificationallowederrEE.class,args);
00091 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 57 of file processinginstructionsetdatanomodificationallowederrEE.java. References DOMTestCase::assertTrue(), and DOMTest::load().
00057 {
00058 Document doc;
00059 NodeList genderList;
00060 Node gender;
00061 Node entRef;
00062 ProcessingInstruction piNode;
00063 String data;
00064 Node appendedChild;
00065 doc = load("staff");
00066 genderList = doc.getElementsByTagName("gender");
00067 gender = genderList.item(2);
00068 entRef = doc.createEntityReference("ent4");
00069 appendedChild = gender.appendChild(entRef);
00070 entRef = gender.getFirstChild();
00071 piNode = (ProcessingInstruction)entRef.getLastChild();
00072
00073 {
00074 boolean success = false;
00075 try {
00076 piNode.setData("newData");
00077
00078 }
00079 catch(DOMException ex) {
00080 success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR);
00081 }
00082 assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
00083 }
00084
00085 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001