2 This Java source file was generated by test-to-java.xsl
3 and is a derived work from the source document.
4 The source document contained the following notice:
7 Copyright (c) 2004 World Wide Web Consortium,
8 (Massachusetts Institute of Technology, Institut National de
9 Recherche en Informatique et en Automatique, Keio University). All
10 Rights Reserved. This program is distributed under the W3C's Software
11 Intellectual Property License. This program is distributed in the
12 hope that it will be useful, but WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 See W3C License http://www.w3.org/Consortium/Legal/ for more details.
19 package tests.org.w3c.dom;
21 import dalvik.annotation.TestTargetClass;
23 import javax.xml.parsers.DocumentBuilder;
25 import org.w3c.dom.DOMException;
26 import org.w3c.dom.Document;
27 import org.w3c.dom.DocumentType;
28 import org.w3c.dom.NamedNodeMap;
31 * An attempt to add remove an entity using removeNamedItemNS should result in a
32 * NO_MODIFICATION_ERR or a NOT_FOUND_ERR.
36 * href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-1788794630">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-1788794630</a>
38 * href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-removeNamedItemNS">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-removeNamedItemNS</a>
40 @TestTargetClass(NamedNodeMap.class)
41 public final class HCEntitiesRemoveNamedItemNS extends DOMTestCase {
43 DOMDocumentBuilderFactory factory;
45 DocumentBuilder builder;
47 protected void setUp() throws Exception {
50 factory = new DOMDocumentBuilderFactory(DOMDocumentBuilderFactory
51 .getConfiguration1());
52 builder = factory.getBuilder();
53 } catch (Exception e) {
54 fail("Unexpected exception" + e.getMessage());
58 protected void tearDown() throws Exception {
68 * Any uncaught exception causes test to fail
70 // Assumes validation.
71 // public void testRemoveNamedItemNS() throws Throwable {
73 // NamedNodeMap entities;
74 // DocumentType docType;
76 // doc = (Document) load("hc_staff", builder);
77 // docType = doc.getDoctype();
79 // if (!(("text/html".equals(getContentType())))) {
80 // assertNotNull("docTypeNotNull", docType);
81 // entities = docType.getEntities();
82 // assertNotNull("entitiesNotNull", entities);
85 // entities.removeNamedItemNS(
86 // "http://www.w3.org/1999/xhtml", "alpha");
87 // fail("throw_NO_MOD_OR_NOT_FOUND_ERR");
89 // } catch (DOMException ex) {