|
1 <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="test-to-html.xsl" type="text/xml"?> |
|
2 |
|
3 <!-- |
|
4 |
|
5 Copyright (c) 2001-2004 World Wide Web Consortium, |
|
6 (Massachusetts Institute of Technology, Institut National de |
|
7 Recherche en Informatique et en Automatique, Keio University). All |
|
8 Rights Reserved. This program is distributed under the W3C's Software |
|
9 Intellectual Property License. This program is distributed in the |
|
10 hope that it will be useful, but WITHOUT ANY WARRANTY; without even |
|
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
12 PURPOSE. |
|
13 |
|
14 See W3C License http://www.w3.org/Consortium/Legal/ for more details. |
|
15 |
|
16 --> |
|
17 |
|
18 <test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-3" name="nodeappendchild02"> |
|
19 <metadata> |
|
20 <title>nodeappendchild02</title> |
|
21 <creator>Curt Arnold</creator> |
|
22 <description> |
|
23 An attempt to add a second document element should result in a HIERARCHY_REQUEST_ERR |
|
24 or a NOT_SUPPORTED_ERR. |
|
25 </description> |
|
26 <date qualifier="created">2004-01-22</date> |
|
27 <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#ID-184E7107"/> |
|
28 </metadata> |
|
29 <var name="doc" type="Document"/> |
|
30 <var name="newElem" type="Element"/> |
|
31 <var name="appendedChild" type="Node"/> |
|
32 <var name="tagName" type="DOMString"/> |
|
33 <var name="rootNS" type="DOMString"/> |
|
34 <var name="docElem" type="Element"/> |
|
35 <load var="doc" href="barfoo" willBeModified="true"/> |
|
36 <documentElement var="docElem" obj="doc"/> |
|
37 <tagName var="tagName" obj="docElem"/> |
|
38 <namespaceURI var="rootNS" obj="docElem" interface="Node"/> |
|
39 <createElementNS var="newElem" obj="doc" qualifiedName='tagName' namespaceURI="rootNS"/> |
|
40 <try> |
|
41 <appendChild obj="doc" var="appendedChild" newChild="newElem"/> |
|
42 <fail id="throw_HIERARCHY_REQUEST_OR_NOT_SUPPORTED"/> |
|
43 <catch> |
|
44 <DOMException code="HIERARCHY_REQUEST_ERR"/> |
|
45 <DOMException code="NOT_SUPPORTED_ERR"/> |
|
46 </catch> |
|
47 </try> |
|
48 </test> |