Public Methods | |
| elementremoveattributenomodificationallowederrEE (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Create an reference the entity ent4 and add it to the THIRD "gender" element. Try to remove the "domestic" attribute from the entity reference by executing the "removeAttribute(name)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
Definition at line 48 of file elementremoveattributenomodificationallowederrEE.java.
|
|
Definition at line 50 of file elementremoveattributenomodificationallowederrEE.java.
00051 {
00052 super(factory);
00053
00054 }
|
|
|
Reimplemented from DOMTest. Definition at line 85 of file elementremoveattributenomodificationallowederrEE.java.
00085 {
00086 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementremoveattributenomodificationallowederrEE";
00087 }
|
|
|
Definition at line 88 of file elementremoveattributenomodificationallowederrEE.java. References DOMTestCase::doMain().
00088 {
00089 DOMTestCase.doMain(elementremoveattributenomodificationallowederrEE.class,args);
00090 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 56 of file elementremoveattributenomodificationallowederrEE.java. References DOMTestCase::assertTrue(), and DOMTest::load().
00056 {
00057 Document doc;
00058 NodeList genderList;
00059 Node gender;
00060 EntityReference entRef;
00061 Element entElement;
00062 NamedNodeMap attrList;
00063 Node attrNode;
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 entElement = (Element)entRef.getFirstChild();
00071
00072 {
00073 boolean success = false;
00074 try {
00075 entElement.removeAttribute("domestic");
00076
00077 }
00078 catch(DOMException ex) {
00079 success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR);
00080 }
00081 assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
00082 }
00083
00084 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001