Public Methods | |
| characterdatareplacedatanomodificationallowederrEE (DOMTestDocumentBuilderFactory factory) throws DOMTestIncompatibleException | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Add an entity reference tp the THIRD "gender" element. Get the FIRST item from the entity reference and execute the "replaceData(offset,count,arg)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.
Definition at line 47 of file characterdatareplacedatanomodificationallowederrEE.java.
|
|
Definition at line 49 of file characterdatareplacedatanomodificationallowederrEE.java. References DocumentBuilderSetting::notExpandEntityReferences, and DOMTest::setFactory().
00050 {
00051
00052 DocumentBuilderSetting[] settings = new DocumentBuilderSetting[] {
00053 DocumentBuilderSetting.notExpandEntityReferences
00054 };
00055 DOMTestDocumentBuilderFactory testFactory = factory.newInstance(settings);
00056 setFactory(testFactory);
00057
00058 }
|
|
|
Reimplemented from DOMTest. Definition at line 87 of file characterdatareplacedatanomodificationallowederrEE.java.
00087 {
00088 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatareplacedatanomodificationallowederrEE";
00089 }
|
|
|
Definition at line 90 of file characterdatareplacedatanomodificationallowederrEE.java. References DOMTestCase::doMain().
00090 {
00091 DOMTestCase.doMain(characterdatareplacedatanomodificationallowederrEE.class,args);
00092 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 60 of file characterdatareplacedatanomodificationallowederrEE.java. References DOMTestCase::assertTrue(), and DOMTest::load().
00060 {
00061 Document doc;
00062 NodeList genderList;
00063 Node genderNode;
00064 CharacterData entText;
00065 EntityReference entReference;
00066 Node appendedNode;
00067 doc = load("staff");
00068 genderList = doc.getElementsByTagName("gender");
00069 genderNode = genderList.item(2);
00070 entReference = doc.createEntityReference("ent3");
00071 appendedNode = genderNode.appendChild(entReference);
00072 entText = (CharacterData)entReference.getFirstChild();
00073
00074 {
00075 boolean success = false;
00076 try {
00077 entText.replaceData(1,3,"newArg");
00078
00079 }
00080 catch(DOMException ex) {
00081 success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR);
00082 }
00083 assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
00084 }
00085
00086 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001